mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-03 12:06:25 -04:00
Removing QColor (from Qt::Widgets) from core modules. (#4247)
This commit is contained in:
parent
8bac8a7163
commit
c8ab3b5f4f
15 changed files with 47 additions and 97 deletions
|
@ -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(""));
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue