aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/settings/SettingsGeneral.cpp
diff options
context:
space:
mode:
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