diff options
Diffstat (limited to 'src/qml/qml/qqmlcontext_p.h')
-rw-r--r-- | src/qml/qml/qqmlcontext_p.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/qml/qml/qqmlcontext_p.h b/src/qml/qml/qqmlcontext_p.h index f0e0ab26c6..ddf7d5de75 100644 --- a/src/qml/qml/qqmlcontext_p.h +++ b/src/qml/qml/qqmlcontext_p.h @@ -144,8 +144,17 @@ public: // Compilation unit for contexts that belong to a compiled type. QQmlRefPointer<QV4::CompiledData::CompilationUnit> typeCompilationUnit; - // Property name cache - QV4::IdentifierHash<int> propertyNames; + struct ObjectIdMapping { + ObjectIdMapping() : id(-1) {} + ObjectIdMapping(const QString &name, int id) + : name(name), id(id) {} + QString name; + int id; + }; + + mutable QVector<ObjectIdMapping> idObjectNames; + mutable QV4::IdentifierHash<int> propertyNameCache; + QV4::IdentifierHash<int> &propertyNames() const; // Context object QObject *contextObject; @@ -188,13 +197,6 @@ public: QFlagPointer<QQmlContextData> context; QQmlNotifier bindings; }; - struct ObjectIdMapping { - ObjectIdMapping() : id(-1) {} - ObjectIdMapping(const QString &name, int id) - : name(name), id(id) {} - QString name; - int id; - }; ContextGuard *idValues; int idValueCount; void setIdProperty(int, QObject *); |