aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4executablecompilationunit_p.h
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/qv4executablecompilationunit_p.h
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/qv4executablecompilationunit_p.h')
-rw-r--r--src/qml/jsruntime/qv4executablecompilationunit_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4executablecompilationunit_p.h b/src/qml/jsruntime/qv4executablecompilationunit_p.h
index 3a0efa467e..b110ea3fd1 100644
--- a/src/qml/jsruntime/qv4executablecompilationunit_p.h
+++ b/src/qml/jsruntime/qv4executablecompilationunit_p.h
@@ -131,7 +131,7 @@ public:
int m_totalBindingsCount = 0; // Number of bindings used in this type
int m_totalParserStatusCount = 0; // Number of instantiated types that are QQmlParserStatus subclasses
int m_totalObjectCount = 0; // Number of objects explicitly instantiated
- int icRoot = -1;
+ std::unique_ptr<QString> icRootName;
int totalBindingsCount() const;
int totalParserStatusCount() const;
@@ -143,12 +143,12 @@ public:
bool verifyChecksum(const CompiledData::DependentTypesHasher &dependencyHasher) const;
- CompositeMetaTypeIds typeIdsForComponent(int objectid = 0) const;
+ CompositeMetaTypeIds typeIdsForComponent(const QString &inlineComponentName = QString()) const;
CompositeMetaTypeIds typeIds;
bool isRegistered = false;
- QHash<int, InlineComponentData> inlineComponentData;
+ QHash<QString, InlineComponentData> inlineComponentData;
int inlineComponentId(const QString &inlineComponentName) const
{