mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Clearing deleted entries on applying. (#814)
This commit is contained in:
parent
34886dc7e0
commit
6f9224784e
@ -429,6 +429,7 @@ void EditEntryWidget::saveEntry()
|
|||||||
// must stand before beginUpdate()
|
// must stand before beginUpdate()
|
||||||
// we don't want to create a new history item, if only the history has changed
|
// we don't want to create a new history item, if only the history has changed
|
||||||
m_entry->removeHistoryItems(m_historyModel->deletedEntries());
|
m_entry->removeHistoryItems(m_historyModel->deletedEntries());
|
||||||
|
m_historyModel->clearDeletedEntries();
|
||||||
|
|
||||||
m_autoTypeAssoc->removeEmpty();
|
m_autoTypeAssoc->removeEmpty();
|
||||||
|
|
||||||
@ -912,8 +913,7 @@ void EditEntryWidget::deleteHistoryEntry()
|
|||||||
m_historyModel->deleteIndex(index);
|
m_historyModel->deleteIndex(index);
|
||||||
if (m_historyModel->rowCount() > 0) {
|
if (m_historyModel->rowCount() > 0) {
|
||||||
m_historyUi->deleteAllButton->setEnabled(true);
|
m_historyUi->deleteAllButton->setEnabled(true);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
m_historyUi->deleteAllButton->setEnabled(false);
|
m_historyUi->deleteAllButton->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,11 @@ void EntryHistoryModel::clear()
|
|||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EntryHistoryModel::clearDeletedEntries()
|
||||||
|
{
|
||||||
|
m_deletedHistoryEntries.clear();
|
||||||
|
}
|
||||||
|
|
||||||
QList<Entry*> EntryHistoryModel::deletedEntries()
|
QList<Entry*> EntryHistoryModel::deletedEntries()
|
||||||
{
|
{
|
||||||
return m_deletedHistoryEntries;
|
return m_deletedHistoryEntries;
|
||||||
|
@ -37,6 +37,7 @@ public:
|
|||||||
|
|
||||||
void setEntries(const QList<Entry*>& entries);
|
void setEntries(const QList<Entry*>& entries);
|
||||||
void clear();
|
void clear();
|
||||||
|
void clearDeletedEntries();
|
||||||
QList<Entry*> deletedEntries();
|
QList<Entry*> deletedEntries();
|
||||||
void deleteIndex(QModelIndex index);
|
void deleteIndex(QModelIndex index);
|
||||||
void deleteAll();
|
void deleteAll();
|
||||||
|
Loading…
Reference in New Issue
Block a user