diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-12-08 14:12:47 +0100 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2020-12-10 00:49:57 +0100 |
commit | c2ca14ce22551ea72544b6e2b3a19823b6dc3050 (patch) | |
tree | f077e197f77934454ea68caf66cb42d3b3643345 /tests/auto/qml | |
parent | 4e7ee1279cad0f49483895c3237fd86a6359aedd (diff) |
Fix IC properties in same file
Also fixes typename and metatype registration for inline components.
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Pick-to: 5.15
Fixes: QTBUG-89173
Change-Id: I97d65d5539b577a8828d5711e5f2e79c8568b441
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/inlineComponentsSameFile.qml | 11 | ||||
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 1 |
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() |