Browse Source

Don't use qDeleteAll() on temporaries

qDeleteAll() is being used on an unnecessary temporary container created
by QHash::values().
Using qDeleteAll(mycontainer) instead.
adaptive-webui-19844
Luís Pereira 7 years ago
parent
commit
44e4b5d238
  1. 2
      src/base/searchengine.cpp
  2. 2
      src/gui/properties/trackerlist.cpp

2
src/base/searchengine.cpp

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

2
src/gui/properties/trackerlist.cpp

@ -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, "");

Loading…
Cancel
Save