aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
-rw-r--r--tests/auto/qml/qqmllanguage/data/qtbug_89822.errors.txt1
-rw-r--r--tests/auto/qml/qqmllanguage/data/qtbug_89822.qml8
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp7
3 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/qtbug_89822.errors.txt b/tests/auto/qml/qqmllanguage/data/qtbug_89822.errors.txt
new file mode 100644
index 0000000000..d69122ef8b
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/qtbug_89822.errors.txt
@@ -0,0 +1 @@
+6:40:Invalid alias target
diff --git a/tests/auto/qml/qqmllanguage/data/qtbug_89822.qml b/tests/auto/qml/qqmllanguage/data/qtbug_89822.qml
new file mode 100644
index 0000000000..17602ca4b9
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/qtbug_89822.qml
@@ -0,0 +1,8 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+ readonly property QtObject test: QtObject { property int subproperty: 3}
+ readonly property alias testAlias: root.test.subproperty
+}
+
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 94ecd6862a..31bf30c57c 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -146,6 +146,7 @@ private slots:
void aliasProperties();
void aliasPropertiesAndSignals();
void aliasPropertyChangeSignals();
+ void qtbug_89822();
void componentCompositeType();
void i18n();
void i18n_data();
@@ -2232,6 +2233,12 @@ void tst_qqmllanguage::aliasPropertiesAndSignals()
QCOMPARE(o->property("test").toBool(), true);
}
+void tst_qqmllanguage::qtbug_89822()
+{
+ QQmlComponent component(&engine, testFileUrl("qtbug_89822.qml"));
+ VERIFY_ERRORS("qtbug_89822.errors.txt");
+}
+
// Test that the root element in a composite type can be a Component
void tst_qqmllanguage::componentCompositeType()
{