diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 7027d94c2..0d40e89e8 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -240,8 +240,10 @@ MainWindow::MainWindow() SLOT(databaseStatusChanged(DatabaseWidget*))); connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(setMenuActionState())); connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(updateWindowTitle())); - connect(m_ui->settingsWidget, SIGNAL(editFinished(bool)), SLOT(switchToDatabases())); connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(applySettingsChanges())); + connect(m_ui->settingsWidget, SIGNAL(apply()), SLOT(applySettingsChanges())); + connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(switchToDatabases())); + connect(m_ui->settingsWidget, SIGNAL(rejected()), SLOT(switchToDatabases())); connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), m_ui->tabWidget, SLOT(newDatabase())); diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index e8fe9fcb9..185372beb 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -68,6 +68,7 @@ SettingsWidget::SettingsWidget(QWidget* parent) } connect(this, SIGNAL(accepted()), SLOT(saveSettings())); + connect(this, SIGNAL(apply()), SLOT(saveSettings())); connect(this, SIGNAL(rejected()), SLOT(reject())); connect(m_generalUi->autoSaveAfterEveryChangeCheckBox, SIGNAL(toggled(bool)), @@ -213,8 +214,6 @@ void SettingsWidget::saveSettings() for (const ExtraPage& page: asConst(m_extraPages)) { page.saveSettings(); } - - emit editFinished(true); } void SettingsWidget::reject() @@ -224,7 +223,6 @@ void SettingsWidget::reject() autoType()->registerGlobalShortcut(m_globalAutoTypeKey, m_globalAutoTypeModifiers); } - emit editFinished(false); } void SettingsWidget::enableAutoSaveOnExit(bool checked) diff --git a/src/gui/SettingsWidget.h b/src/gui/SettingsWidget.h index f2fc9f2db..27566037d 100644 --- a/src/gui/SettingsWidget.h +++ b/src/gui/SettingsWidget.h @@ -46,9 +46,6 @@ public: void addSettingsPage(ISettingsPage * page); void loadSettings(); -signals: - void editFinished(bool accepted); - private slots: void saveSettings(); void reject();