aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qqmllanguage/data/inlineComponentsSameFile.qml11
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp1
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/inlineComponentsSameFile.qml b/tests/auto/qml/qqmllanguage/data/inlineComponentsSameFile.qml
new file mode 100644
index 0000000000..87cac10200
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/inlineComponentsSameFile.qml
@@ -0,0 +1,11 @@
+import QtQml 2.15
+
+QtObject {
+ component IC : QtObject {
+ property string name
+ property int age
+ }
+
+ property IC other: IC { name: "Toby"; age: 30 }
+ property list<IC> listProp: [IC { name: "Alfred Ill"; age: 65 }, IC { name: "Claire Zachanassian"; age: 62}]
+}
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 9f4cdb770e..7d0d39f4cd 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -5722,6 +5722,7 @@ void tst_qqmllanguage::inlineComponent_data()
QTest::newRow("Alias resolves correctly") << testFileUrl("inlineComponentWithAlias.qml") << QColorConstants::Svg::lime << 42 << true;
QTest::newRow("Two inline components in same do not crash (QTBUG-86989)") << testFileUrl("twoInlineComponents.qml") << QColor() << 0 << false;
+ QTest::newRow("Inline components used in same file (QTBUG-89173)") << testFileUrl("inlineComponentsSameFile.qml") << QColor() << 0 << false;
}
void tst_qqmllanguage::inlineComponentReferenceCycle_data()