diff options
author | saturneric <[email protected]> | 2023-12-25 12:51:01 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-25 12:51:01 +0000 |
commit | 5260d7a5634279408b3eb36a5f26fe71fb6f9e69 (patch) | |
tree | 670e0878a41e8c6b1651fedbd224bfbea94e0849 /src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp | |
parent | fix: use the new async encrypt symmetric api at gui app (diff) | |
download | GpgFrontend-5260d7a5634279408b3eb36a5f26fe71fb6f9e69.tar.gz GpgFrontend-5260d7a5634279408b3eb36a5f26fe71fb6f9e69.zip |
feat: upgrade basical operations fully to async style and update test cases
Diffstat (limited to 'src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp')
-rw-r--r-- | src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp b/src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp index e9c922ac..449306b7 100644 --- a/src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp +++ b/src/core/function/result_analyse/GpgVerifyResultAnalyse.cpp @@ -38,9 +38,11 @@ GpgFrontend::GpgVerifyResultAnalyse::GpgVerifyResultAnalyse( GpgError error, GpgVerifyResult result) - : error_(error), result_(std::move(result)) {} + : error_(error), result_(result) {} void GpgFrontend::GpgVerifyResultAnalyse::doAnalyse() { + auto *result = this->result_.GetRaw(); + SPDLOG_DEBUG("started"); stream_ << "[#] " << _("Verify Operation") << " "; @@ -53,9 +55,9 @@ void GpgFrontend::GpgVerifyResultAnalyse::doAnalyse() { setStatus(-1); } - if (result_ != nullptr && result_->signatures != nullptr) { + if (result != nullptr && result->signatures != nullptr) { stream_ << "------------>" << std::endl; - auto *sign = result_->signatures; + auto *sign = result->signatures; stream_ << "[>] " << _("Signed On") << "(" << _("UTC") << ")" << " " @@ -210,13 +212,13 @@ auto GpgFrontend::GpgVerifyResultAnalyse::print_signer( auto GpgFrontend::GpgVerifyResultAnalyse::GetSignatures() const -> gpgme_signature_t { - if (result_) { - return result_->signatures; + if (result_.IsGood()) { + return result_.GetRaw()->signatures; } return nullptr; } auto GpgFrontend::GpgVerifyResultAnalyse::TakeChargeOfResult() -> GpgFrontend::GpgVerifyResult { - return std::move(result_); + return result_; } |