summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-11 22:48:15 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-06-11 22:49:59 +0200
commit5b890c4bda394d8c83f089417706d334595f908f (patch)
tree296cba8835370c549117c4d5a0df8bcc6bb7e577
parente331c1cd5fc25e814a849d2db5c0beaf0024a47c (diff)
downloadkube-5b890c4bda394d8c83f089417706d334595f908f.tar.gz
kube-5b890c4bda394d8c83f089417706d334595f908f.zip
Translate the enum instead
-rw-r--r--framework/src/domain/mime/partmodel.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/framework/src/domain/mime/partmodel.cpp b/framework/src/domain/mime/partmodel.cpp
index a87a60df..c6d7dcf5 100644
--- a/framework/src/domain/mime/partmodel.cpp
+++ b/framework/src/domain/mime/partmodel.cpp
@@ -182,8 +182,17 @@ QVariant PartModel::data(const QModelIndex &index, int role) const
182 return messagePart->signatureState() != MimeTreeParser::KMMsgNotSigned; 182 return messagePart->signatureState() != MimeTreeParser::KMMsgNotSigned;
183 case EncryptionErrorType: 183 case EncryptionErrorType:
184 return messagePart->error(); 184 return messagePart->error();
185 case EncryptionErrorString: 185 case EncryptionErrorString: {
186 switch (messagePart->error()) {
187 case MimeTreeParser::MessagePart::NoKeyError:
188 return tr("No key available.");
189 case MimeTreeParser::MessagePart::PassphraseError:
190 return tr("Wrong passphrase.");
191 case MimeTreeParser::MessagePart::UnknownError:
192 break;
193 }
186 return messagePart->errorString(); 194 return messagePart->errorString();
195 }
187 } 196 }
188 } 197 }
189 return QVariant(); 198 return QVariant();