aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlpropertyvalidator_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-02-18 14:24:45 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-02-18 14:40:10 +0000
commit06ec6340d0eff763e52135afabc13662b3892c43 (patch)
tree839663e808cb49633a35a453beb85f4b49801b96 /src/qml/compiler/qqmlpropertyvalidator_p.h
parent2131ec383b588e2160cb72247e61f7eab71cc0b1 (diff)
Avoid unnecessary re-generation qml cache files in some circumstances
The map of name IDs to resolved types so far is copied several times during compilation and different compile passes see different copies of it. Compile passes may add things to the map, and if they do that on copies that are inaccessible to other code, we get nondeterministic results. Furthermore all the copies and pointers are confusing and inefficient. Fixes: QTBUG-69340 Change-Id: I43ad3cbeeec34f90e05570eddc901fe8aa64c709 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlpropertyvalidator_p.h')
-rw-r--r--src/qml/compiler/qqmlpropertyvalidator_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/compiler/qqmlpropertyvalidator_p.h b/src/qml/compiler/qqmlpropertyvalidator_p.h
index 67a2f989af..e9ae844ccb 100644
--- a/src/qml/compiler/qqmlpropertyvalidator_p.h
+++ b/src/qml/compiler/qqmlpropertyvalidator_p.h
@@ -72,12 +72,15 @@ private:
Q_REQUIRED_RESULT QVector<QQmlCompileError> recordError(const QV4::CompiledData::Location &location, const QString &description) const;
Q_REQUIRED_RESULT QVector<QQmlCompileError> recordError(const QQmlCompileError &error) const;
QString stringAt(int index) const { return compilationUnit->stringAt(index); }
+ QV4::CompiledData::ResolvedTypeReference *resolvedType(int id) const
+ {
+ return compilationUnit->resolvedType(id);
+ }
QQmlEnginePrivate *enginePrivate;
QQmlRefPointer<QV4::CompiledData::CompilationUnit> compilationUnit;
const QQmlImports &imports;
const QV4::CompiledData::Unit *qmlUnit;
- const QV4::CompiledData::ResolvedTypeReferenceMap &resolvedTypes;
const QQmlPropertyCacheVector &propertyCaches;
QVector<QV4::CompiledData::BindingPropertyData> * const bindingPropertyDataPerObject;