From 7ea65e0f3a29f050a447d4c86a6907ec29c16675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9ven=20Car?= Date: Thu, 28 Apr 2022 14:02:09 +0200 Subject: [PATCH] KAStatsFavoritesModel: Simplify code using std::remove --- applets/kicker/plugin/kastatsfavoritesmodel.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/applets/kicker/plugin/kastatsfavoritesmodel.cpp b/applets/kicker/plugin/kastatsfavoritesmodel.cpp index d26b865f1..400d8f2e0 100644 --- a/applets/kicker/plugin/kastatsfavoritesmodel.cpp +++ b/applets/kicker/plugin/kastatsfavoritesmodel.cpp @@ -303,13 +303,7 @@ public: m_items.removeAt(index); // Removing the entry from the cache - QMutableHashIterator> i(m_itemEntries); - while (i.hasNext()) { - i.next(); - if (i.value() == entry) { - i.remove(); - } - } + std::remove(m_itemEntries.begin(), m_itemEntries.end(), entry); endRemoveRows(); }