aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-05-03 15:13:14 +0000
committersaturneric <[email protected]>2024-05-03 15:13:14 +0000
commit3d3c3d954bd2e8422e1ee3c0ba767993de1e4615 (patch)
tree6bdcf066f44390cfd90d904065099a32486a62cf /src/core/GpgCoreInit.cpp
parentfix: min size of main windows is 640 * 480 (diff)
downloadGpgFrontend-3d3c3d954bd2e8422e1ee3c0ba767993de1e4615.tar.gz
GpgFrontend-3d3c3d954bd2e8422e1ee3c0ba767993de1e4615.zip
feat: add option to close all gnupg daemon at close
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index 42991564..2952d6e4 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -45,7 +45,17 @@
namespace GpgFrontend {
-void DestroyGpgFrontendCore() { SingletonStorageCollection::Destroy(); }
+void DestroyGpgFrontendCore() {
+ // kill all daemon if necessary
+ auto settings = GlobalSettingStation::GetInstance().GetSettings();
+ auto kill_all_gnupg_daemon_at_close =
+ settings.value("gnupg/kill_all_gnupg_daemon_at_close", false).toBool();
+ if (kill_all_gnupg_daemon_at_close) {
+ GpgAdvancedOperator::KillAllGpgComponents();
+ }
+
+ SingletonStorageCollection::Destroy();
+}
auto VerifyGpgconfPath(const QFileInfo& gnupg_install_fs_path) -> bool {
return gnupg_install_fs_path.isAbsolute() && gnupg_install_fs_path.exists() &&