diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-26 13:06:50 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-30 13:42:35 +0200 |
commit | 79f811dd09a1ecf31b8649eaf0fe3ef940bcf403 (patch) | |
tree | ae1b4319c8f8b8812a8aebc24bffb3fcafebfd90 /src/qml/qml/qqmltypedata_p.h | |
parent | bd845c2050204eadbac76d35e5f8b012aade4b52 (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/qml/qqmltypedata_p.h')
-rw-r--r-- | src/qml/qml/qqmltypedata_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmltypedata_p.h b/src/qml/qml/qqmltypedata_p.h index 9e4f85974b..2c9058dc26 100644 --- a/src/qml/qml/qqmltypedata_p.h +++ b/src/qml/qml/qqmltypedata_p.h @@ -68,7 +68,7 @@ public: void registerCallback(TypeDataCallback *); void unregisterCallback(TypeDataCallback *); - CompositeMetaTypeIds typeIds(int objectId = 0) const; + CompositeMetaTypeIds typeIds(const QString &inlineComponentName = QString()) const; QByteArray typeClassName() const { return m_typeClassName; } SourceCodeData backupSourceCode() const { return m_backupSourceCode; } @@ -126,7 +126,7 @@ private: using ExecutableCompilationUnitPtr = QQmlRefPointer<QV4::ExecutableCompilationUnit>; - QHash<int, InlineComponentData> m_inlineComponentData; + QHash<QString, InlineComponentData> m_inlineComponentData; ExecutableCompilationUnitPtr m_compiledData; |