diff options
author | saturneric <[email protected]> | 2024-01-15 17:02:40 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-15 17:02:40 +0000 |
commit | d54f52ce70cba15f5199e93d3c6fb122143b0526 (patch) | |
tree | f75224f8d020c4c7498bd1ffb97c834e12ec8a2c /src/core/GpgCoreInit.cpp | |
parent | fix: clean up useless code and make life easier (diff) | |
download | GpgFrontend-d54f52ce70cba15f5199e93d3c6fb122143b0526.tar.gz GpgFrontend-d54f52ce70cba15f5199e93d3c6fb122143b0526.zip |
refactor: remove libconfig++ form project
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index 40e6d9f1..a30a407a 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -203,34 +203,37 @@ void InitGpgFrontendCore(CoreInitArgs args) { .GetTaskRunner(Thread::TaskRunnerGetter::kTaskRunnerType_Default) ->PostTask(new Thread::Task( [args](const DataObjectPtr&) -> int { + auto settings = GlobalSettingStation::GetInstance().GetSettings(); // read settings from config file auto forbid_all_gnupg_connection = - GlobalSettingStation::GetInstance().LookupSettings( - "network.forbid_all_gnupg_connection", false); + settings.value("network/forbid_all_gnupg_connection", false) + .toBool(); auto auto_import_missing_key = - GlobalSettingStation::GetInstance().LookupSettings( - "network.auto_import_missing_key", false); + settings.value("network/auto_import_missing_key", false) + .toBool(); auto use_custom_key_database_path = - GlobalSettingStation::GetInstance().LookupSettings( - "general.use_custom_key_database_path", false); + settings.value("general/use_custom_key_database_path", false) + .toBool(); auto custom_key_database_path = - GlobalSettingStation::GetInstance().LookupSettings( - "general.custom_key_database_path", QString{}); + settings.value("general/custom_key_database_path", QString{}) + .toString(); auto use_custom_gnupg_install_path = - GlobalSettingStation::GetInstance().LookupSettings( - "general.use_custom_gnupg_install_path", false); + settings.value("general/use_custom_gnupg_install_path", false) + .toBool(); auto custom_gnupg_install_path = - GlobalSettingStation::GetInstance().LookupSettings( - "general.custom_gnupg_install_path", QString{}); + settings.value("general/custom_gnupg_install_path", QString{}) + .toString(); auto use_pinentry_as_password_input_dialog = - GpgFrontend::GlobalSettingStation::GetInstance().LookupSettings( - "general.use_pinentry_as_password_input_dialog", false); + settings + .value("general/use_pinentry_as_password_input_dialog", + false) + .toBool(); GF_CORE_LOG_DEBUG("core loaded if use custom key databse path: {}", use_custom_key_database_path); |