From 79f811dd09a1ecf31b8649eaf0fe3ef940bcf403 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 26 May 2023 13:06:50 +0200 Subject: 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 --- src/qml/qml/qqmltypedata_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmltypedata_p.h') 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; - QHash m_inlineComponentData; + QHash m_inlineComponentData; ExecutableCompilationUnitPtr m_compiledData; -- cgit v1.2.3