aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpg/result_analyse/EncryptResultAnalyse.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-06-09 19:02:41 +0000
committerSaturneric <[email protected]>2021-06-09 19:02:41 +0000
commit7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e (patch)
tree698f2ace3c49453768bf3c85e97069d65700e950 /src/gpg/result_analyse/EncryptResultAnalyse.cpp
parentAdjust the output of analysis results. (diff)
downloadGpgFrontend-7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e.tar.gz
GpgFrontend-7d000da3e8c8a65b43174b5be2edcd4c1bd6c27e.zip
Do not clear the text when the decryption operation fails.
Add decrypt and verify operation. Change the icon further. Fix the function of importing from the key server. Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r--src/gpg/result_analyse/EncryptResultAnalyse.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/gpg/result_analyse/EncryptResultAnalyse.cpp b/src/gpg/result_analyse/EncryptResultAnalyse.cpp
index f41b88a5..8cdd7750 100644
--- a/src/gpg/result_analyse/EncryptResultAnalyse.cpp
+++ b/src/gpg/result_analyse/EncryptResultAnalyse.cpp
@@ -6,10 +6,6 @@
EncryptResultAnalyse::EncryptResultAnalyse(gpgme_error_t error, gpgme_encrypt_result_t result) {
- if(result == nullptr) {
- return;
- }
-
stream << "# Encrypt Report: " << endl << "-----" << endl;
if(gpgme_err_code(error) == GPG_ERR_NO_ERROR) {
@@ -17,15 +13,17 @@ EncryptResultAnalyse::EncryptResultAnalyse(gpgme_error_t error, gpgme_encrypt_re
}
else {
stream << "Status:" << gpgme_strerror(error) << endl;
- stream << "Invalid Recipients: " << endl;
- setStatus(0);
- auto inv_reci = result->invalid_recipients;
- while(inv_reci != nullptr) {
- stream << "Fingerprint: " << inv_reci->fpr << endl;
- stream << "Reason: " << gpgme_strerror(inv_reci->reason) << endl;
- stream << endl;
-
- inv_reci = inv_reci->next;
+ setStatus(-1);
+ if (result != nullptr) {
+ stream << "Invalid Recipients: " << endl;
+ auto inv_reci = result->invalid_recipients;
+ while (inv_reci != nullptr) {
+ stream << "Fingerprint: " << inv_reci->fpr << endl;
+ stream << "Reason: " << gpgme_strerror(inv_reci->reason) << endl;
+ stream << endl;
+
+ inv_reci = inv_reci->next;
+ }
}
}