diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-24 14:14:46 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-25 12:51:34 +0100 |
commit | 140a34afdd9ecbb7bc5f9db3f68dcd43a6c534e3 (patch) | |
tree | b235dbaabac9e900992c76baf6b7f919b9a7195a /src/qmlcompiler/qqmljsscope_p.h | |
parent | 927dd69db9bbffcc423b735a7f89e950e052892a (diff) |
QmlCompiler: Unify parsing of QML components, JS programs, ES modules
There is no reason to duplicate the code for retrieving method
signatures 3 times over. As an added benefit, the types on those methods
are resolved now.
Change-Id: I2f9681911b938c4a260b6593ab49e9cc5098c546
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r-- | src/qmlcompiler/qqmljsscope_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h index 0801e6eb7e..711d24c7aa 100644 --- a/src/qmlcompiler/qqmljsscope_p.h +++ b/src/qmlcompiler/qqmljsscope_p.h @@ -108,7 +108,8 @@ public: enum Flag { Creatable = 0x1, Composite = 0x2, - Singleton = 0x4 + Singleton = 0x4, + Script = 0x8, }; Q_DECLARE_FLAGS(Flags, Flag) Q_FLAGS(Flags); @@ -216,9 +217,11 @@ public: bool isSingleton() const { return m_flags & Singleton; } bool isCreatable() const { return m_flags & Creatable; } bool isComposite() const { return m_flags & Composite; } + bool isScript() const { return m_flags & Script; } void setIsSingleton(bool v) { m_flags = v ? (m_flags | Singleton) : (m_flags & ~Singleton); } void setIsCreatable(bool v) { m_flags = v ? (m_flags | Creatable) : (m_flags & ~Creatable); } void setIsComposite(bool v) { m_flags = v ? (m_flags | Composite) : (m_flags & ~Composite); } + void setIsScript(bool v) { m_flags = v ? (m_flags | Script) : (m_flags & ~Script); } void setAccessSemantics(AccessSemantics semantics) { m_semantics = semantics; } AccessSemantics accessSemantics() const { return m_semantics; } |