mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-20 12:08:24 -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
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "Kdbx3Reader.h"
|
||||
|
||||
#include "core/AsyncTask.h"
|
||||
#include "core/Endian.h"
|
||||
#include "core/Group.h"
|
||||
#include "crypto/CryptoHash.h"
|
||||
|
@ -47,7 +48,8 @@ bool Kdbx3Reader::readDatabaseImpl(QIODevice* device,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!db->setKey(key, false)) {
|
||||
bool ok = AsyncTask::runAndWaitForFuture([&] { return db->setKey(key, false); });
|
||||
if (!ok) {
|
||||
raiseError(tr("Unable to calculate master key"));
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue