mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 00:39:43 -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)),
|
connect(m_ui->tabWidget, SIGNAL(currentChanged(int)),
|
||||||
SLOT(updateWindowTitle()));
|
SLOT(updateWindowTitle()));
|
||||||
connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(setMenuActionState()));
|
connect(m_ui->stackedWidget, SIGNAL(currentChanged(int)), SLOT(setMenuActionState()));
|
||||||
connect(m_ui->settingsWidget, SIGNAL(accepted()), SLOT(switchToDatabases()));
|
connect(m_ui->settingsWidget, SIGNAL(editFinished(bool)), SLOT(switchToDatabases()));
|
||||||
connect(m_ui->settingsWidget, SIGNAL(rejected()), SLOT(switchToDatabases()));
|
|
||||||
|
|
||||||
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), SLOT(switchToDatabases()));
|
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), SLOT(switchToDatabases()));
|
||||||
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), m_ui->tabWidget,
|
connect(m_ui->actionDatabaseNew, SIGNAL(triggered()), m_ui->tabWidget,
|
||||||
|
@ -31,6 +31,7 @@ SettingsWidget::SettingsWidget(QWidget* parent)
|
|||||||
add(tr("Security"), m_secWidget);
|
add(tr("Security"), m_secWidget);
|
||||||
|
|
||||||
connect(this, SIGNAL(accepted()), SLOT(saveSettings()));
|
connect(this, SIGNAL(accepted()), SLOT(saveSettings()));
|
||||||
|
connect(this, SIGNAL(rejected()), SLOT(reject()));
|
||||||
|
|
||||||
connect(m_secUi->clearClipboardCheckBox, SIGNAL(toggled(bool)),
|
connect(m_secUi->clearClipboardCheckBox, SIGNAL(toggled(bool)),
|
||||||
m_secUi->clearClipboardSpinBox, SLOT(setEnabled(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/clearclipboard", m_secUi->clearClipboardCheckBox->isChecked());
|
||||||
config()->set("security/clearclipboardtimeout", m_secUi->clearClipboardSpinBox->value());
|
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();
|
~SettingsWidget();
|
||||||
void loadSettings();
|
void loadSettings();
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void editFinished(bool accepted);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
|
void reject();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget* const m_secWidget;
|
QWidget* const m_secWidget;
|
||||||
|
Loading…
Reference in New Issue
Block a user