From bf9a08559e5ac6945e53d0bbde8345ce38343adf Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 23 Jan 2023 13:16:49 +0800 Subject: Add StyleInfo singleton to Qt.test.controls helper module This allows accessing the current style in QML auto tests, which we need to conditionally skip certain tests after the Material 3 TextField/TextArea changes. Task-number: QTBUG-97993 Pick-to: 6.5 Change-Id: Ife4ca79deb96f17e879353a901e421b03b29ff25 Reviewed-by: Oliver Eftevaag --- src/quickcontrolstestutils/controlstestutils.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/quickcontrolstestutils/controlstestutils.cpp') diff --git a/src/quickcontrolstestutils/controlstestutils.cpp b/src/quickcontrolstestutils/controlstestutils.cpp index f565751c0d..b800817bc9 100644 --- a/src/quickcontrolstestutils/controlstestutils.cpp +++ b/src/quickcontrolstestutils/controlstestutils.cpp @@ -178,3 +178,8 @@ Q_INVOKABLE QQmlComponent *QQuickControlsTestUtils::ComponentCreator::createComp qmlWarning(this) << "Failed to create component from the following data:\n" << data; return component.release(); } + +QString QQuickControlsTestUtils::StyleInfo::styleName() const +{ + return QQuickStyle::name(); +} -- cgit v1.2.3