Commit 40ea5a67 authored by Sandro Knauß's avatar Sandro Knauß 🐝
Browse files

Use for loop instead of iterate via index.

parent ca9b12cf
......@@ -880,11 +880,11 @@ void SignedMessagePart::sigStatusToMetaData()
if (key.numUserIDs() > 0 && key.userID(0).id()) {
partMetaData()->signer = prettifyDN(key.userID(0).id());
}
for (uint iMail = 0; iMail < key.numUserIDs(); ++iMail) {
for (const auto &uid: key.userIDs()) {
// The following if /should/ always result in TRUE but we
// won't trust implicitly the plugin that gave us these data.
if (key.userID(iMail).email()) {
QString email = QString::fromUtf8(key.userID(iMail).email());
if (uid.email()) {
QString email = QString::fromUtf8(uid.email());
if (!email.isEmpty()) {
partMetaData()->signerMailAddresses.append(email);
}
......
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