aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/inlinecomponentutils_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/inlinecomponentutils_p.h')
-rw-r--r--src/qml/inlinecomponentutils_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/qml/inlinecomponentutils_p.h b/src/qml/inlinecomponentutils_p.h
index 92ae719750..ba08bb5c80 100644
--- a/src/qml/inlinecomponentutils_p.h
+++ b/src/qml/inlinecomponentutils_p.h
@@ -58,6 +58,11 @@ public:
using NodeList = std::vector<Node>;
using AdjacencyList = std::vector<std::vector<Node*>>;
+inline bool containedInSameType(const QQmlType &a, const QQmlType &b)
+{
+ return QQmlMetaType::equalBaseUrls(a.sourceUrl(), b.sourceUrl());
+}
+
template<typename ObjectContainer, typename InlineComponent>
void fillAdjacencyListForInlineComponents(ObjectContainer *objectContainer,
AdjacencyList &adjacencyList, NodeList &nodes,
@@ -75,7 +80,7 @@ void fillAdjacencyListForInlineComponents(ObjectContainer *objectContainer,
if (targetTypeRef) {
const auto targetType = targetTypeRef->type();
if (targetType.isInlineComponentType()
- && targetType.containingType() == currentICTypeRef->type().containingType()) {
+ && containedInSameType(targetType, currentICTypeRef->type())) {
auto icIt = std::find_if(allICs.cbegin(), allICs.cend(), [&](const QV4::CompiledData::InlineComponent &icSearched){
return objectContainer->stringAt(icSearched.nameIndex)
== targetType.elementName();