Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpasdam <>2018-03-23 00:56:05 +0300
committerJonathan White <support@dmapps.us>2018-07-07 05:23:49 +0300
commitad4423d226da6105e0732a15918c6429e2ca8ed4 (patch)
tree66e0c01f02aefe57b8c654d7ada3dd91ce802cb1 /tests/TestKdbx4.cpp
parentdcece140a0b75a9fea55af32edaa2944789725ce (diff)
Replaced Uuid with QUuid
Diffstat (limited to 'tests/TestKdbx4.cpp')
-rw-r--r--tests/TestKdbx4.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/TestKdbx4.cpp b/tests/TestKdbx4.cpp
index 53207a049..9758ac13f 100644
--- a/tests/TestKdbx4.cpp
+++ b/tests/TestKdbx4.cpp
@@ -109,7 +109,7 @@ void TestKdbx4::writeKdbx(QIODevice* device, Database* db, bool& hasError, QStri
QCOMPARE(writer.version(), KeePass2::FILE_VERSION_4);
}
-Q_DECLARE_METATYPE(Uuid);
+Q_DECLARE_METATYPE(QUuid)
void TestKdbx4::testFormat400()
{
QString filename = QString(KEEPASSX_TEST_DATA_DIR).append("/Format400.kdbx");
@@ -136,8 +136,8 @@ void TestKdbx4::testFormat400()
void TestKdbx4::testFormat400Upgrade()
{
- QFETCH(Uuid, kdfUuid);
- QFETCH(Uuid, cipherUuid);
+ QFETCH(QUuid, kdfUuid);
+ QFETCH(QUuid, cipherUuid);
QFETCH(bool, addCustomData);
QFETCH(quint32, expectedVersion);
@@ -191,8 +191,8 @@ void TestKdbx4::testFormat400Upgrade()
// clang-format off
void TestKdbx4::testFormat400Upgrade_data()
{
- QTest::addColumn<Uuid>("kdfUuid");
- QTest::addColumn<Uuid>("cipherUuid");
+ QTest::addColumn<QUuid>("kdfUuid");
+ QTest::addColumn<QUuid>("cipherUuid");
QTest::addColumn<bool>("addCustomData");
QTest::addColumn<quint32>("expectedVersion");
@@ -265,20 +265,20 @@ void TestKdbx4::testUpgradeMasterKeyIntegrity()
} else if (upgradeAction == "group-customdata") {
auto group = new Group();
group->setParent(db->rootGroup());
- group->setUuid(Uuid::random());
+ group->setUuid(QUuid::createUuid());
group->customData()->set("abc", "def");
} else if (upgradeAction == "rootentry-customdata") {
auto entry = new Entry();
entry->setGroup(db->rootGroup());
- entry->setUuid(Uuid::random());
+ entry->setUuid(QUuid::createUuid());
entry->customData()->set("abc", "def");
} else if (upgradeAction == "entry-customdata") {
auto group = new Group();
group->setParent(db->rootGroup());
- group->setUuid(Uuid::random());
+ group->setUuid(QUuid::createUuid());
auto entry = new Entry();
entry->setGroup(group);
- entry->setUuid(Uuid::random());
+ entry->setUuid(QUuid::createUuid());
entry->customData()->set("abc", "def");
} else {
QFAIL(qPrintable(QString("Unknown action: %s").arg(upgradeAction)));
@@ -362,14 +362,14 @@ void TestKdbx4::testCustomData()
// test copied custom group data
auto* group = new Group();
group->setParent(root);
- group->setUuid(Uuid::random());
+ group->setUuid(QUuid::createUuid());
group->customData()->copyDataFrom(root->customData());
QCOMPARE(*group->customData(), *root->customData());
// test copied custom entry data
auto* entry = new Entry();
entry->setGroup(group);
- entry->setUuid(Uuid::random());
+ entry->setUuid(QUuid::createUuid());
entry->customData()->copyDataFrom(group->customData());
QCOMPARE(*entry->customData(), *root->customData());