aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-01-08 13:40:12 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-01-18 14:54:21 +0100
commit4e5c096153b8a5d6e110ef8a6db265b0bc138ce1 (patch)
treeeb91d6c5cd07d880749c587661fd02a92ea64897 /src/qml/jsruntime/qv4function.cpp
parentffc687dca3ce3c37db6f47523881b457ce6ff6b1 (diff)
QtQml: Move type name cache into base CU
Change-Id: Ie3504f16b34859cdef72f8138e6058dcc2d1f58f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r--src/qml/jsruntime/qv4function.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index 7283565489..2e51366d64 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -148,9 +148,10 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
if (type == 0)
return QQmlType();
+ const auto base = unit->baseCompilationUnit();
const QQmlType qmltype = typeLoader
- ? unit->typeNameCache->query<QQmlImport::AllowRecursion>(
- unit->stringAt(type), typeLoader).type
+ ? base->typeNameCache->query<QQmlImport::AllowRecursion>(
+ base->stringAt(type), typeLoader).type
: QQmlType();
if (!qmltype.isValid() || qmltype.typeId().isValid())
@@ -158,7 +159,7 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
if (!qmltype.isComposite()) {
return qmltype.isInlineComponentType()
- ? unit->qmlTypeForComponent(qmltype.elementName())
+ ? base->qmlTypeForComponent(qmltype.elementName())
: QQmlType();
}