aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qml/qqmllanguage/data/alias.16.qml15
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp10
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/alias.16.qml b/tests/auto/qml/qqmllanguage/data/alias.16.qml
new file mode 100644
index 0000000000..4637aec58f
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/alias.16.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+import QtQuick.Window 2.0
+
+Window {
+ visible: true
+
+ property alias list: repeater.model
+
+ list: ["A", "B", "C"]
+
+ Repeater {
+ id: repeater
+ }
+}
+
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 52decf9e11..c3b0fce35f 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -1872,6 +1872,16 @@ void tst_qqmllanguage::aliasProperties()
QVERIFY(subObject->property("success").toBool());
}
+
+ // Alias to sub-object with binding (QTBUG-57041)
+ {
+ // This is shold *not* crash.
+ QQmlComponent component(&engine, testFileUrl("alias.16.qml"));
+ VERIFY_ERRORS(0);
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+ }
}
// QTBUG-13374 Test that alias properties and signals can coexist