mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-17 14:00:36 -04:00
Move database open to async task
* Wrap key transformation in AsyncTask when reading a database. Significantly reduces user interface lockup. * Replace root group with new group instead of deleting the pointer (fulfills member validity promise).
This commit is contained in:
parent
91c6e436b3
commit
a8c02fdc3c
4 changed files with 15 additions and 19 deletions
|
@ -415,27 +415,26 @@ void Database::releaseData()
|
|||
// Prevent data release while saving
|
||||
QMutexLocker locker(&m_saveMutex);
|
||||
|
||||
s_uuidMap.remove(m_uuid);
|
||||
m_uuid = QUuid();
|
||||
|
||||
if (m_modified) {
|
||||
emit databaseDiscarded();
|
||||
}
|
||||
|
||||
setEmitModified(false);
|
||||
m_modified = false;
|
||||
m_modifiedTimer.stop();
|
||||
|
||||
s_uuidMap.remove(m_uuid);
|
||||
m_uuid = QUuid();
|
||||
|
||||
m_data.clear();
|
||||
m_metadata->clear();
|
||||
|
||||
if (m_rootGroup && m_rootGroup->parent() == this) {
|
||||
delete m_rootGroup;
|
||||
}
|
||||
setRootGroup(new Group());
|
||||
|
||||
m_fileWatcher->stop();
|
||||
|
||||
m_deletedObjects.clear();
|
||||
m_commonUsernames.clear();
|
||||
|
||||
m_modified = false;
|
||||
m_modifiedTimer.stop();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue