aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-11 14:12:55 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-12 08:06:34 +0100
commit6a605df673380ffe4e7ee24417175f58ba7972a4 (patch)
tree182471e75532eefba19aede0a2690688db036ee5 /tools
parent262d7eb305e1dea8dac660bec3ccc50193258ea9 (diff)
QmlCompiler: Allow more convenient access to enums in QQmlJSScope
Change-Id: Ibac4dd7641a89b686bee63cf974b2257a35631a2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmllint/checkidentifiers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp
index 86ac84fcf1..6500595c83 100644
--- a/tools/qmllint/checkidentifiers.cpp
+++ b/tools/qmllint/checkidentifiers.cpp
@@ -197,7 +197,7 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<FieldMember> &members,
return true; // Access to property of JS function
auto checkEnums = [&](const QQmlJSScope::ConstPtr &scope) {
- const auto enums = scope->enums();
+ const auto enums = scope->enumerations();
for (const auto &enumerator : enums) {
if (enumerator.name() == access.m_name) {
detectedRestrictiveKind = QLatin1String("enum");
@@ -373,7 +373,7 @@ bool CheckIdentifiers::operator()(
const auto firstElement = root->childScopes()[0];
if (firstElement->hasProperty(memberAccessBase.m_name)
|| firstElement->hasMethod(memberAccessBase.m_name)
- || firstElement->enums().contains(memberAccessBase.m_name)) {
+ || firstElement->enumerations().contains(memberAccessBase.m_name)) {
m_colorOut->writePrefixedMessage(
memberAccessBase.m_name
+ QLatin1String(" is a member of the root element\n")