Commit 7ea65e0f authored by Méven Car's avatar Méven Car
Browse files

KAStatsFavoritesModel: Simplify code using std::remove

parent cef441e4
Pipeline #169354 passed with stage
in 9 minutes and 31 seconds
......@@ -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();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment