mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-27 03:41:17 -04:00
Set uuids for entries.
This commit is contained in:
parent
2ecd11eb35
commit
9d8e276950
2 changed files with 5 additions and 0 deletions
|
@ -177,6 +177,9 @@ Database* KeePass1Reader::readDatabase(QIODevice* device, const QString& passwor
|
||||||
|
|
||||||
delete entry;
|
delete entry;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
entry->setUuid(Uuid::random());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT(m_tmpParent->children().isEmpty());
|
Q_ASSERT(m_tmpParent->children().isEmpty());
|
||||||
|
|
|
@ -46,12 +46,14 @@ void TestKeePass1Reader::testBasic()
|
||||||
QCOMPARE(m_db->rootGroup()->children().size(), 2);
|
QCOMPARE(m_db->rootGroup()->children().size(), 2);
|
||||||
|
|
||||||
Group* group1 = m_db->rootGroup()->children().at(0);
|
Group* group1 = m_db->rootGroup()->children().at(0);
|
||||||
|
QVERIFY(!group1->uuid().isNull());
|
||||||
QCOMPARE(group1->name(), QString("Internet"));
|
QCOMPARE(group1->name(), QString("Internet"));
|
||||||
QCOMPARE(group1->children().size(), 2);
|
QCOMPARE(group1->children().size(), 2);
|
||||||
QCOMPARE(group1->entries().size(), 2);
|
QCOMPARE(group1->entries().size(), 2);
|
||||||
QCOMPARE(group1->iconNumber(), 1);
|
QCOMPARE(group1->iconNumber(), 1);
|
||||||
|
|
||||||
Entry* entry11 = group1->entries().at(0);
|
Entry* entry11 = group1->entries().at(0);
|
||||||
|
QVERIFY(!entry11->uuid().isNull());
|
||||||
QCOMPARE(entry11->title(), QString("Test entry"));
|
QCOMPARE(entry11->title(), QString("Test entry"));
|
||||||
QCOMPARE(entry11->iconNumber(), 1);
|
QCOMPARE(entry11->iconNumber(), 1);
|
||||||
QCOMPARE(entry11->username(), QString("I"));
|
QCOMPARE(entry11->username(), QString("I"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue