summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui
diff options
context:
space:
mode:
authorSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2023-08-16 13:56:29 +0200
committerSanthosh Kumar <santhosh.kumar.selvaraj@qt.io>2023-08-18 00:38:38 +0200
commit90980a54e87147ae59ed0628f8b1de67d98ecae4 (patch)
tree344915686a6acc4845bd3a615f8816f5b9d6b9d2 /tests/auto/gui
parent7c55651ff2537fdc9b7c8667aff38d98c0cd9b65 (diff)
Rename accent color in QPalette
Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r--tests/auto/gui/kernel/qpalette/tst_qpalette.cpp12
-rw-r--r--tests/auto/gui/text/qcssparser/tst_qcssparser.cpp4
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
index bf9799724e..e5f3e3d100 100644
--- a/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
+++ b/tests/auto/gui/kernel/qpalette/tst_qpalette.cpp
@@ -52,7 +52,7 @@ void tst_QPalette::roleValues_data()
QTest::newRow("QPalette::ToolTipBase") << int(QPalette::ToolTipBase) << 18;
QTest::newRow("QPalette::ToolTipText") << int(QPalette::ToolTipText) << 19;
QTest::newRow("QPalette::PlaceholderText") << int(QPalette::PlaceholderText) << 20;
- QTest::newRow("QPalette::AccentColor") << int(QPalette::AccentColor) << 21;
+ QTest::newRow("QPalette::Accent") << int(QPalette::Accent) << 21;
// Change this value as you add more roles.
QTest::newRow("QPalette::NColorRoles") << int(QPalette::NColorRoles) << 22;
@@ -355,9 +355,9 @@ void tst_QPalette::dataStream()
const QColor accent(13, 13, 13);
QPalette palette;
palette.setBrush(QPalette::Highlight, highlight);
- palette.setBrush(QPalette::AccentColor, accent);
+ palette.setBrush(QPalette::Accent, accent);
- // When saved with Qt_6_5 or earlier, AccentColor defaults to Highlight
+ // When saved with Qt_6_5 or earlier, Accent defaults to Highlight
{
QByteArray b;
{
@@ -369,10 +369,10 @@ void tst_QPalette::dataStream()
QDataStream stream (&b, QIODevice::ReadOnly);
stream.setVersion(QDataStream::Qt_6_5);
stream >> test;
- QCOMPARE(test.accentColor().color(), highlight);
+ QCOMPARE(test.accent().color(), highlight);
}
- // When saved with Qt_6_6 or later, AccentColor is saved explicitly
+ // When saved with Qt_6_6 or later, Accent is saved explicitly
{
QByteArray b;
{
@@ -384,7 +384,7 @@ void tst_QPalette::dataStream()
QDataStream stream (&b, QIODevice::ReadOnly);
stream.setVersion(QDataStream::Qt_6_6);
stream >> test;
- QCOMPARE(test.accentColor().color(), accent);
+ QCOMPARE(test.accent().color(), accent);
}
}
diff --git a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
index 778c4a002e..bb6ed1db91 100644
--- a/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
+++ b/tests/auto/gui/text/qcssparser/tst_qcssparser.cpp
@@ -1548,9 +1548,9 @@ void tst_QCssParser::gradient()
QBrush selectedBackground;
QBrush alternateBackground;
QBrush placeHolderTextForeground;
- QBrush accentColor;
+ QBrush accent;
QVERIFY(ve.extractPalette(&foreground, &selectedForeground, &selectedBackground,
- &alternateBackground, &placeHolderTextForeground, &accentColor));
+ &alternateBackground, &placeHolderTextForeground, &accent));
if (type == "linear") {
QCOMPARE(selectedBackground.style(), Qt::LinearGradientPattern);