aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qqmljsscope_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-01-20 14:20:48 +0100
committerUlf Hermann <ulf.hermann@qt.io>2021-01-21 08:45:16 +0100
commit39944e8467e5e5d4457e9fec202413adf0fbb2d2 (patch)
treeabf0b4dd17837649a42e0860be754f4f321d9aca /src/qmlcompiler/qqmljsscope_p.h
parent90be89d771425044a84e9e79e4e668e065acc825 (diff)
qmllint: Remove exceptions for most unknown builtins
All those types are properly defined in the qmltypes files now. We just need to search the enumerations the same way as methods and properties in order to find everything. Also, deduplicate the code that resolves properties, methods, and enums by using a common template for iterating the scopes. Change-Id: I0bf1423974d0ec8f602ecd0342522b3e981a8586 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qqmljsscope_p.h')
-rw-r--r--src/qmlcompiler/qqmljsscope_p.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/qmlcompiler/qqmljsscope_p.h b/src/qmlcompiler/qqmljsscope_p.h
index 4e16f45930..9cb08c655e 100644
--- a/src/qmlcompiler/qqmljsscope_p.h
+++ b/src/qmlcompiler/qqmljsscope_p.h
@@ -175,13 +175,14 @@ public:
bool hasMethod(const QString &name) const;
QList<QQmlJSMetaMethod> methods(const QString &name) const;
- 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); }
+ void addOwnEnumeration(const QQmlJSMetaEnum &enumeration) { m_enumerations.insert(enumeration.name(), enumeration); }
+ QHash<QString, QQmlJSMetaEnum> ownEnumerations() const { return m_enumerations; }
+ QQmlJSMetaEnum ownEnumeration(const QString &name) const { return m_enumerations.value(name); }
+ bool hasOwnEnumeration(const QString &name) const { return m_enumerations.contains(name); }
+
+ bool hasEnumeration(const QString &name) const;
+ bool hasEnumerationKey(const QString &name) const;
+ QQmlJSMetaEnum enumeration(const QString &name) const;
QString fileName() const { return m_fileName; }
void setFileName(const QString &file) { m_fileName = file; }