Close database without asking when unmodified.
Don't ask for confirmation when closing/locking a database and - it's in edit entry mode - there haven't been any modifications Refs #511
This commit is contained in:
committed by
Jonathan White
parent
cf8186312a
commit
8a50ee8b22
@@ -497,6 +497,22 @@ void EditEntryWidget::clear()
|
||||
m_iconsWidget->reset();
|
||||
}
|
||||
|
||||
bool EditEntryWidget::hasBeenModified() const
|
||||
{
|
||||
// entry has been modified if a history item is to be deleted
|
||||
if (!m_historyModel->deletedEntries().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// check if updating the entry would modify it
|
||||
QScopedPointer<Entry> entry(new Entry());
|
||||
entry->copyDataFrom(m_entry);
|
||||
|
||||
entry->beginUpdate();
|
||||
updateEntryData(entry.data());
|
||||
return entry->endUpdate();
|
||||
}
|
||||
|
||||
void EditEntryWidget::togglePasswordGeneratorButton(bool checked)
|
||||
{
|
||||
m_mainUi->passwordGenerator->setVisible(checked);
|
||||
|
||||
Reference in New Issue
Block a user