diff options
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4function.cpp | 7 |
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(); } |