diff options
author | saturneric <[email protected]> | 2024-08-05 16:55:32 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-08-05 16:55:32 +0000 |
commit | 795a81bd1edad59ef51e73157b5ad68cfa30e328 (patch) | |
tree | fd9c4da2f1389f0a236d806e005cabb9f5ceab41 /src/core/function/gpg | |
parent | fix: build pipeline (diff) | |
parent | fix: unchecking some check boxes at gnupg controller will not restart (diff) | |
download | GpgFrontend-2.1.4.tar.gz GpgFrontend-2.1.4.zip |
fix: according to issues and test, apply some fixesv2.1.4
Diffstat (limited to 'src/core/function/gpg')
-rw-r--r-- | src/core/function/gpg/GpgContext.cpp | 10 | ||||
-rw-r--r-- | src/core/function/gpg/GpgContext.h | 3 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/core/function/gpg/GpgContext.cpp b/src/core/function/gpg/GpgContext.cpp index 2d9c5992..a661f183 100644 --- a/src/core/function/gpg/GpgContext.cpp +++ b/src/core/function/gpg/GpgContext.cpp @@ -236,11 +236,10 @@ class GpgContext::Impl { const GpgContextInitArgs &args) -> bool { assert(ctx != nullptr); - if (args.custom_gpgconf && !args.custom_gpgconf_path.isEmpty()) { - LOG_D() << "set custom gpgconf path: " << args.custom_gpgconf_path; - auto err = - gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_GPGCONF, - args.custom_gpgconf_path.toUtf8(), nullptr); + if (!args.gpgconf_path.isEmpty()) { + LOG_D() << "set custom gpgconf path: " << args.gpgconf_path; + auto err = gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_GPGCONF, + args.gpgconf_path.toUtf8(), nullptr); if (CheckGpgError(err) != GPG_ERR_NO_ERROR) { LOG_W() << "set gpg context engine info error: " @@ -284,6 +283,7 @@ class GpgContext::Impl { // set custom gpg key db path if (!args_.db_path.isEmpty()) { + LOG_D() << "set context database path to" << args_.db_path; Module::UpsertRTValue("core", "gpgme.ctx.database_path", args_.db_path); } diff --git a/src/core/function/gpg/GpgContext.h b/src/core/function/gpg/GpgContext.h index 7a7ef24b..1ff22b8a 100644 --- a/src/core/function/gpg/GpgContext.h +++ b/src/core/function/gpg/GpgContext.h @@ -46,8 +46,7 @@ struct GpgContextInitArgs { bool offline_mode = false; ///< bool auto_import_missing_key = false; ///< - bool custom_gpgconf = false; ///< - QString custom_gpgconf_path; ///< + QString gpgconf_path; ///< bool use_pinentry = false; ///< }; |