aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlpropertycachecreator_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-06-15 09:14:04 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-06-16 20:21:42 +0000
commitebe51b92a353ba17e6293c280b77aab3f2a02a90 (patch)
treea6f3453d3c90f91ec4828d85c5e62c3fc4b935ed /src/qml/compiler/qqmlpropertycachecreator_p.h
parent4da7ca32bb271355ae3e707499a3f5627de069d4 (diff)
Remove base-class dependency of QQmlPropertyCacheCreator
By not depending on QQmlCompilePass the code will be re-usable also outside of the type compiler in the future. Change-Id: I55c637886cf557d6d130c4f9325d6b0790cb2806 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlpropertycachecreator_p.h')
-rw-r--r--src/qml/compiler/qqmlpropertycachecreator_p.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/qml/compiler/qqmlpropertycachecreator_p.h b/src/qml/compiler/qqmlpropertycachecreator_p.h
index 8dd4b2bc0f..6d575c6a99 100644
--- a/src/qml/compiler/qqmlpropertycachecreator_p.h
+++ b/src/qml/compiler/qqmlpropertycachecreator_p.h
@@ -54,11 +54,11 @@
QT_BEGIN_NAMESPACE
-class QQmlPropertyCacheCreator : public QQmlCompilePass
+class QQmlPropertyCacheCreator
{
Q_DECLARE_TR_FUNCTIONS(QQmlPropertyCacheCreator)
public:
- QQmlPropertyCacheCreator(QQmlTypeCompiler *typeCompiler, QQmlPropertyCacheVector *propertyCaches);
+ QQmlPropertyCacheCreator(QQmlPropertyCacheVector *propertyCaches, QQmlEnginePrivate *enginePrivate, const QQmlTypeCompiler *compiler, const QQmlImports *imports);
~QQmlPropertyCacheCreator();
QQmlCompileError buildMetaObjects();
@@ -76,11 +76,12 @@ protected:
QQmlPropertyCache *propertyCacheForObject(const QmlIR::Object *obj, const InstantiationContext &context, QQmlCompileError *error) const;
QQmlCompileError createMetaObject(int objectIndex, const QmlIR::Object *obj, QQmlPropertyCache *baseTypeCache);
+ QString stringAt(int index) const { return compiler->stringAt(index); }
- QQmlEnginePrivate *enginePrivate;
+ QQmlEnginePrivate * const enginePrivate;
+ const QQmlTypeCompiler *compiler;
const QVector<QmlIR::Object*> &qmlObjects;
- const QQmlImports *imports;
- QHash<int, QV4::CompiledData::CompilationUnit::ResolvedTypeReference*> *resolvedTypes;
+ const QQmlImports * const imports;
QQmlPropertyCacheVector *propertyCaches;
};