aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-05-26 13:06:50 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-05-30 13:42:35 +0200
commit79f811dd09a1ecf31b8649eaf0fe3ef940bcf403 (patch)
treeae1b4319c8f8b8812a8aebc24bffb3fcafebfd90 /src/qml/jsruntime/qv4function.cpp
parentbd845c2050204eadbac76d35e5f8b012aade4b52 (diff)
QtQml: Index inline components by name rather than ID
The ID can only be determined once the compilation unit is present. It depends on the order of objects in the compiled data. The name is always available. Indexing by name increases the overhead. However, since we don't have to "amend" the ID later on and since we only need one lookup table rather than two per type now, it's probably worth it. Change-Id: I478de505a1934b5b6ab340b4be4fa5da4e95aeb3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
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 5edccafa3c..42f952ff19 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -163,8 +163,7 @@ Function::Function(ExecutionEngine *engine, ExecutableCompilationUnit *unit,
if (!qmltype.isComposite()) {
if (!qmltype.isInlineComponentType())
return QMetaType();
- const CompositeMetaTypeIds typeIds
- = unit->typeIdsForComponent(qmltype.inlineComponentId());
+ const CompositeMetaTypeIds typeIds = unit->typeIdsForComponent(qmltype.elementName());
return param.isList() ? typeIds.listId : typeIds.id;
}