Fix apply button on settings window

This commit is contained in:
Weslly 2017-06-28 13:53:02 -03:00
parent 0359c1845a
commit 2822f5fd0a
3 changed files with 4 additions and 7 deletions

View File

@ -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()));

View File

@ -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)

View File

@ -46,9 +46,6 @@ public:
void addSettingsPage(ISettingsPage * page);
void loadSettings();
signals:
void editFinished(bool accepted);
private slots:
void saveSettings();
void reject();