mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Clear database open dialog before and after merging a database (#958)
This commit is contained in:
parent
daef0a358c
commit
df3051038e
@ -119,6 +119,18 @@ void DatabaseOpenWidget::load(const QString& filename)
|
||||
m_ui->editPassword->setFocus();
|
||||
}
|
||||
|
||||
void DatabaseOpenWidget::clearForms()
|
||||
{
|
||||
m_ui->editPassword->clear();
|
||||
m_ui->comboKeyFile->clear();
|
||||
m_ui->checkPassword->setChecked(false);
|
||||
m_ui->checkKeyFile->setChecked(false);
|
||||
m_ui->checkChallengeResponse->setChecked(false);
|
||||
m_ui->buttonTogglePassword->setChecked(false);
|
||||
m_db = nullptr;
|
||||
}
|
||||
|
||||
|
||||
Database* DatabaseOpenWidget::database()
|
||||
{
|
||||
return m_db;
|
||||
|
@ -39,6 +39,7 @@ public:
|
||||
explicit DatabaseOpenWidget(QWidget* parent = nullptr);
|
||||
~DatabaseOpenWidget();
|
||||
void load(const QString& filename);
|
||||
void clearForms();
|
||||
void enterKey(const QString& pw, const QString& keyFile);
|
||||
Database* database();
|
||||
|
||||
|
@ -813,6 +813,7 @@ void DatabaseWidget::mergeDatabase(bool accepted)
|
||||
m_db->merge(srcDb);
|
||||
}
|
||||
|
||||
m_databaseOpenMergeWidget->clearForms();
|
||||
setCurrentWidget(m_mainWidget);
|
||||
emit databaseMerged(m_db);
|
||||
}
|
||||
@ -918,6 +919,7 @@ void DatabaseWidget::switchToImportCsv(const QString& fileName)
|
||||
|
||||
void DatabaseWidget::switchToOpenMergeDatabase(const QString& fileName)
|
||||
{
|
||||
m_databaseOpenMergeWidget->clearForms();
|
||||
m_databaseOpenMergeWidget->load(fileName);
|
||||
setCurrentWidget(m_databaseOpenMergeWidget);
|
||||
}
|
||||
|
@ -26,14 +26,3 @@ UnlockDatabaseWidget::UnlockDatabaseWidget(QWidget* parent)
|
||||
{
|
||||
m_ui->labelHeadline->setText(tr("Unlock database"));
|
||||
}
|
||||
|
||||
void UnlockDatabaseWidget::clearForms()
|
||||
{
|
||||
m_ui->editPassword->clear();
|
||||
m_ui->comboKeyFile->clear();
|
||||
m_ui->checkPassword->setChecked(false);
|
||||
m_ui->checkKeyFile->setChecked(false);
|
||||
m_ui->checkChallengeResponse->setChecked(false);
|
||||
m_ui->buttonTogglePassword->setChecked(false);
|
||||
m_db = nullptr;
|
||||
}
|
||||
|
@ -26,7 +26,6 @@ class UnlockDatabaseWidget : public DatabaseOpenWidget
|
||||
|
||||
public:
|
||||
explicit UnlockDatabaseWidget(QWidget* parent = nullptr);
|
||||
void clearForms();
|
||||
};
|
||||
|
||||
#endif // KEEPASSX_UNLOCKDATABASEWIDGET_H
|
||||
|
Loading…
Reference in New Issue
Block a user