diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-09 13:13:52 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2021-12-12 20:25:51 +0100 |
commit | 62e6ac6a81db013ac52a8e0a93ef777ae91e27f8 (patch) | |
tree | a687148418a34f54d97ddee222ffa96dba31cacd /src/qmlcompiler/qqmljsscope_p.h | |
parent | 573b6c9c8bcd5cf53c2ecd6cd93c7b74242b0bca (diff) |
QQmlJSScope: Store exports externally
We don't want to create a QQmlJSScope just to annotate it with the
export entry found in a qmldir file. Furthermore, after type resolution
the exports are useless.
Change-Id: I536c9d84ffe85bc46974fc5cfebad6c76c8d9932
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 5df585e3f4..81ce7e9dc1 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -205,9 +205,6 @@ public: bool causesImplicitComponentWrapping() const; bool isComponentRootElement() const; - void addExport(const QString &name, const QString &package, const QTypeRevision &version); - QList<Export> exports() const { return m_exports; } - void setInterfaceNames(const QStringList& interfaces) { m_interfaceNames = interfaces; } QStringList interfaceNames() const { return m_interfaceNames; } @@ -445,7 +442,6 @@ private: QQmlJSScope::WeakConstPtr m_baseType; ScopeType m_scopeType = QMLScope; - QList<Export> m_exports; QStringList m_interfaceNames; QStringList m_ownDeferredNames; QStringList m_ownImmediateNames; @@ -469,6 +465,11 @@ private: int m_runtimeId = -1; // an index counterpart of "foobar" in `id: foobar` }; +struct QQmlJSExportedScope { + QQmlJSScope::Ptr scope; + QList<QQmlJSScope::Export> exports; +}; + struct QQmlJSTypeInfo { QMultiHash<QQmlJSScope::ConstPtr, QQmlJSScope::ConstPtr> usedAttachedTypes; |