1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Don't use qDeleteAll() on temporaries

qDeleteAll() is being used on an unnecessary temporary container created
by QHash::values().
Using qDeleteAll(mycontainer) instead.
This commit is contained in:
Luís Pereira 2018-02-12 16:36:03 +00:00
parent c59d2575c8
commit 44e4b5d238
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ SearchEngine::SearchEngine()
SearchEngine::~SearchEngine() SearchEngine::~SearchEngine()
{ {
qDeleteAll(m_plugins.values()); qDeleteAll(m_plugins);
cancelSearch(); cancelSearch();
} }

View File

@ -234,7 +234,7 @@ void TrackerList::moveSelectionDown()
void TrackerList::clear() void TrackerList::clear()
{ {
qDeleteAll(m_trackerItems.values()); qDeleteAll(m_trackerItems);
m_trackerItems.clear(); m_trackerItems.clear();
m_DHTItem->setText(COL_STATUS, ""); m_DHTItem->setText(COL_STATUS, "");
m_DHTItem->setText(COL_SEEDS, ""); m_DHTItem->setText(COL_SEEDS, "");