mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-11-08 18:02:51 -05:00
Fix crashes on database save
* Add saving mutex to database class to prevent re-entrant saving * Prevent saving multiple times to the same file if the database is not marked as modified * Prevent locking the database while saving. This also prevents closing the application and database tab while saving. * FileWatcher: only perform async checksum calculations when triggered by timer (prevents random GUI freezes) * Re-attempt database lock when requested during save operation * Prevent database tabs from closing before all databases are locked on quit
This commit is contained in:
parent
6bce5836f9
commit
7ac292e09b
12 changed files with 122 additions and 40 deletions
|
|
@ -31,7 +31,13 @@ Metadata::Metadata(QObject* parent)
|
|||
, m_customData(new CustomData(this))
|
||||
, m_updateDatetime(true)
|
||||
{
|
||||
m_data.generator = "KeePassXC";
|
||||
init();
|
||||
connect(m_customData, SIGNAL(customDataModified()), SIGNAL(metadataModified()));
|
||||
}
|
||||
|
||||
void Metadata::init()
|
||||
{
|
||||
m_data.generator = QStringLiteral("KeePassXC");
|
||||
m_data.maintenanceHistoryDays = 365;
|
||||
m_data.masterKeyChangeRec = -1;
|
||||
m_data.masterKeyChangeForce = -1;
|
||||
|
|
@ -52,8 +58,17 @@ Metadata::Metadata(QObject* parent)
|
|||
m_entryTemplatesGroupChanged = now;
|
||||
m_masterKeyChanged = now;
|
||||
m_settingsChanged = now;
|
||||
}
|
||||
|
||||
connect(m_customData, SIGNAL(customDataModified()), this, SIGNAL(metadataModified()));
|
||||
void Metadata::clear()
|
||||
{
|
||||
init();
|
||||
m_customIcons.clear();
|
||||
m_customIconCacheKeys.clear();
|
||||
m_customIconScaledCacheKeys.clear();
|
||||
m_customIconsOrder.clear();
|
||||
m_customIconsHashes.clear();
|
||||
m_customData->clear();
|
||||
}
|
||||
|
||||
template <class P, class V> bool Metadata::set(P& property, const V& value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue