QWidgetBaselineTest: Remove style name from appearance ID

It has a dedicated metadata field now.

Change-Id: Ia48b5114f33bfb96a3eae909af07656e979a3941
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Tor Arne Vestbø 2025-08-25 11:00:41 +02:00
parent 9f2fbc962b
commit 9768a63b01
1 changed files with 11 additions and 3 deletions

View File

@ -137,8 +137,8 @@ QWidgetBaselineTest::QWidgetBaselineTest()
const QColor windowColor = palette.window().color(); const QColor windowColor = palette.window().color();
const QColor textColor = palette.text().color(); const QColor textColor = palette.text().color();
const QString appearanceIdString = (windowColor.value() > textColor.value() const QString appearanceIdString = (windowColor.value() > textColor.value()
? QString("light-%1-%2") : QString("dark-%1-%2")) ? QString("light-%2") : QString("dark-%2"))
.arg(styleName).arg(appearanceId, 0, 16); .arg(appearanceId, 0, 16);
QBaselineTest::addClientProperty("AppearanceID", appearanceIdString); QBaselineTest::addClientProperty("AppearanceID", appearanceIdString);
#if defined(Q_OS_APPLE) #if defined(Q_OS_APPLE)
@ -149,7 +149,15 @@ QWidgetBaselineTest::QWidgetBaselineTest()
QBaselineTest::addClientProperty("DevicePixelRatio", QBaselineTest::addClientProperty("DevicePixelRatio",
QString::number(QGuiApplication::primaryScreen()->devicePixelRatio())); QString::number(QGuiApplication::primaryScreen()->devicePixelRatio()));
QBaselineTest::addClientProperty("Style", qApp->style()->name()); QBaselineTest::addClientProperty("Style", styleName);
QBaselineTest::setProjectImageKeys({
"GitBranch",
"OSVersion",
"PlatformName",
"Style",
"AppearanceID"
});
// let users know where they can find the results // let users know where they can find the results
qDebug() << "PlatformName computed to be:" << platformName; qDebug() << "PlatformName computed to be:" << platformName;