Commit f59ce86b authored by Lisa's avatar Lisa

Returns a list of unique groups with groups()

parent d0695baf
......@@ -413,8 +413,16 @@ void BackendPrivate::groupQueryFinished()
QFuture< QList< Group* > > const& future = queryGroupFuturePool[uuid]->future();
QList< Group* > result;
/*
* Since the same groups are repeated across different databases,
* avoid adding duplicates to the final list.
*/
foreach (QList< Group* > res, future.results()) {
result += res;
foreach (Group* group, res) {
if (!result.contains(group)) {
result << group;
}
}
}
emit q->queryGroupsCompleted(uuid, result);
......
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