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.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index 24e401fa0a..0513612e42 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -166,8 +166,13 @@ public:
bool hasMethod(const QString &name) const;
QQmlJSMetaMethod method(const QString &name) const;
- void addEnum(const QQmlJSMetaEnum &fakeEnum) { m_enums.insert(fakeEnum.name(), fakeEnum); }
- QHash<QString, QQmlJSMetaEnum> enums() const { return m_enums; }
+ void addEnumeration(const QQmlJSMetaEnum &enumeration)
+ {
+ m_enumerations.insert(enumeration.name(), enumeration);
+ }
+ QHash<QString, QQmlJSMetaEnum> enumerations() const { return m_enumerations; }
+ QQmlJSMetaEnum enumeration(const QString &name) const { return m_enumerations.value(name); }
+ bool hasEnumeration(const QString &name) const { return m_enumerations.contains(name); }
QString fileName() const { return m_fileName; }
void setFileName(const QString &file) { m_fileName = file; }
@@ -246,7 +251,7 @@ private:
QMultiHash<QString, QQmlJSMetaMethod> m_methods;
QHash<QString, QQmlJSMetaProperty> m_properties;
- QHash<QString, QQmlJSMetaEnum> m_enums;
+ QHash<QString, QQmlJSMetaEnum> m_enumerations;
QVector<QQmlJSScope::Ptr> m_childScopes;
QQmlJSScope::WeakPtr m_parentScope;