aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgContext.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-04-08 08:58:02 +0000
committerGitHub <[email protected]>2023-04-08 08:58:02 +0000
commit344096f325d686cf9810df6764fdb10ec8709d4a (patch)
treec629f58099a7e01084cb0fc09a165e1cf858ed9e /src/core/GpgContext.cpp
parentMerge pull request #95 from saturneric/dev/2.1.0/main (diff)
parentfeat: update the online translation way (diff)
downloadGpgFrontend-344096f325d686cf9810df6764fdb10ec8709d4a.tar.gz
GpgFrontend-344096f325d686cf9810df6764fdb10ec8709d4a.zip
Merge pull request #96 from saturneric/dev/2.1.0/main
Develop 2.1.1.2
Diffstat (limited to 'src/core/GpgContext.cpp')
-rw-r--r--src/core/GpgContext.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/core/GpgContext.cpp b/src/core/GpgContext.cpp
index 47ff77c4..1cb137e6 100644
--- a/src/core/GpgContext.cpp
+++ b/src/core/GpgContext.cpp
@@ -30,6 +30,7 @@
#include <gpg-error.h>
#include <gpgme.h>
+#include <spdlog/spdlog.h>
#include <unistd.h>
#include <mutex>
@@ -37,14 +38,11 @@
#include <string>
#include "core/GpgConstants.h"
-#include "core/GpgModel.h"
#include "core/common/CoreCommonUtil.h"
#include "core/function/CoreSignalStation.h"
-#include "core/function/GlobalSettingStation.h"
#include "core/function/gpg/GpgCommandExecutor.h"
+#include "core/thread/Task.h"
#include "core/thread/TaskRunnerGetter.h"
-#include "spdlog/spdlog.h"
-#include "thread/Task.h"
#ifdef _WIN32
#include <windows.h>
@@ -232,19 +230,8 @@ void GpgContext::post_init_ctx() {
// preload info
auto &info = GetInfo();
- auto &settings = GlobalSettingStation::GetInstance().GetUISettings();
-
- bool use_pinentry_as_password_input_dialog = false;
- try {
- use_pinentry_as_password_input_dialog =
- settings.lookup("general.use_pinentry_as_password_input_dialog");
- } catch (...) {
- SPDLOG_ERROR(
- "setting operation error: use_pinentry_as_password_input_dialog");
- }
-
// use custom qt dialog to replace pinentry
- if (!use_pinentry_as_password_input_dialog) {
+ if (!args_.use_pinentry) {
SetPassphraseCb(custom_passphrase_cb);
}