aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/settings/SettingsGeneral.cpp
diff options
context:
space:
mode:
authorSaturneric <[email protected]>2021-08-23 08:20:19 +0000
committerSaturneric <[email protected]>2021-08-23 08:20:19 +0000
commitbe69cccea41c17214631529cd265476d31dc3406 (patch)
treed8d36c2a85b5d3ab89f2ce011b7b5ff3294bf1dc /src/ui/settings/SettingsGeneral.cpp
parentFunctions addition and improvement; (diff)
downloadGpgFrontend-be69cccea41c17214631529cd265476d31dc3406.tar.gz
GpgFrontend-be69cccea41c17214631529cd265476d31dc3406.zip
Improve the automatic key exchange function; fix some known problems;
Diffstat (limited to '')
-rw-r--r--src/ui/settings/SettingsGeneral.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ui/settings/SettingsGeneral.cpp b/src/ui/settings/SettingsGeneral.cpp
index 0e9d9de7..b4372506 100644
--- a/src/ui/settings/SettingsGeneral.cpp
+++ b/src/ui/settings/SettingsGeneral.cpp
@@ -43,10 +43,6 @@ GeneralTab::GeneralTab(GpgME::GpgContext *ctx, QWidget *parent)
serverBoxLayout->addWidget(serverSelectBox);
serverBoxLayout->addWidget(new QLabel(
tr("Server that provides short key and key exchange services")));
- connect(serverSelectBox, QOverload<const QString &>::of(&QComboBox::currentTextChanged),
- this, [&](const QString &current) -> void {
- settings.setValue("general/currentGpgfrontendServer", current);
- });
serverBox->setLayout(serverBoxLayout);
@@ -161,9 +157,16 @@ void GeneralTab::setSettings() {
}
for (const auto &s : serverList)
serverSelectBox->addItem(s);
+
+ qDebug() << "currentGpgfrontendServer" << settings.value("general/currentGpgfrontendServer").toString();
serverSelectBox->setCurrentText(settings.value("general/currentGpgfrontendServer",
"service.gpgfrontend.pub").toString());
+ connect(serverSelectBox, QOverload<const QString &>::of(&QComboBox::currentTextChanged),
+ this, [&](const QString &current) -> void {
+ settings.setValue("general/currentGpgfrontendServer", current);
+ });
+
// Language setting
QString langKey = settings.value("int/lang").toString();
QString langValue = lang.value(langKey);
@@ -201,6 +204,7 @@ void GeneralTab::applySettings() {
settings.setValue("keys/saveKeyChecked",
saveCheckedKeysCheckBox->isChecked());
+ qDebug() << "serverSelectBox currentText" << serverSelectBox->currentText();
settings.setValue("general/currentGpgfrontendServer",
serverSelectBox->currentText());