Commit 5b1c8324 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Simplify check if user ID should be checked

parent 75f8a896
......@@ -108,8 +108,9 @@ public:
for (int i = 0; i < rowCount(); ++i) {
const auto &keyUid = keyUids[i];
const bool uidIsChecked = std::find_if(checkedUids.cbegin(), checkedUids.cend(),
[keyUid](const GpgME::UserID &checkedUid) { return uidsAreEqual(keyUid, checkedUid); }) != checkedUids.cend();
const bool uidIsChecked = std::any_of(checkedUids.cbegin(), checkedUids.cend(), [keyUid](const auto &checkedUid) {
return uidsAreEqual(keyUid, checkedUid);
});
item(i)->setCheckState(uidIsChecked ? Qt::Checked : Qt::Unchecked);
}
}
......
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