mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-07 03:25:29 -05:00
Merge branch '2.0'
This commit is contained in:
commit
71d4cb781d
30 changed files with 569 additions and 40 deletions
|
|
@ -43,7 +43,7 @@ KeePass2Reader::KeePass2Reader()
|
|||
{
|
||||
}
|
||||
|
||||
Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& key)
|
||||
Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& key, bool keepDatabase)
|
||||
{
|
||||
QScopedPointer<Database> db(new Database());
|
||||
m_db = db.data();
|
||||
|
|
@ -178,7 +178,12 @@ Database* KeePass2Reader::readDatabase(QIODevice* device, const CompositeKey& ke
|
|||
|
||||
if (xmlReader.hasError()) {
|
||||
raiseError(xmlReader.errorString());
|
||||
return nullptr;
|
||||
if (keepDatabase) {
|
||||
return db.take();
|
||||
}
|
||||
else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Q_ASSERT(version < 0x00030001 || !xmlReader.headerHash().isEmpty());
|
||||
|
|
@ -232,6 +237,11 @@ QByteArray KeePass2Reader::xmlData()
|
|||
return m_xmlData;
|
||||
}
|
||||
|
||||
QByteArray KeePass2Reader::streamKey()
|
||||
{
|
||||
return m_protectedStreamKey;
|
||||
}
|
||||
|
||||
void KeePass2Reader::raiseError(const QString& errorMessage)
|
||||
{
|
||||
m_error = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue