diff options
author | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-11-07 07:18:06 +0000 |
commit | 3ad7fecdb6458fdd6f146bed19fe643c7f93e905 (patch) | |
tree | 522f7a5dd0389ad0771d01a50ea49ef646940894 /src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp | |
parent | refactor: improve the code structure of core (diff) | |
download | GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.tar.gz GpgFrontend-3ad7fecdb6458fdd6f146bed19fe643c7f93e905.zip |
refactor: remove CommonUtils at core
Diffstat (limited to 'src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp')
-rw-r--r-- | src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp b/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp index 684fff07..9f523330 100644 --- a/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp +++ b/src/core/function/result_analyse/GpgEncryptResultAnalyse.cpp @@ -32,24 +32,24 @@ GpgFrontend::GpgEncryptResultAnalyse::GpgEncryptResultAnalyse( GpgError error, GpgEncrResult result) : error_(error), result_(std::move(result)) {} -void GpgFrontend::GpgEncryptResultAnalyse::do_analyse() { +void GpgFrontend::GpgEncryptResultAnalyse::doAnalyse() { SPDLOG_DEBUG("start encrypt result analyse"); stream_ << "[#] " << _("Encrypt Operation") << " "; - if (gpgme_err_code(error_) == GPG_ERR_NO_ERROR) + if (gpgme_err_code(error_) == GPG_ERR_NO_ERROR) { stream_ << "[" << _("Success") << "]" << std::endl; - else { + } else { stream_ << "[" << _("Failed") << "] " << gpgme_strerror(error_) << std::endl; - set_status(-1); + setStatus(-1); } - if (!~status_) { + if ((~status_) == 0) { stream_ << "------------>" << std::endl; 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) |