mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-09 11:18:39 -05:00
Clear LastDatabases and LastKeyFiles when they are disabled in settings
This commit is contained in:
parent
649a14db84
commit
2e4f1a21b4
@ -225,6 +225,15 @@ void SettingsWidget::saveSettings()
|
|||||||
config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked());
|
config()->set("security/passwordscleartext", m_secUi->passwordCleartextCheckBox->isChecked());
|
||||||
config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked());
|
config()->set("security/passwordsrepeat", m_secUi->passwordRepeatCheckBox->isChecked());
|
||||||
|
|
||||||
|
// Security: clear storage if related settings are disabled
|
||||||
|
if (!config()->get("RememberLastDatabases").toBool()) {
|
||||||
|
config()->set("LastDatabases", QVariant());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!config()->get("RememberLastKeyFiles").toBool()) {
|
||||||
|
config()->set("LastKeyFiles", QVariant());
|
||||||
|
}
|
||||||
|
|
||||||
for (const ExtraPage& page: asConst(m_extraPages)) {
|
for (const ExtraPage& page: asConst(m_extraPages)) {
|
||||||
page.saveSettings();
|
page.saveSettings();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user