mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 15:55:38 -04:00
Issue #270 - turning off key location memory
Add general settting for whether or not to remember last key files
This commit is contained in:
parent
835c411d12
commit
00df73ced0
4 changed files with 34 additions and 16 deletions
|
@ -67,10 +67,12 @@ void DatabaseOpenWidget::load(const QString& filename)
|
|||
|
||||
m_ui->labelFilename->setText(filename);
|
||||
|
||||
QHash<QString, QVariant> lastKeyFiles = config()->get("LastKeyFiles").toHash();
|
||||
if (lastKeyFiles.contains(m_filename)) {
|
||||
m_ui->checkKeyFile->setChecked(true);
|
||||
m_ui->comboKeyFile->addItem(lastKeyFiles[m_filename].toString());
|
||||
if(config()->get("RememberLastKeyFiles").toBool()) {
|
||||
QHash<QString, QVariant> lastKeyFiles = config()->get("LastKeyFiles").toHash();
|
||||
if (lastKeyFiles.contains(m_filename)) {
|
||||
m_ui->checkKeyFile->setChecked(true);
|
||||
m_ui->comboKeyFile->addItem(lastKeyFiles[m_filename].toString());
|
||||
}
|
||||
}
|
||||
|
||||
m_ui->editPassword->setFocus();
|
||||
|
@ -148,7 +150,9 @@ CompositeKey DatabaseOpenWidget::databaseKey()
|
|||
lastKeyFiles.remove(m_filename);
|
||||
}
|
||||
|
||||
config()->set("LastKeyFiles", lastKeyFiles);
|
||||
if(config()->get("RememberLastKeyFiles").toBool()) {
|
||||
config()->set("LastKeyFiles", lastKeyFiles);
|
||||
}
|
||||
|
||||
return masterKey;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue