diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-16 12:03:45 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-07-16 12:03:45 +0200 |
commit | 1eecf2f59c340685ef7e3e903958df38a3bc391b (patch) | |
tree | ede42646a79a1efe16d3e555f3c9323fe11f712b | |
parent | 074ef023c4c3dfd3005c7671c3e025d97aeeeae4 (diff) | |
download | kube-1eecf2f59c340685ef7e3e903958df38a3bc391b.tar.gz kube-1eecf2f59c340685ef7e3e903958df38a3bc391b.zip |
More encryption state fixes
-rw-r--r-- | components/mailviewer/qml/MailDataModel.qml | 3 | ||||
-rw-r--r-- | framework/src/domain/mime/partmodel.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/components/mailviewer/qml/MailDataModel.qml b/components/mailviewer/qml/MailDataModel.qml index 279c0e95..c78896d3 100644 --- a/components/mailviewer/qml/MailDataModel.qml +++ b/components/mailviewer/qml/MailDataModel.qml | |||
@@ -68,6 +68,7 @@ DelegateModel { | |||
68 | if (!signatureDetails.signatureIsGood && !signatureDetails.keyRevoked && !signatureDetails.keyExpired && !signatureDetails.keyIsTrusted) { | 68 | if (!signatureDetails.signatureIsGood && !signatureDetails.keyRevoked && !signatureDetails.keyExpired && !signatureDetails.keyIsTrusted) { |
69 | details += qsTr("The signature is invalid.") + "\n" | 69 | details += qsTr("The signature is invalid.") + "\n" |
70 | } | 70 | } |
71 | } | ||
71 | return details | 72 | return details |
72 | } | 73 | } |
73 | 74 | ||
@@ -85,7 +86,7 @@ DelegateModel { | |||
85 | color: getColor(model.encryptionSecurityLevel) | 86 | color: getColor(model.encryptionSecurityLevel) |
86 | backgroundOpacity: 0.5 | 87 | backgroundOpacity: 0.5 |
87 | visible: model.encrypted | 88 | visible: model.encrypted |
88 | tooltip: qsTr("This message is encrypted to the key: %1").arg(model.encryptionDetails.keyId); | 89 | tooltip: model.encryptionDetails.keyId == "" ? qsTr("This message is encrypted but we don't have the key for it.") : qsTr("This message is encrypted to the key: %1").arg(model.encryptionDetails.keyId); |
89 | 90 | ||
90 | //FIXME make text copyable | 91 | //FIXME make text copyable |
91 | // Kube.SelectableItem { | 92 | // Kube.SelectableItem { |
diff --git a/framework/src/domain/mime/partmodel.cpp b/framework/src/domain/mime/partmodel.cpp index 02ef2f6d..cbb0cb96 100644 --- a/framework/src/domain/mime/partmodel.cpp +++ b/framework/src/domain/mime/partmodel.cpp | |||
@@ -287,6 +287,9 @@ QVariant PartModel::data(const QModelIndex &index, int role) const | |||
287 | auto encryption = messagePart->encryptionState(); | 287 | auto encryption = messagePart->encryptionState(); |
288 | bool messageIsEncrypted = encryption == MimeTreeParser::KMMsgPartiallyEncrypted || | 288 | bool messageIsEncrypted = encryption == MimeTreeParser::KMMsgPartiallyEncrypted || |
289 | encryption == MimeTreeParser::KMMsgFullyEncrypted; | 289 | encryption == MimeTreeParser::KMMsgFullyEncrypted; |
290 | if (messagePart->error()) { | ||
291 | return "bad"; | ||
292 | } | ||
290 | //All good | 293 | //All good |
291 | if (messageIsEncrypted) { | 294 | if (messageIsEncrypted) { |
292 | return "good"; | 295 | return "good"; |