diff options
author | Minijackson <minijackson@riseup.net> | 2018-03-08 11:00:33 +0100 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-03-08 16:30:52 +0100 |
commit | bd6e2b880265d01fbb8f4cbeb909ba9dda4f18d2 (patch) | |
tree | d70813d9a3bb2d4767094169fa4af1aec73c11f4 /framework/src/domain/mime/mailtemplates.cpp | |
parent | 0e013fa1b7499e41cedd118a3c73a55e708cc790 (diff) | |
download | kube-bd6e2b880265d01fbb8f4cbeb909ba9dda4f18d2.tar.gz kube-bd6e2b880265d01fbb8f4cbeb909ba9dda4f18d2.zip |
Switching to unique_ptr everywhere (+ fixing micalg)
Diffstat (limited to 'framework/src/domain/mime/mailtemplates.cpp')
-rw-r--r-- | framework/src/domain/mime/mailtemplates.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/src/domain/mime/mailtemplates.cpp b/framework/src/domain/mime/mailtemplates.cpp index 09932e86..997eb3ae 100644 --- a/framework/src/domain/mime/mailtemplates.cpp +++ b/framework/src/domain/mime/mailtemplates.cpp | |||
@@ -1093,13 +1093,12 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
1093 | 1093 | ||
1094 | QByteArray bodyData; | 1094 | QByteArray bodyData; |
1095 | if (!signingKeys.empty() || !encryptionKeys.empty()) { | 1095 | if (!signingKeys.empty() || !encryptionKeys.empty()) { |
1096 | auto result = MailCrypto::processCrypto( | 1096 | auto result = MailCrypto::processCrypto(std::move(bodyPart), signingKeys, encryptionKeys, attachedKey); |
1097 | bodyPart.get(), signingKeys, encryptionKeys, attachedKey); | ||
1098 | if (!result) { | 1097 | if (!result) { |
1099 | qWarning() << "Signing failed"; | 1098 | qWarning() << "Crypto failed"; |
1100 | return {}; | 1099 | return {}; |
1101 | } | 1100 | } |
1102 | bodyData = result->encodedContent(); | 1101 | bodyData = result.value()->encodedContent(); |
1103 | } else { | 1102 | } else { |
1104 | if (!bodyPart->contentType(false)) { | 1103 | if (!bodyPart->contentType(false)) { |
1105 | bodyPart->contentType(true)->setMimeType("text/plain"); | 1104 | bodyPart->contentType(true)->setMimeType("text/plain"); |