aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-29 07:48:59 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2019-04-29 08:34:50 +0000
commit9c25df6dd0412d0e4211370843d8cbb8aef1e512 (patch)
tree61919135b33113cf94753608b221758f95a8ce77 /tests/auto/qml
parent0ca32eb4c57ba43b64cfc74c0fbd1c63706952c2 (diff)
parent23f988fe48f3f3c63e8311c31ed09394702089d2 (diff)
Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qqmllanguage/data/typeWrapperToVariant.qml15
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp15
2 files changed, 30 insertions, 0 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"