mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Add edit finished signal to settings widget.
This commit is contained in:
parent
f53768fc84
commit
6cd65ae9a7
@ -77,8 +77,7 @@ MainWindow::MainWindow()
|
||||
connect(m_ui->tabWidget, SIGNAL(currentChanged(int)),
|
||||
SLOT(updateWindowTitle()));
|
||||
connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(setMenuActionState()));
|
||||
connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(switchToDatabases()));
|
||||
connect(m_ui->settingsWidget, SIGNAL(rejected()), SLOT(switchToDatabases()));
|
||||
connect(m_ui->settingsWidget, SIGNAL(editFinished(bool)), SLOT(switchToDatabases()));
|
||||
|
||||
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), SLOT(switchToDatabases()));
|
||||
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), m_ui->tabWidget,
|
||||
|
@ -31,6 +31,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
||||
add(tr("Security"), m_secWidget);
|
||||
|
||||
connect(this, SIGNAL(accepted()), SLOT(saveSettings()));
|
||||
connect(this, SIGNAL(rejected()), SLOT(reject()));
|
||||
|
||||
connect(m_secUi->clearClipboardCheckBox, SIGNAL(toggled(bool)),
|
||||
m_secUi->clearClipboardSpinBox, SLOT(setEnabled(bool)));
|
||||
@ -52,4 +53,11 @@ void SettingsWidget::saveSettings()
|
||||
{
|
||||
config()->set("security/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
||||
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
||||
|
||||
Q_EMIT editFinished(true);
|
||||
}
|
||||
|
||||
void SettingsWidget::reject()
|
||||
{
|
||||
Q_EMIT editFinished(false);
|
||||
}
|
||||
|
@ -33,8 +33,12 @@ public:
|
||||
~SettingsWidget();
|
||||
void loadSettings();
|
||||
|
||||
Q_SIGNALS:
|
||||
void editFinished(bool accepted);
|
||||
|
||||
private Q_SLOTS:
|
||||
void saveSettings();
|
||||
void reject();
|
||||
|
||||
private:
|
||||
QWidget* const m_secWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user