Improve removeIf() to support set types

We can now replace QMutable*Iterator by removeIf() which usage is more consistent with other
algorithm functions.
This commit is contained in:
Chocobo1 2019-05-12 13:26:06 +08:00
parent 4ed8b31641
commit c6f3da1097
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
7 changed files with 60 additions and 31 deletions

View file

@ -754,7 +754,7 @@ bool Session::removeCategory(const QString &name)
if (isSubcategoriesEnabled()) {
// remove subcategories
const QString test = name + '/';
Dict::removeIf(m_categories, [this, &test, &result](const QString &category, const QString &)
Algorithm::removeIf(m_categories, [this, &test, &result](const QString &category, const QString &)
{
if (category.startsWith(test)) {
result = true;