diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-06-16 10:08:13 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-06-17 07:38:49 +0000 |
commit | d18026b00713de93bc3bd8f7e85f1ff0cf128185 (patch) | |
tree | c5245cd134a15179bccdc1cda835773168d3291a /src/qml/qml/qqmltypeloader_p.h | |
parent | 6b60de934bef14b17c05e726cea05b0bef8b8004 (diff) |
Moved import cache and type resolution cache code
The code reads mostly from QQmlTypeData internal data structures, so
it's cleaner to move it there - we can remove the getters for these
internal fields. And it also allows for re-use later when not using the
type compiler.
Change-Id: I36cfaf3f1cecd6c8b223ee08516884a07bc60d6c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/qml/qqmltypeloader_p.h')
-rw-r--r-- | src/qml/qml/qqmltypeloader_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmltypeloader_p.h b/src/qml/qml/qqmltypeloader_p.h index 68b4d18a14..20f701514a 100644 --- a/src/qml/qml/qqmltypeloader_p.h +++ b/src/qml/qml/qqmltypeloader_p.h @@ -81,6 +81,7 @@ class QQmlComponentPrivate; class QQmlTypeData; class QQmlTypeLoader; class QQmlExtensionInterface; +struct QQmlCompileError; namespace QmlIR { struct Document; @@ -151,6 +152,7 @@ protected: // Can be called from within callbacks void setError(const QQmlError &); void setError(const QList<QQmlError> &errors); + void setError(const QQmlCompileError &error); void addDependency(QQmlDataBlob *); // Callbacks made in load thread @@ -390,6 +392,7 @@ private: class Q_AUTOTEST_EXPORT QQmlTypeData : public QQmlTypeLoader::Blob { + Q_DECLARE_TR_FUNCTIONS(QQmlTypeData) public: struct TypeReference { @@ -421,11 +424,7 @@ private: public: ~QQmlTypeData(); - const QHash<int, TypeReference> &resolvedTypeRefs() const { return m_resolvedTypes; } - const QList<ScriptReference> &resolvedScripts() const; - const QSet<QString> &namespaces() const; - const QList<TypeReference> &compositeSingletons() const; QV4::CompiledData::CompilationUnit *compilationUnit() const; @@ -451,6 +450,7 @@ protected: private: void continueLoadFromIR(); void resolveTypes(); + QQmlCompileError buildTypeResolutionCaches(QQmlRefPointer<QQmlTypeNameCache> *importCache, QV4::CompiledData::CompilationUnit::ResolvedTypeReferenceMap *resolvedTypeCache) const; void compile(); bool resolveType(const QString &typeName, int &majorVersion, int &minorVersion, TypeReference &ref); |