aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-12-02 22:53:51 +0000
committersaturneric <[email protected]>2024-12-02 22:53:51 +0000
commit78a5ece0391cb0e8cecde95f43afe4479a6709ab (patch)
tree9114b46fb28d58ef63546a78994cc23b6caa909a /src/core/GpgCoreInit.cpp
parentfix: solve memory issues of sdk apis (diff)
downloadGpgFrontend-78a5ece0391cb0e8cecde95f43afe4479a6709ab.tar.gz
GpgFrontend-78a5ece0391cb0e8cecde95f43afe4479a6709ab.zip
fix: discovered issues
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index 9ebc9622..0659377a 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -47,17 +47,7 @@
namespace GpgFrontend {
-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();
-}
+void DestroyGpgFrontendCore() { SingletonStorageCollection::Destroy(); }
auto VerifyGpgconfPath(const QFileInfo& gnupg_install_fs_path) -> bool {
return gnupg_install_fs_path.isAbsolute() && gnupg_install_fs_path.exists() &&
@@ -651,7 +641,7 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int {
.GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default)
->PostTask(task);
- if (restart_all_gnupg_components_on_start) {
+ if (!args.unit_test_mode && restart_all_gnupg_components_on_start) {
GpgAdvancedOperator::RestartGpgComponents();
}
return 0;