summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-28 01:00:07 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-04-29 09:12:31 +0200
commit23f988fe48f3f3c63e8311c31ed09394702089d2 (patch)
treefeba876785ad8c7404b44bc3e6e12e0837cf902c /tests
parent3ef2b2727df42510512669ec879788d41d83cebb (diff)
parent332e514fb4954fde9af03e1699c066cbbdb0420d (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts: src/qml/compiler/qv4compilercontext.cpp src/qml/qml/qqmlmetatype.cpp Change-Id: I02e0216961b92ff68a3f91a70edc33fe9e8db147
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmllanguage/data/typeWrapperToVariant.qml15
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp15
-rw-r--r--tests/auto/quick/qquickwindow/BLACKLIST3
-rw-r--r--tests/auto/quickwidgets/qquickwidget/BLACKLIST3
-rw-r--r--tests/auto/shared/util.cpp7
-rw-r--r--tests/auto/shared/util.pri6
6 files changed, 46 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/typeWrapperToVariant.qml b/tests/auto/qml/qqmllanguage/data/typeWrapperToVariant.qml
new file mode 100644
index 0000000000..8a1535ff50
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/typeWrapperToVariant.qml
@@ -0,0 +1,15 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+
+ property QtObject target: QtObject {
+ Component.onCompleted: {
+ root.connections.target = root.target.Component
+ }
+ }
+
+ property Connections connections: Connections {
+ ignoreUnknownSignals: true
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 1b4ff71beb..b97c75e2ce 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -301,6 +301,8 @@ private slots:
void polymorphicFunctionLookup();
void anchorsToParentInPropertyChanges();
+ void typeWrapperToVariant();
+
private:
QQmlEngine engine;
QStringList defaultImportPathList;
@@ -5087,6 +5089,19 @@ void tst_qqmllanguage::anchorsToParentInPropertyChanges()
QTRY_COMPARE(o->property("edgeWidth").toInt(), 200);
}
+void tst_qqmllanguage::typeWrapperToVariant()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("typeWrapperToVariant.qml"));
+ VERIFY_ERRORS(0);
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY(!o.isNull());
+ QObject *connections = qvariant_cast<QObject *>(o->property("connections"));
+ QVERIFY(connections);
+ QObject *target = qvariant_cast<QObject *>(connections->property("target"));
+ QVERIFY(target);
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"
diff --git a/tests/auto/quick/qquickwindow/BLACKLIST b/tests/auto/quick/qquickwindow/BLACKLIST
index bb9f403188..1282a9d5ec 100644
--- a/tests/auto/quick/qquickwindow/BLACKLIST
+++ b/tests/auto/quick/qquickwindow/BLACKLIST
@@ -1,3 +1,6 @@
+[openglContextCreatedSignal]
+opensuse-42.3
+opensuse-leap
# QTBUG-62177
[attachedProperty]
osx
diff --git a/tests/auto/quickwidgets/qquickwidget/BLACKLIST b/tests/auto/quickwidgets/qquickwidget/BLACKLIST
new file mode 100644
index 0000000000..18ea65bb72
--- /dev/null
+++ b/tests/auto/quickwidgets/qquickwidget/BLACKLIST
@@ -0,0 +1,3 @@
+[tabKey]
+opensuse-42.3
+opensuse-leap
diff --git a/tests/auto/shared/util.cpp b/tests/auto/shared/util.cpp
index 189398f0c2..96876428f6 100644
--- a/tests/auto/shared/util.cpp
+++ b/tests/auto/shared/util.cpp
@@ -40,7 +40,9 @@ QQmlDataTest::QQmlDataTest() :
m_dataDirectory(QTest::qFindTestData("data", QT_QMLTEST_DATADIR, 0)),
#endif
- m_dataDirectoryUrl(QUrl::fromLocalFile(m_dataDirectory + QLatin1Char('/')))
+ m_dataDirectoryUrl(m_dataDirectory.startsWith(QLatin1Char(':'))
+ ? QUrl(QLatin1String("qrc") + m_dataDirectory)
+ : QUrl::fromLocalFile(m_dataDirectory + QLatin1Char('/')))
{
m_instance = this;
}
@@ -54,7 +56,8 @@ void QQmlDataTest::initTestCase()
{
QVERIFY2(!m_dataDirectory.isEmpty(), "'data' directory not found");
m_directory = QFileInfo(m_dataDirectory).absolutePath();
- QVERIFY2(QDir::setCurrent(m_directory), qPrintable(QLatin1String("Could not chdir to ") + m_directory));
+ if (m_dataDirectoryUrl.scheme() != QLatin1String("qrc"))
+ QVERIFY2(QDir::setCurrent(m_directory), qPrintable(QLatin1String("Could not chdir to ") + m_directory));
}
QString QQmlDataTest::testFile(const QString &fileName) const
diff --git a/tests/auto/shared/util.pri b/tests/auto/shared/util.pri
index a05af4773d..b54897ac2c 100644
--- a/tests/auto/shared/util.pri
+++ b/tests/auto/shared/util.pri
@@ -3,4 +3,8 @@ INCLUDEPATH += $$PWD
HEADERS += $$PWD/util.h
SOURCES += $$PWD/util.cpp
-DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\"
+android|ios {
+ DEFINES += QT_QMLTEST_DATADIR=\\\":/data\\\"
+} else {
+ DEFINES += QT_QMLTEST_DATADIR=\\\"$${_PRO_FILE_PWD_}/data\\\"
+}