diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-08-17 16:27:38 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-08-22 05:05:50 +0000 |
commit | ec25258346102484257a708be3b604aec6ea951f (patch) | |
tree | f97b311331edfee37056b952be3e498d390d584e /tests/auto/qml/qqmllanguage/data | |
parent | 71e6a60a3d9c33b821de09ab4e7eed9eefbf38c6 (diff) |
QtQml: Create implicit components in inline components early
When the resolve() method is called on an inline component root we can
resolve implicit components inside that element right away. If we wait
for the inline component root to show up again in an outer element,
there are a number of code paths that may miss it.
Pick-to: 6.6
Fixes: QTBUG-98859
Change-Id: I5a37422332fc2cde6b9b2f7ca9ad73ac3bbd4ff2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/inlineComponentWithImplicitComponent.qml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/inlineComponentWithImplicitComponent.qml b/tests/auto/qml/qqmllanguage/data/inlineComponentWithImplicitComponent.qml new file mode 100644 index 0000000000..902dfb501d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/inlineComponentWithImplicitComponent.qml @@ -0,0 +1,27 @@ +import QtQml + +QtObject { + component C1: QtObject { + property Component comp: null + } + + component C2: C1 { + comp: QtObject { + objectName: "green" + } + } + + component C3: C1 { + comp: Component { + QtObject { + objectName: "blue" + } + } + } + + property QtObject c1: C1 {} + property QtObject c2: C2 {} + property QtObject c3: C3 {} + + objectName: c2.comp.createObject().objectName + " " + c3.comp.createObject().objectName +} |