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
path: root/tests
diff options
context:
space:
mode:
authorpasdam <>2018-03-23 13:18:06 +0300
committerJonathan White <support@dmapps.us>2018-07-07 05:23:52 +0300
commitb4d806ad412b33b9af63f926c06453b63c06a129 (patch)
treed05933ccf35ba9796fb21460a30e0d21faa911d3 /tests
parentad4423d226da6105e0732a15918c6429e2ca8ed4 (diff)
Fixed issues with initial commit
Diffstat (limited to 'tests')
-rw-r--r--tests/TestEntry.cpp4
-rw-r--r--tests/TestEntryModel.cpp4
-rw-r--r--tests/TestGlobal.h1
-rw-r--r--tests/TestKeePass2Format.cpp6
-rw-r--r--tests/gui/TestGuiPixmaps.cpp4
5 files changed, 9 insertions, 10 deletions
diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp
index aa4426211..5e5d7bc3c 100644
--- a/tests/TestEntry.cpp
+++ b/tests/TestEntry.cpp
@@ -282,8 +282,8 @@ void TestEntry::testResolveRecursivePlaceholders()
auto* entry7 = new Entry();
entry7->setGroup(root);
- entry7->setUuid(Uuid::random());
- entry7->setTitle(QString("{REF:T@I:%1} and something else").arg(entry3->uuid().toHex()));
+ entry7->setUuid(QUuid::createUuid());
+ entry7->setTitle(QString("{REF:T@I:%1} and something else").arg(QString(entry3->uuid().toRfc4122().toHex())));
entry7->setUsername(QString("{TITLE}"));
entry7->setPassword(QString("PASSWORD"));
diff --git a/tests/TestEntryModel.cpp b/tests/TestEntryModel.cpp
index dd3a5372a..3378a9f9a 100644
--- a/tests/TestEntryModel.cpp
+++ b/tests/TestEntryModel.cpp
@@ -220,11 +220,11 @@ void TestEntryModel::testCustomIconModel()
QHash<QUuid, QPixmap> icons;
QList<QUuid> iconsOrder;
- QUuid iconUuid(QByteArray(16, '2'));
+ QUuid iconUuid = QUuid::fromRfc4122(QByteArray(16, '2'));
icons.insert(iconUuid, QPixmap());
iconsOrder << iconUuid;
- QUuid iconUuid2(QByteArray(16, '1'));
+ QUuid iconUuid2 = QUuid::fromRfc4122(QByteArray(16, '1'));
icons.insert(iconUuid2, QPixmap());
iconsOrder << iconUuid2;
diff --git a/tests/TestGlobal.h b/tests/TestGlobal.h
index ef7472c01..9889a4434 100644
--- a/tests/TestGlobal.h
+++ b/tests/TestGlobal.h
@@ -19,7 +19,6 @@
#define KEEPASSXC_TESTGLOBAL_H
#include "core/Group.h"
-#include "core/Uuid.h"
#include <QDateTime>
#include <QTest>
diff --git a/tests/TestKeePass2Format.cpp b/tests/TestKeePass2Format.cpp
index ce639bdef..c5f22ef6d 100644
--- a/tests/TestKeePass2Format.cpp
+++ b/tests/TestKeePass2Format.cpp
@@ -577,12 +577,12 @@ void TestKeePass2Format::testDuplicateAttachments()
auto entry1 = new Entry();
entry1->setGroup(db->rootGroup());
- entry1->setUuid(QUuid::fromRfc4122(QByteArray::fromHex("aaaaaaaaaaaaaaaa")));
+ entry1->setUuid(QUuid::fromRfc4122("aaaaaaaaaaaaaaaa"));
entry1->attachments()->set("a", attachment1);
auto entry2 = new Entry();
entry2->setGroup(db->rootGroup());
- entry2->setUuid(QUuid::fromRfc4122(QByteArray::fromHex("bbbbbbbbbbbbbbbb")));
+ entry2->setUuid(QUuid::fromRfc4122("bbbbbbbbbbbbbbbb"));
entry2->attachments()->set("b1", attachment1);
entry2->beginUpdate();
entry2->attachments()->set("b2", attachment1);
@@ -596,7 +596,7 @@ void TestKeePass2Format::testDuplicateAttachments()
auto entry3 = new Entry();
entry3->setGroup(db->rootGroup());
- entry3->setUuid(QUuid::fromRfc4122(QByteArray::fromHex("cccccccccccccccc")));
+ entry3->setUuid(QUuid::fromRfc4122("cccccccccccccccc"));
entry3->attachments()->set("c1", attachment2);
entry3->attachments()->set("c2", attachment2);
entry3->attachments()->set("c3", attachment3);
diff --git a/tests/gui/TestGuiPixmaps.cpp b/tests/gui/TestGuiPixmaps.cpp
index c71fe51b9..c5754ba84 100644
--- a/tests/gui/TestGuiPixmaps.cpp
+++ b/tests/gui/TestGuiPixmaps.cpp
@@ -73,7 +73,7 @@ void TestGuiPixmaps::testEntryIcons()
QCOMPARE(pixmapCached1.cacheKey(), pixmap.cacheKey());
QCOMPARE(pixmapCached2.cacheKey(), pixmap.cacheKey());
- Uuid iconUuid = Uuid::random();
+ QUuid iconUuid = QUuid::createUuid();
icon = QImage(2, 1, QImage::Format_RGB32);
icon.setPixel(0, 0, qRgb(0, 0, 0));
icon.setPixel(1, 0, qRgb(0, 0, 50));
@@ -116,7 +116,7 @@ void TestGuiPixmaps::testGroupIcons()
QCOMPARE(pixmapCached1.cacheKey(), pixmap.cacheKey());
QCOMPARE(pixmapCached2.cacheKey(), pixmap.cacheKey());
- Uuid iconUuid = Uuid::random();
+ QUuid iconUuid = QUuid::createUuid();
icon = QImage(2, 1, QImage::Format_RGB32);
icon.setPixel(0, 0, qRgb(0, 0, 0));
icon.setPixel(1, 0, qRgb(0, 0, 50));