diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-02-05 08:50:37 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-02-05 09:33:14 +0100 |
commit | 9dccec88e3394d9d2dc52812d9607f0bfa01a2d2 (patch) | |
tree | 4d3987ce5e93b7ae7ce39128faa5c0c6e81b46d2 /src/qml/qml/qqmltypecompiler.cpp | |
parent | a8bc011d459a4d080815a2675f2a0413c8bf09d2 (diff) |
Inline components: fix name resolution
Inline components are an explicit component boundary, and therefore need
some extra treatment.
Change-Id: I03cc0d58f3565999f64675e8482ed3c3a325e8c0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypecompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmltypecompiler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypecompiler.cpp b/src/qml/qml/qqmltypecompiler.cpp index 8d499bfe6a..d527fe0335 100644 --- a/src/qml/qml/qqmltypecompiler.cpp +++ b/src/qml/qml/qqmltypecompiler.cpp @@ -881,6 +881,10 @@ bool QQmlComponentAndAliasResolver::resolve() const int objCountWithoutSynthesizedComponents = qmlObjects->count(); for (int i = 0; i < objCountWithoutSynthesizedComponents; ++i) { QmlIR::Object *obj = qmlObjects->at(i); + if (obj->isInlineComponent) { + componentRoots.append(i); + continue; + } QQmlPropertyCache *cache = propertyCaches.at(i); if (obj->inheritedTypeNameIndex == 0 && !cache) continue; @@ -936,7 +940,7 @@ bool QQmlComponentAndAliasResolver::resolve() _objectsWithAliases.clear(); - if (!collectIdsAndAliases(rootBinding->value.objectIndex)) + if (!collectIdsAndAliases(component->isInlineComponent ? componentRoots.at(i) : rootBinding->value.objectIndex)) return false; component->namedObjectsInComponent.allocate(pool, _idToObjectIndex); |