mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
- Make use of qDeleteAll() function from Qt4
This commit is contained in:
parent
04352cce3c
commit
de8c3158fe
3 changed files with 6 additions and 20 deletions
16
src/rss.h
16
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<listSize; ++i){
|
||||
delete listItem.at(i);
|
||||
}
|
||||
qDeleteAll(listItem);
|
||||
listItem.clear();
|
||||
}
|
||||
|
||||
void setLoading(bool val) {
|
||||
|
@ -466,10 +464,7 @@ class RssManager : public QObject{
|
|||
}
|
||||
|
||||
~RssManager(){
|
||||
RssStream *stream;
|
||||
foreach(stream, streams){
|
||||
delete stream;
|
||||
}
|
||||
qDeleteAll(streams);
|
||||
delete downloader;
|
||||
}
|
||||
|
||||
|
@ -560,10 +555,7 @@ class RssManager : public QObject{
|
|||
|
||||
// remove all the streams in the manager
|
||||
void removeAll(){
|
||||
RssStream *stream;
|
||||
foreach(stream, streams){
|
||||
delete stream;
|
||||
}
|
||||
qDeleteAll(streams);
|
||||
streams.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue