From de8c3158fe1b2658ca0e013b680a95c484657736 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 19 Aug 2007 13:00:51 +0000 Subject: [PATCH] - Make use of qDeleteAll() function from Qt4 --- src/deleteThread.h | 5 +---- src/downloadThread.h | 5 +---- src/rss.h | 16 ++++------------ 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/src/deleteThread.h b/src/deleteThread.h index a0fbf4bea..f9387303d 100644 --- a/src/deleteThread.h +++ b/src/deleteThread.h @@ -84,10 +84,7 @@ class deleteThread : public QThread { abort = true; condition.wakeOne(); mutex.unlock(); - subDeleteThread *st; - foreach(st, subThreads){ - delete st; - } + qDeleteAll(subThreads); wait(); } diff --git a/src/downloadThread.h b/src/downloadThread.h index 875c45ff2..d9cd7d225 100644 --- a/src/downloadThread.h +++ b/src/downloadThread.h @@ -154,10 +154,7 @@ class downloadThread : public QThread { abort = true; condition.wakeOne(); mutex.unlock(); - subDownloadThread *st; - foreach(st, subThreads){ - delete st; - } + qDeleteAll(subThreads); wait(); } diff --git a/src/rss.h b/src/rss.h index 0a20d99a1..ac0e4b948 100644 --- a/src/rss.h +++ b/src/rss.h @@ -170,10 +170,8 @@ class RssStream : public QObject{ // delete all the items saved void removeAllItems() { - unsigned int listSize = listItem.size(); - for(unsigned int i=0; i