aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicktext
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicktext')
-rw-r--r--tests/auto/quick/qquicktext/BLACKLIST2
-rw-r--r--tests/auto/quick/qquicktext/CMakeLists.txt42
-rw-r--r--tests/auto/quick/qquicktext/tst_qquicktext.cpp2
3 files changed, 45 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicktext/BLACKLIST b/tests/auto/quick/qquicktext/BLACKLIST
index f50276a4f1..ad037c5db9 100644
--- a/tests/auto/quick/qquicktext/BLACKLIST
+++ b/tests/auto/quick/qquicktext/BLACKLIST
@@ -4,5 +4,7 @@ qemu
macos
[fontSizeMode]
opensuse-42.1
+[contentSize]
+windows gcc
[hAlignVisual]
sles
diff --git a/tests/auto/quick/qquicktext/CMakeLists.txt b/tests/auto/quick/qquicktext/CMakeLists.txt
new file mode 100644
index 0000000000..7b1edd910f
--- /dev/null
+++ b/tests/auto/quick/qquicktext/CMakeLists.txt
@@ -0,0 +1,42 @@
+# Generated from qquicktext.pro.
+
+#####################################################################
+## tst_qquicktext Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ data/*)
+list(APPEND test_data ${test_data_glob})
+
+qt_add_test(tst_qquicktext
+ SOURCES
+ ../../shared/testhttpserver.cpp ../../shared/testhttpserver.h
+ ../../shared/util.cpp ../../shared/util.h
+ tst_qquicktext.cpp
+ INCLUDE_DIRECTORIES
+ ../../shared
+ PUBLIC_LIBRARIES
+ Qt::CorePrivate
+ Qt::Gui
+ Qt::GuiPrivate
+ Qt::Network
+ Qt::QmlPrivate
+ Qt::QuickPrivate
+ Qt::QuickTest
+ TESTDATA ${test_data}
+)
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(tst_qquicktext CONDITION ANDROID OR IOS
+ DEFINES
+ QT_QMLTEST_DATADIR=\\\":/data\\\"
+)
+
+qt_extend_target(tst_qquicktext CONDITION NOT ANDROID AND NOT IOS
+ DEFINES
+ QT_QMLTEST_DATADIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/data\\\"
+)
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
index 42fdbea58d..1f132ee266 100644
--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
@@ -1506,7 +1506,7 @@ void tst_qquicktext::weight()
delete textObject;
}
{
- QString componentStr = "import QtQuick 2.0\nText { font.weight: \"Bold\"; text: \"Hello world!\" }";
+ QString componentStr = "import QtQuick 2.0\nText { font.weight: Font.Bold; text: \"Hello world!\" }";
QQmlComponent textComponent(&engine);
textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
QQuickText *textObject = qobject_cast<QQuickText*>(textComponent.create());