aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-06-25 09:53:01 +0200
committerLiang Qi <liang.qi@qt.io>2018-06-25 12:15:55 +0200
commitfbf6f7400a5b5ae10267171e201391ce1ff8eb96 (patch)
tree18e22092c2764fea16442fd814f230d4fe095a49 /tests
parentc21a6a9f2c2d635aca3bf88a6431c560b16b1cc6 (diff)
parent9999591e69a0908cd3fbe14646fb98881e32061b (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/compilerwarnings/data/test_cpp.txt38
-rw-r--r--tests/auto/qml/qmlcachegen/qmlcachegen.pro3
-rw-r--r--tests/auto/qml/qmlcachegen/trickypaths.qrc2
-rw-r--r--tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc5
-rw-r--r--tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp22
-rw-r--r--tests/auto/qml/qmlcachegen/umlaut.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml4
-rw-r--r--tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml4
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp2
9 files changed, 41 insertions, 43 deletions
diff --git a/tests/auto/compilerwarnings/data/test_cpp.txt b/tests/auto/compilerwarnings/data/test_cpp.txt
deleted file mode 100644
index 4135b23608..0000000000
--- a/tests/auto/compilerwarnings/data/test_cpp.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QT_NO_DECLARATIVE
-#include <QtQml/QtQml>
-#endif
-
-#ifndef Q_OS_MAC
-int main(int, char **)
-{
- return 0;
-}
-#endif
diff --git a/tests/auto/qml/qmlcachegen/qmlcachegen.pro b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
index 40de4548a7..6dee2a0454 100644
--- a/tests/auto/qml/qmlcachegen/qmlcachegen.pro
+++ b/tests/auto/qml/qmlcachegen/qmlcachegen.pro
@@ -16,4 +16,7 @@ RESOURCES += jsimport.qml script.js library.js
RESOURCES += Enums.qml
+# QTBUG-46375
+!win32: RESOURCES += trickypaths_umlaut.qrc
+
QT += core-private qml-private testlib
diff --git a/tests/auto/qml/qmlcachegen/trickypaths.qrc b/tests/auto/qml/qmlcachegen/trickypaths.qrc
index 271cf6571e..57977ccf6d 100644
--- a/tests/auto/qml/qmlcachegen/trickypaths.qrc
+++ b/tests/auto/qml/qmlcachegen/trickypaths.qrc
@@ -1,5 +1,7 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/directory with spaces">
<file alias="file name with spaces.qml">trickypaths.qml</file>
+<file>versionStyleSuffix-1.2-core-yc.qml</file>
+<file>versionStyleSuffix-1.2-more.qml</file>
</qresource>
</RCC>
diff --git a/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc b/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc
new file mode 100644
index 0000000000..9ca889d692
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/trickypaths_umlaut.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/">
+<file alias="Bäh.qml">umlaut.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
index 3b7d268f7b..6dc54a323e 100644
--- a/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
+++ b/tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
@@ -53,6 +53,7 @@ private slots:
void workerScripts();
+ void trickyPaths_data();
void trickyPaths();
void scriptImport();
@@ -408,13 +409,26 @@ void tst_qmlcachegen::functionExpressions()
QCOMPARE(obj->property("h_connections_handler_called").toBool(), true);
}
+void tst_qmlcachegen::trickyPaths_data()
+{
+ QTest::addColumn<QString>("filePath");
+ QTest::newRow("path with spaces") << QStringLiteral(":/directory with spaces/file name with spaces.qml");
+ QTest::newRow("version style suffix 1") << QStringLiteral(":/directory with spaces/versionStyleSuffix-1.2-core-yc.qml");
+ QTest::newRow("version style suffix 2") << QStringLiteral(":/directory with spaces/versionStyleSuffix-1.2-more.qml");
+
+ // QTBUG-46375
+#if !defined(Q_OS_WIN)
+ QTest::newRow("path with umlaut") << QStringLiteral(":/Bäh.qml");
+#endif
+}
+
void tst_qmlcachegen::trickyPaths()
{
- QString pathWithSpaces(QStringLiteral(":/directory with spaces/file name with spaces.qml"));
- QVERIFY2(QFile::exists(pathWithSpaces), qPrintable(pathWithSpaces));
- QCOMPARE(QFileInfo(pathWithSpaces).size(), 0);
+ QFETCH(QString, filePath);
+ QVERIFY2(QFile::exists(filePath), qPrintable(filePath));
+ QCOMPARE(QFileInfo(filePath).size(), 0);
QQmlEngine engine;
- QQmlComponent component(&engine, QUrl("qrc" + pathWithSpaces));
+ QQmlComponent component(&engine, QUrl("qrc" + filePath));
QScopedPointer<QObject> obj(component.create());
QVERIFY(!obj.isNull());
QCOMPARE(obj->property("success").toInt(), 42);
diff --git a/tests/auto/qml/qmlcachegen/umlaut.qml b/tests/auto/qml/qmlcachegen/umlaut.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/umlaut.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-core-yc.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml
new file mode 100644
index 0000000000..0836808dc2
--- /dev/null
+++ b/tests/auto/qml/qmlcachegen/versionStyleSuffix-1.2-more.qml
@@ -0,0 +1,4 @@
+import QtQml 2.0
+QtObject {
+ property int success: 42
+}
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index 042908bf0c..44cd1dd656 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -501,7 +501,7 @@ void tst_qquickwindow::openglContextCreatedSignal()
if (window.rendererInterface()->graphicsApi() != QSGRendererInterface::OpenGL)
QSKIP("Skipping OpenGL context test due to not running with OpenGL");
- QVERIFY(spy.size() > 0);
+ QTRY_VERIFY(spy.size() > 0);
QVariant ctx = spy.at(0).at(0);
QCOMPARE(qvariant_cast<QOpenGLContext *>(ctx), window.openglContext());