From 8f1844b23ea137e645800c8ed0ec5a50f33787fe Mon Sep 17 00:00:00 2001 From: saturneric Date: Sun, 24 Dec 2023 14:55:40 +0800 Subject: fix: test the encrypt async api on gui app --- .../function/result_analyse/GpgEncryptResultAnalyse.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp') 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 -- cgit v1.2.3