Commit b0d72c25 authored by mvogt's avatar mvogt

Remove superfluous group validity tests

parent b28d6f38
......@@ -883,11 +883,9 @@ void SeasideCache::removeContactData(quint32 iid, FilterType filter)
if (filter == FilterAll) {
const QString group(nameGroup(existingItem(iid)));
if (!group.isNull()) {
QSet<QString> modifiedNameGroups;
removeFromContactNameGroup(iid, group, &modifiedNameGroups);
notifyNameGroupsChanged(modifiedNameGroups);
}
QSet<QString> modifiedNameGroups;
removeFromContactNameGroup(iid, group, &modifiedNameGroups);
notifyNameGroupsChanged(modifiedNameGroups);
}
for (int i = 0; i < models.count(); ++i)
......@@ -1803,9 +1801,7 @@ void SeasideCache::contactsAvailable()
if (item->nameGroup != oldNameGroup) {
if (!ignoreContactForNameGroups(item->contact)) {
addToContactNameGroup(item->iid, item->nameGroup, &modifiedGroups);
if (!oldNameGroup.isNull()) {
removeFromContactNameGroup(item->iid, oldNameGroup, &modifiedGroups);
}
removeFromContactNameGroup(item->iid, oldNameGroup, &modifiedGroups);
}
}
......@@ -2268,9 +2264,7 @@ void SeasideCache::displayLabelOrderChanged()
const QString group(determineNameGroup(&*it));
if (group != it->nameGroup) {
if (!ignoreContactForNameGroups(it->contact)) {
if (!it->nameGroup.isNull()) {
removeFromContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
}
removeFromContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
it->nameGroup = group;
addToContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
......@@ -2345,9 +2339,7 @@ void SeasideCache::groupPropertyChanged()
const QString group(determineNameGroup(&*it));
if (group != it->nameGroup) {
if (!ignoreContactForNameGroups(it->contact)) {
if (!it->nameGroup.isNull()) {
removeFromContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
}
removeFromContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
it->nameGroup = group;
addToContactNameGroup(it->iid, it->nameGroup, &modifiedGroups);
......
Markdown is supported
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