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-24 23:20:14 +0100 |
commit | bb0ce1ffd48aa69da03dc43bd314351519ebf0d7 (patch) | |
tree | a603b32e6b6d731852197340c60a05c5c9f87fd5 /tests | |
parent | 5a7aa7881fa2c7abffb3d34a6b642fe4efcadbf4 (diff) |
Fix IC properties in same file
Also fixes typename and metatype registration for inline components.
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Fixes: QTBUG-89173
Change-Id: I97d65d5539b577a8828d5711e5f2e79c8568b441
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit c2ca14ce22551ea72544b6e2b3a19823b6dc3050)
Diffstat (limited to 'tests')
-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 8adcbc1837..e247a139ec 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -5604,6 +5604,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() |