mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-10 10:35:17 -04:00
Fix minor UX issues with DB Open Widget
* Only clear password field when switching tabs or minimizing. This prevents the setting "Remember Key Files and Hardware Keys" from being useless with multiple databases. * Convert key file field to Line Edit, simplifies usage. Fix clear field button as well. * Removed need for clearForms to check if the database is being opened (was a solution to tab switching while unlocking, no longer a problem).
This commit is contained in:
parent
6c9125402a
commit
1ad0184473
4 changed files with 51 additions and 68 deletions
|
@ -37,16 +37,12 @@ void KeePass1OpenWidget::openDatabase()
|
|||
KeePass1Reader reader;
|
||||
|
||||
QString password;
|
||||
QString keyFileName;
|
||||
QString keyFileName = m_ui->keyFileLineEdit->text();
|
||||
|
||||
if (!m_ui->editPassword->text().isEmpty() || m_retryUnlockWithEmptyPassword) {
|
||||
password = m_ui->editPassword->text();
|
||||
}
|
||||
|
||||
if (!m_ui->comboKeyFile->currentText().isEmpty() && m_ui->comboKeyFile->currentData() != -1) {
|
||||
keyFileName = m_ui->comboKeyFile->currentText();
|
||||
}
|
||||
|
||||
QFile file(m_filename);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
m_ui->messageWidget->showMessage(tr("Unable to open the database.").append("\n").append(file.errorString()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue