KAStatsFavoritesModel: Simplify code using std::remove

wilder-5.25
Méven Car 4 years ago
parent cef441e467
commit 7ea65e0f3a
  1. 8
      applets/kicker/plugin/kastatsfavoritesmodel.cpp

@ -303,13 +303,7 @@ public:
m_items.removeAt(index);
// Removing the entry from the cache
QMutableHashIterator<QString, QSharedPointer<AbstractEntry>> i(m_itemEntries);
while (i.hasNext()) {
i.next();
if (i.value() == entry) {
i.remove();
}
}
std::remove(m_itemEntries.begin(), m_itemEntries.end(), entry);
endRemoveRows();
}

Loading…
Cancel
Save