aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/controller
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-01-27 15:51:27 +0000
committersaturneric <[email protected]>2025-01-27 15:51:27 +0000
commit5d2b02097eeb6ed166611a22cef66a8c56b7c997 (patch)
treed785a00dc2acbb8f6c5212eac6bdcebeb388b776 /src/ui/dialog/controller
parentfix: kill all gnupg daemons in a proper way (diff)
downloadGpgFrontend-5d2b02097eeb6ed166611a22cef66a8c56b7c997.tar.gz
GpgFrontend-5d2b02097eeb6ed166611a22cef66a8c56b7c997.zip
refactor: clean up code
Diffstat (limited to 'src/ui/dialog/controller')
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp10
-rw-r--r--src/ui/dialog/controller/ModuleControllerDialog.cpp5
2 files changed, 4 insertions, 11 deletions
diff --git a/src/ui/dialog/controller/GnuPGControllerDialog.cpp b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
index bedfc5de..e68e208a 100644
--- a/src/ui/dialog/controller/GnuPGControllerDialog.cpp
+++ b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
@@ -204,10 +204,7 @@ void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label(
if (custom_gnupg_path_.isEmpty()) {
// read from settings file
QString custom_gnupg_install_path =
- GlobalSettingStation::GetInstance()
- .GetSettings()
- .value("gnupg/custom_gnupg_install_path")
- .toString();
+ GetSettings().value("gnupg/custom_gnupg_install_path").toString();
custom_gnupg_path_ = custom_gnupg_install_path;
}
@@ -232,7 +229,7 @@ void GnuPGControllerDialog::slot_update_custom_gnupg_install_path_label(
}
void GnuPGControllerDialog::set_settings() {
- auto settings = GlobalSettingStation::GetInstance().GetSettings();
+ auto settings = GetSettings();
auto non_ascii_at_file_operation =
settings.value("gnupg/non_ascii_at_file_operation", true).toBool();
@@ -285,8 +282,7 @@ void GnuPGControllerDialog::set_settings() {
}
void GnuPGControllerDialog::apply_settings() {
- auto settings =
- GpgFrontend::GlobalSettingStation::GetInstance().GetSettings();
+ auto settings = GpgFrontend::GetSettings();
settings.setValue("gnupg/non_ascii_at_file_operation",
ui_->asciiModeCheckBox->isChecked());
diff --git a/src/ui/dialog/controller/ModuleControllerDialog.cpp b/src/ui/dialog/controller/ModuleControllerDialog.cpp
index 77949a61..2b842c7f 100644
--- a/src/ui/dialog/controller/ModuleControllerDialog.cpp
+++ b/src/ui/dialog/controller/ModuleControllerDialog.cpp
@@ -108,10 +108,7 @@ ModuleControllerDialog::ModuleControllerDialog(QWidget* parent)
// give user ability to give up all modules
auto disable_loading_all_modules =
- GlobalSettingStation::GetInstance()
- .GetSettings()
- .value("basic/disable_loading_all_modules", false)
- .toBool();
+ GetSettings().value("basic/disable_loading_all_modules", false).toBool();
if (disable_loading_all_modules) {
ui_->tabWidget->setTabEnabled(0, false);
}