diff options
author | saturneric <[email protected]> | 2024-07-28 16:00:30 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-28 16:00:30 +0000 |
commit | cb626d06dee921426a2ea97662f6237e21a8781b (patch) | |
tree | a6724ad799695c9b6b807c4e637a69842a82549a /src/core/module/ModuleManager.cpp | |
parent | feat: search for keywords in all uids (diff) | |
download | GpgFrontend-cb626d06dee921426a2ea97662f6237e21a8781b.tar.gz GpgFrontend-cb626d06dee921426a2ea97662f6237e21a8781b.zip |
feat: user can prevent all modules
Diffstat (limited to 'src/core/module/ModuleManager.cpp')
-rw-r--r-- | src/core/module/ModuleManager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/module/ModuleManager.cpp b/src/core/module/ModuleManager.cpp index 51611a72..d575d40c 100644 --- a/src/core/module/ModuleManager.cpp +++ b/src/core/module/ModuleManager.cpp @@ -31,6 +31,7 @@ #include <memory> #include <utility> +#include "core/function/GlobalSettingStation.h" #include "core/function/SecureMemoryAllocator.h" #include "core/function/basic/GpgFunctionObject.h" #include "core/model/SettingsObject.h" @@ -54,6 +55,14 @@ class ModuleManager::Impl { auto LoadAndRegisterModule(const QString& module_library_path, bool integrated_module) -> void { + // give user ability to give up all modules + auto disable_loading_all_modules = + GlobalSettingStation::GetInstance() + .GetSettings() + .value("basic/disable_loading_all_modules", false) + .toBool(); + if (disable_loading_all_modules) return; + Thread::TaskRunnerGetter::GetInstance() .GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default) ->PostTask(new Thread::Task( |