Commit 258301b1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Iterate over QMap directly, not on temporary container

parent 1cfd76a4
Pipeline #73864 passed with stage
in 4 minutes and 51 seconds
......@@ -191,8 +191,8 @@ QStringList Contact::groups() const
void Contact::clearGroups()
{
const QStringList groups = d->groups.keys();
for (const QString &group : groups) {
for (auto it = d->groups.cbegin(); it != d->groups.cend(); ++it) {
const QString &group = it.key();
d->groups.insert(group, true);
}
}
......
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