From 8457ca1b3dfb048acdb4426960ad7ee7c8227ed4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 25 May 2016 10:25:25 +0200 Subject: Simplify object to id-in-context mapping By storing the calculated integer id for an id-named object in CompiledData::Object we can simplify the code and replace a hash table with a plain vector. Change-Id: I4a84cdd00e98766d603d152e5a6574b232771a02 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlcompiler_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlcompiler_p.h') diff --git a/src/qml/qml/qqmlcompiler_p.h b/src/qml/qml/qqmlcompiler_p.h index a6856e60ed..e953673a4d 100644 --- a/src/qml/qml/qqmlcompiler_p.h +++ b/src/qml/qml/qqmlcompiler_p.h @@ -131,9 +131,9 @@ public: QList scripts; QQmlRefPointer compilationUnit; - // index in first hash is component index, hash inside maps from object index in that scope to integer id - QHash > objectIndexToIdPerComponent; - QHash objectIndexToIdForRoot; + // index in first hash is component index, vector inside contains object indices of objects with id property + QHash> namedObjectsPerComponent; + QVector namedObjectsInRootScope; // hash key is object index, value is indicies of bindings covered by custom parser QHash customParserBindings; QHash deferredBindingsPerObject; // index is object index -- cgit v1.2.3