diff options
author | saturneric <[email protected]> | 2023-12-24 06:55:40 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-24 06:55:40 +0000 |
commit | 8f1844b23ea137e645800c8ed0ec5a50f33787fe (patch) | |
tree | 31ee73588483de365654f638478ccb7a11c0a188 /src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp | |
parent | fix: test the initialization of gui application (diff) | |
download | GpgFrontend-8f1844b23ea137e645800c8ed0ec5a50f33787fe.tar.gz GpgFrontend-8f1844b23ea137e645800c8ed0ec5a50f33787fe.zip |
fix: test the encrypt async api on gui app
Diffstat (limited to 'src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp')
-rw-r--r-- | src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp b/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp index 9f523330..80ec6233 100644 --- a/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp +++ b/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp @@ -28,9 +28,13 @@ #include "GpgEncryptResultAnalyse.h" +#include "core/model/GpgEncryptResult.h" + +namespace GpgFrontend { + GpgFrontend::GpgEncryptResultAnalyse::GpgEncryptResultAnalyse( - GpgError error, GpgEncrResult result) - : error_(error), result_(std::move(result)) {} + GpgError error, GpgEncryptResult result) + : error_(error), result_(result) {} void GpgFrontend::GpgEncryptResultAnalyse::doAnalyse() { SPDLOG_DEBUG("start encrypt result analyse"); @@ -47,9 +51,11 @@ void GpgFrontend::GpgEncryptResultAnalyse::doAnalyse() { if ((~status_) == 0) { stream_ << "------------>" << std::endl; - if (result_ != nullptr) { + + const auto *result = result_.GetRaw(); + if (result != nullptr) { stream_ << _("Invalid Recipients") << ": " << std::endl; - auto *inv_reci = result_->invalid_recipients; + auto *inv_reci = result->invalid_recipients; while (inv_reci != nullptr) { stream_ << _("Fingerprint") << ": " << inv_reci->fpr << std::endl; stream_ << _("Reason") << ": " << gpgme_strerror(inv_reci->reason) @@ -64,3 +70,5 @@ void GpgFrontend::GpgEncryptResultAnalyse::doAnalyse() { stream_ << std::endl; } + +} // namespace GpgFrontend
\ No newline at end of file |