aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickstyle/tst_qquickstyle.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
committerLiang Qi <liang.qi@qt.io>2019-01-10 16:47:26 +0100
commitefa04c2ae8427c70848477ace3d8f6e82baaab11 (patch)
treec0394c9cd5ce51961337a7a15e169074dd41632b /tests/auto/qquickstyle/tst_qquickstyle.cpp
parent9c7429219d36e8eb40e1fe6e679715c89209fc40 (diff)
parent6476de0b669162cf08c11f5c8d5ad0b42419f365 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts: .qmake.conf src/imports/controls/qtquickcontrols2plugin.cpp Change-Id: I27f1260b539354e084beb28be78385e57fda63e1
Diffstat (limited to 'tests/auto/qquickstyle/tst_qquickstyle.cpp')
-rw-r--r--tests/auto/qquickstyle/tst_qquickstyle.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qquickstyle/tst_qquickstyle.cpp b/tests/auto/qquickstyle/tst_qquickstyle.cpp
index 8d09a293..3f55bcfb 100644
--- a/tests/auto/qquickstyle/tst_qquickstyle.cpp
+++ b/tests/auto/qquickstyle/tst_qquickstyle.cpp
@@ -39,6 +39,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQuickControls2/qquickstyle.h>
#include <QtQuickControls2/private/qquickstyle_p.h>
+#include <QtQuickTemplates2/private/qquicktheme_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include "../shared/util.h"
@@ -102,6 +103,10 @@ void tst_QQuickStyle::lookup()
loadControls();
+ // The font size for editors in the (default) Normal variant is 16.
+ // If this is wrong, the style plugin may not have been loaded.
+ QCOMPARE(QQuickTheme::instance()->font(QQuickTheme::TextArea).pixelSize(), 16);
+
QCOMPARE(QQuickStyle::name(), QString("Material"));
QVERIFY(!QQuickStyle::path().isEmpty());
}
@@ -159,7 +164,11 @@ void tst_QQuickStyle::availableStyles()
QQuickStyle::addStylePath(path);
QStringList paths = QQuickStylePrivate::stylePaths();
+#ifndef Q_OS_WIN
QVERIFY(paths.contains(path));
+#else
+ QVERIFY(paths.contains(path, Qt::CaseInsensitive));
+#endif
const QStringList styles = QQuickStyle::availableStyles();
QVERIFY(!styles.isEmpty());