aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcompiler_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-05-25 10:25:25 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-05-26 11:33:00 +0000
commit8457ca1b3dfb048acdb4426960ad7ee7c8227ed4 (patch)
treed33256028f22b5a28a9ea6fda3b98bedc5aeebab /src/qml/qml/qqmlcompiler_p.h
parent899c1ef0f7574019f1b41a922b2ba10614df130f (diff)
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 <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlcompiler_p.h')
-rw-r--r--src/qml/qml/qqmlcompiler_p.h6
1 files changed, 3 insertions, 3 deletions
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<QQmlScriptData *> scripts;
QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit;
- // index in first hash is component index, hash inside maps from object index in that scope to integer id
- QHash<int, QHash<int, int> > objectIndexToIdPerComponent;
- QHash<int, int> objectIndexToIdForRoot;
+ // index in first hash is component index, vector inside contains object indices of objects with id property
+ QHash<int, QVector<quint32>> namedObjectsPerComponent;
+ QVector<quint32> namedObjectsInRootScope;
// hash key is object index, value is indicies of bindings covered by custom parser
QHash<int, QBitArray> customParserBindings;
QHash<int, QBitArray> deferredBindingsPerObject; // index is object index