aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-10-16 09:17:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-10-19 09:30:13 +0200
commitbf2258e6f44f1279eee5e9c2dd595c5dd2020784 (patch)
treeada16548f855b1b778bbfbb1ac1e09522c17e472 /src/qml/jsruntime/qv4function.cpp
parentbbeca33068718b8f5b820d20085e42ca86a5ffd5 (diff)
QtQml: Don't unnecessarily detour through the CU to look up types
Since we also store partial types as QQmlType now, we can just look them up the regular way. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-117788 Change-Id: Id3e81853f802419f1121ef5e856c3272a3c977a1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
-rw-r--r--src/qml/jsruntime/qv4function.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index 44e05fbfcc..ced169407a 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -136,7 +136,6 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
JSTypedFunction *synthesized = new JSTypedFunction;
- QQmlEnginePrivate *enginePrivate = QQmlEnginePrivate::get(engine->qmlEngine());
auto findQmlType = [&](const CompiledData::ParameterType &param) {
const quint32 type = param.typeNameIndexOrCommonType();
if (param.indexIsCommonType()) {
@@ -158,7 +157,7 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
: QQmlType();
}
- return enginePrivate->typeLoader.getType(qmltype.sourceUrl())->compilationUnit()->qmlType;
+ return qmltype;
};
for (quint16 i = 0; i < nFormals; ++i)