aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/settings/SettingsGeneral.cpp
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2024-05-11 17:18:36 +0000
committerGitHub <[email protected]>2024-05-11 17:18:36 +0000
commitf909f2c4c35b187eb165ec5545e35d54c6d92bf3 (patch)
tree428fe9e63ecae6bb93be6f20cd2b1ee9b29ffd8d /src/ui/dialog/settings/SettingsGeneral.cpp
parentMerge pull request #145 from jermanuts/jermanuts-wizard-links-update (diff)
parentfix: remove qt5compat and redirect dll output path of modules (diff)
downloadGpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.tar.gz
GpgFrontend-f909f2c4c35b187eb165ec5545e35d54c6d92bf3.zip
Merge pull request #148 from saturneric/develop
Develop 2.1.3.1
Diffstat (limited to 'src/ui/dialog/settings/SettingsGeneral.cpp')
-rw-r--r--src/ui/dialog/settings/SettingsGeneral.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/ui/dialog/settings/SettingsGeneral.cpp b/src/ui/dialog/settings/SettingsGeneral.cpp
index bcf42867..9764b747 100644
--- a/src/ui/dialog/settings/SettingsGeneral.cpp
+++ b/src/ui/dialog/settings/SettingsGeneral.cpp
@@ -73,7 +73,7 @@ GeneralTab::GeneralTab(QWidget* parent)
ui_->langSelectBox->addItem(l);
}
connect(ui_->langSelectBox, qOverload<int>(&QComboBox::currentIndexChanged),
- this, &GeneralTab::slot_language_changed);
+ this, &GeneralTab::SignalRestartNeeded);
connect(ui_->clearAllLogFilesButton, &QPushButton::clicked, this, [=]() {
GlobalSettingStation::GetInstance().ClearAllLogFiles();
@@ -109,28 +109,28 @@ GeneralTab::GeneralTab(QWidget* parent)
void GeneralTab::SetSettings() {
auto settings = GlobalSettingStation::GetInstance().GetSettings();
- bool clear_gpg_password_cache =
+ auto clear_gpg_password_cache =
settings.value("basic/clear_gpg_password_cache", true).toBool();
ui_->clearGpgPasswordCacheCheckBox->setCheckState(
clear_gpg_password_cache ? Qt::Checked : Qt::Unchecked);
- bool restore_text_editor_page =
+ auto restore_text_editor_page =
settings.value("basic/restore_text_editor_page", true).toBool();
ui_->restoreTextEditorPageCheckBox->setCheckState(
restore_text_editor_page ? Qt::Checked : Qt::Unchecked);
- bool longer_expiration_date =
+ auto longer_expiration_date =
settings.value("basic/longer_expiration_date", false).toBool();
ui_->longerKeyExpirationDateCheckBox->setCheckState(
longer_expiration_date ? Qt::Checked : Qt::Unchecked);
- bool confirm_import_keys =
+ auto confirm_import_keys =
settings.value("basic/confirm_import_keys", false).toBool();
ui_->importConfirmationCheckBox->setCheckState(
confirm_import_keys ? Qt::Checked : Qt::Unchecked);
- QString lang_key = settings.value("basic/lang").toString();
- QString lang_value = lang_.value(lang_key);
+ auto lang_key = settings.value("basic/lang").toString();
+ auto lang_value = lang_.value(lang_key);
GF_UI_LOG_DEBUG("lang settings current: {}", lang_value);
if (!lang_.empty()) {
ui_->langSelectBox->setCurrentIndex(
@@ -155,6 +155,4 @@ void GeneralTab::ApplySettings() {
settings.setValue("basic/lang", lang_.key(ui_->langSelectBox->currentText()));
}
-void GeneralTab::slot_language_changed() { emit SignalRestartNeeded(true); }
-
} // namespace GpgFrontend::UI