aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsscope_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r--src/qmlcompiler/qqmljsscope_p.h43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index 9e0cfcd079..0de0a58401 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -52,25 +52,6 @@
QT_BEGIN_NAMESPACE
-enum class ScopeType
-{
- JSFunctionScope,
- JSLexicalScope,
- QMLScope
-};
-
-struct JavaScriptIdentifier
-{
- enum Kind {
- Parameter,
- FunctionScoped,
- LexicalScoped,
- Injected
- };
-
- Kind kind = FunctionScoped;
- QQmlJS::SourceLocation location;
-};
class QQmlJSScope
{
@@ -81,6 +62,13 @@ public:
using ConstPtr = QSharedPointer<const QQmlJSScope>;
using WeakConstPtr = QWeakPointer<const QQmlJSScope>;
+ enum ScopeType
+ {
+ JSFunctionScope,
+ JSLexicalScope,
+ QMLScope
+ };
+
enum class AccessSemantics {
Reference,
Value,
@@ -119,7 +107,20 @@ public:
int m_metaObjectRevision = 0;
};
- static QQmlJSScope::Ptr create(ScopeType type = ScopeType::QMLScope,
+ struct JavaScriptIdentifier
+ {
+ enum Kind {
+ Parameter,
+ FunctionScoped,
+ LexicalScoped,
+ Injected
+ };
+
+ Kind kind = FunctionScoped;
+ QQmlJS::SourceLocation location;
+ };
+
+ static QQmlJSScope::Ptr create(ScopeType type = QQmlJSScope::QMLScope,
const QQmlJSScope::Ptr &parentScope = QQmlJSScope::Ptr());
static QQmlJSScope::ConstPtr findCurrentQMLScope(const QQmlJSScope::ConstPtr &scope);
@@ -209,7 +210,7 @@ private:
QString m_baseTypeName;
QQmlJSScope::WeakConstPtr m_baseType;
- ScopeType m_scopeType = ScopeType::QMLScope;
+ ScopeType m_scopeType = QMLScope;
QList<Export> m_exports;
QString m_defaultPropertyName;