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:
authorlouib <L0U13@protonmail.com>2020-01-27 05:38:43 +0300
committerJonathan White <support@dmapps.us>2020-01-27 05:38:43 +0300
commitc8ab3b5f4f0bea29e704afb05180365bc9f2c8c9 (patch)
tree0a5c0aedf1674bacd80164bc362869ff483769e6 /tests
parent8bac8a7163272efb067d388954119c9309f05f41 (diff)
Removing QColor (from Qt::Widgets) from core modules. (#4247)
Diffstat (limited to 'tests')
-rw-r--r--tests/TestKeePass2Format.cpp10
-rw-r--r--tests/TestModified.cpp4
-rw-r--r--tests/gui/TestGui.cpp4
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/TestKeePass2Format.cpp b/tests/TestKeePass2Format.cpp
index ce4f63fed..df414f5c0 100644
--- a/tests/TestKeePass2Format.cpp
+++ b/tests/TestKeePass2Format.cpp
@@ -86,7 +86,7 @@ void TestKeePass2Format::testXmlMetadata()
QCOMPARE(m_xmlDb->metadata()->defaultUserName(), QString("DEFUSERNAME"));
QCOMPARE(m_xmlDb->metadata()->defaultUserNameChanged(), MockClock::datetimeUtc(2010, 8, 8, 17, 27, 45));
QCOMPARE(m_xmlDb->metadata()->maintenanceHistoryDays(), 127);
- QCOMPARE(m_xmlDb->metadata()->color(), QColor(0xff, 0xef, 0x00));
+ QCOMPARE(m_xmlDb->metadata()->color(), QString("#FFEF00"));
QCOMPARE(m_xmlDb->metadata()->masterKeyChanged(), MockClock::datetimeUtc(2012, 4, 5, 17, 9, 34));
QCOMPARE(m_xmlDb->metadata()->masterKeyChangeRec(), 101);
QCOMPARE(m_xmlDb->metadata()->masterKeyChangeForce(), -1);
@@ -200,8 +200,8 @@ void TestKeePass2Format::testXmlEntry1()
QCOMPARE(entry->historyItems().size(), 2);
QCOMPARE(entry->iconNumber(), 0);
QCOMPARE(entry->iconUuid(), QUuid());
- QVERIFY(!entry->foregroundColor().isValid());
- QVERIFY(!entry->backgroundColor().isValid());
+ QVERIFY(entry->foregroundColor().isEmpty());
+ QVERIFY(entry->backgroundColor().isEmpty());
QCOMPARE(entry->overrideUrl(), QString(""));
QCOMPARE(entry->tags(), QString("a b c"));
@@ -262,8 +262,8 @@ void TestKeePass2Format::testXmlEntry2()
QCOMPARE(entry->iconNumber(), 0);
QCOMPARE(entry->iconUuid(), QUuid::fromRfc4122(QByteArray::fromBase64("++vyI+daLk6omox4a6kQGA==")));
// TODO: test entry->icon()
- QCOMPARE(entry->foregroundColor(), QColor(255, 0, 0));
- QCOMPARE(entry->backgroundColor(), QColor(255, 255, 0));
+ QCOMPARE(entry->foregroundColor(), QString("#FF0000"));
+ QCOMPARE(entry->backgroundColor(), QString("#FFFF00"));
QCOMPARE(entry->overrideUrl(), QString("http://override.net/"));
QCOMPARE(entry->tags(), QString(""));
diff --git a/tests/TestModified.cpp b/tests/TestModified.cpp
index 254db3796..dcaeca8ff 100644
--- a/tests/TestModified.cpp
+++ b/tests/TestModified.cpp
@@ -309,13 +309,13 @@ void TestModified::testEntrySets()
entry->setDefaultAutoTypeSequence(entry->defaultAutoTypeSequence());
QTRY_COMPARE(spyModified.count(), spyCount);
- entry->setForegroundColor(Qt::red);
+ entry->setForegroundColor(QString("#FF0000"));
++spyCount;
QTRY_COMPARE(spyModified.count(), spyCount);
entry->setForegroundColor(entry->foregroundColor());
QTRY_COMPARE(spyModified.count(), spyCount);
- entry->setBackgroundColor(Qt::red);
+ entry->setBackgroundColor(QString("#FF0000"));
++spyCount;
QTRY_COMPARE(spyModified.count(), spyCount);
entry->setBackgroundColor(entry->backgroundColor());
diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp
index 9118d3e21..64e913c76 100644
--- a/tests/gui/TestGui.cpp
+++ b/tests/gui/TestGui.cpp
@@ -432,8 +432,8 @@ void TestGui::testEditEntry()
// Test entry colors (simulate choosing a color)
editEntryWidget->setCurrentPage(1);
- auto fgColor = QColor(Qt::red);
- auto bgColor = QColor(Qt::blue);
+ auto fgColor = QString("#FF0000");
+ auto bgColor = QString("#0000FF");
// Set foreground color
auto colorButton = editEntryWidget->findChild<QPushButton*>("fgColorButton");
auto colorCheckBox = editEntryWidget->findChild<QCheckBox*>("fgColorCheckBox");