diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-07-12 16:44:03 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-07-16 18:33:44 +0200 |
commit | d2c6ac8d5eaa1d4b53b647f01c53d821bbba4665 (patch) | |
tree | 0b006fe452155eb3806995dc5094ffb36a242d80 /src/qml/qml/qqmldirdata_p.h | |
parent | 53bb052704eed8672bbb37fcc6741d33c82177bd (diff) |
Clean up import resolution handling
Instead of storing raw pointers into the compiled data and creating
synthetic CompiledData::Import objects for implicit imports, this patch
introduces a dedicated PendingImport data structure that removes the
need of using raw pointers, reduces the amount of string index to string
resolution and incorporates the priority field thus eliminating the need
for a hash table.
Change-Id: Ia59aad17687bc0935aafd36236bda85d5f4f82a2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmldirdata_p.h')
-rw-r--r-- | src/qml/qml/qqmldirdata_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/qml/qqmldirdata_p.h b/src/qml/qml/qqmldirdata_p.h index 6af393c47f..34f1ff1678 100644 --- a/src/qml/qml/qqmldirdata_p.h +++ b/src/qml/qml/qqmldirdata_p.h @@ -65,8 +65,8 @@ private: public: const QString &content() const; - const QV4::CompiledData::Import *import(QQmlTypeLoader::Blob *) const; - void setImport(QQmlTypeLoader::Blob *, const QV4::CompiledData::Import *); + PendingImportPtr import(QQmlTypeLoader::Blob *) const; + void setImport(QQmlTypeLoader::Blob *, PendingImportPtr); int priority(QQmlTypeLoader::Blob *) const; void setPriority(QQmlTypeLoader::Blob *, int); @@ -77,7 +77,7 @@ protected: private: QString m_content; - QHash<QQmlTypeLoader::Blob *, const QV4::CompiledData::Import *> m_imports; + QHash<QQmlTypeLoader::Blob *, QQmlTypeLoader::Blob::PendingImportPtr> m_imports; QHash<QQmlTypeLoader::Blob *, int> m_priorities; }; |