QQmlJSTypeResolver: Don't store the importer

We only need it to extract the builtins at construction time.

Change-Id: I5269dea2ad1afc0a793c2b8e92d0bb507647afce
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ulf Hermann 2021-11-10 11:38:46 +01:00
parent be194d965d
commit adf0f541e5
2 changed files with 1 additions and 5 deletions

View File

@ -67,8 +67,7 @@ static bool searchBaseAndExtensionTypes(const QQmlJSScope::ConstPtr type, const
QQmlJSTypeResolver::QQmlJSTypeResolver(QQmlJSImporter *importer, const QmlIR::Document *document,
TypeStorage storage, Semantics semantics,
QQmlJSLogger *logger)
: m_importer(importer)
, m_document(document)
: m_document(document)
, m_typeStorage(storage)
, m_semantics(semantics)
, m_parentMode(semantics == Static ? UseDocumentParent : UseParentProperty)

View File

@ -86,8 +86,6 @@ public:
QQmlJSScope::ConstPtr metaObjectType() const { return m_metaObjectType; }
QQmlJSScope::ConstPtr jsGlobalObject() const { return m_jsGlobalObject; }
QQmlJSImporter *importer() const { return m_importer; }
QQmlJSScope::ConstPtr scopeForLocation(const QV4::CompiledData::Location &location) const;
QQmlJSScope::ConstPtr scopeForId(const QString &id) const;
@ -175,7 +173,6 @@ protected:
QQmlJSScope::ConstPtr m_metaObjectType;
QQmlJSScope::ConstPtr m_jsGlobalObject;
QQmlJSImporter *m_importer = nullptr;
const QmlIR::Document *m_document = nullptr;
QHash<QString, QQmlJSScope::ConstPtr> m_objectsById;