mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Set uuids for entries.
This commit is contained in:
parent
2ecd11eb35
commit
9d8e276950
@ -177,6 +177,9 @@ Database* KeePass1Reader::readDatabase(QIODevice* device, const QString& passwor
|
||||
|
||||
delete entry;
|
||||
}
|
||||
else {
|
||||
entry->setUuid(Uuid::random());
|
||||
}
|
||||
}
|
||||
|
||||
Q_ASSERT(m_tmpParent->children().isEmpty());
|
||||
|
@ -46,12 +46,14 @@ void TestKeePass1Reader::testBasic()
|
||||
QCOMPARE(m_db->rootGroup()->children().size(), 2);
|
||||
|
||||
Group* group1 = m_db->rootGroup()->children().at(0);
|
||||
QVERIFY(!group1->uuid().isNull());
|
||||
QCOMPARE(group1->name(), QString("Internet"));
|
||||
QCOMPARE(group1->children().size(), 2);
|
||||
QCOMPARE(group1->entries().size(), 2);
|
||||
QCOMPARE(group1->iconNumber(), 1);
|
||||
|
||||
Entry* entry11 = group1->entries().at(0);
|
||||
QVERIFY(!entry11->uuid().isNull());
|
||||
QCOMPARE(entry11->title(), QString("Test entry"));
|
||||
QCOMPARE(entry11->iconNumber(), 1);
|
||||
QCOMPARE(entry11->username(), QString("I"));
|
||||
|
Loading…
Reference in New Issue
Block a user