aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-09 17:06:17 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-10 11:28:10 +0000
commitf5467114b789dcb33ad88105fe84bddf42436d8c (patch)
treebac248119788d47ee05e99e6f0cdf2ac0c179407 /tests/auto
parentd6e03b3837f369e9fc94915ef3ad649903845382 (diff)
QQuickStyle::availableStyles()
This allows us to introduce platform-specific styles, such as the iOS style, and make them appear correctly in the Gallery example so that we don't have to hard-code the lists separately for different platforms. [ChangeLog][Controls][QQuickStyle] Added availableStyles() method that returns the list of available built-in styles. Change-Id: Ieea88577f402cbc52a844d6777e64c6bd55c5ab9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qquickstyle/tst_qquickstyle.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qquickstyle/tst_qquickstyle.cpp b/tests/auto/qquickstyle/tst_qquickstyle.cpp
index 15edc67b..cc9cc75d 100644
--- a/tests/auto/qquickstyle/tst_qquickstyle.cpp
+++ b/tests/auto/qquickstyle/tst_qquickstyle.cpp
@@ -50,6 +50,7 @@ private slots:
void lookup();
void commandLineArgument();
void environmentVariables();
+ void availableStyles();
};
void tst_QQuickStyle::init()
@@ -94,6 +95,13 @@ void tst_QQuickStyle::environmentVariables()
QCOMPARE(QQuickStylePrivate::fallbackStyle(), QString("EnvVarFallbackStyle"));
}
+void tst_QQuickStyle::availableStyles()
+{
+ QStringList styles = QQuickStyle::availableStyles();
+ QVERIFY(!styles.isEmpty());
+ QCOMPARE(styles.first(), QString("Default"));
+}
+
QTEST_MAIN(tst_QQuickStyle)
#include "tst_qquickstyle.moc"