mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-16 08:54:30 -05:00
Close databases when they are locked.
Previously we've only hidden access to them. Closes #275
This commit is contained in:
parent
33650c4a04
commit
9e051e835b
11 changed files with 149 additions and 91 deletions
|
|
@ -453,12 +453,7 @@ void EditEntryWidget::saveEntry()
|
|||
}
|
||||
|
||||
|
||||
m_entry = Q_NULLPTR;
|
||||
m_database = Q_NULLPTR;
|
||||
m_entryAttributes->clear();
|
||||
m_entryAttachments->clear();
|
||||
m_autoTypeAssoc->clear();
|
||||
m_historyModel->clear();
|
||||
clear();
|
||||
|
||||
Q_EMIT editFinished(true);
|
||||
}
|
||||
|
|
@ -466,12 +461,8 @@ void EditEntryWidget::saveEntry()
|
|||
void EditEntryWidget::cancel()
|
||||
{
|
||||
if (m_history) {
|
||||
m_entry = Q_NULLPTR;
|
||||
m_database = Q_NULLPTR;
|
||||
m_entryAttributes->clear();
|
||||
m_entryAttachments->clear();
|
||||
clear();
|
||||
Q_EMIT editFinished(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_entry->iconUuid().isNull() &&
|
||||
|
|
@ -479,14 +470,19 @@ void EditEntryWidget::cancel()
|
|||
m_entry->setIcon(Entry::DefaultIconNumber);
|
||||
}
|
||||
|
||||
m_entry = 0;
|
||||
m_database = 0;
|
||||
clear();
|
||||
|
||||
Q_EMIT editFinished(false);
|
||||
}
|
||||
|
||||
void EditEntryWidget::clear()
|
||||
{
|
||||
m_entry = Q_NULLPTR;
|
||||
m_database = Q_NULLPTR;
|
||||
m_entryAttributes->clear();
|
||||
m_entryAttachments->clear();
|
||||
m_autoTypeAssoc->clear();
|
||||
m_historyModel->clear();
|
||||
|
||||
Q_EMIT editFinished(false);
|
||||
}
|
||||
|
||||
void EditEntryWidget::togglePasswordGeneratorButton(bool checked)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
|
||||
void createPresetsMenu(QMenu* expirePresetsMenu);
|
||||
QString entryTitle() const;
|
||||
void clear();
|
||||
|
||||
Q_SIGNALS:
|
||||
void editFinished(bool accepted);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue