diff options
author | Evgeniy A. Dushistov <dushistov@mail.ru> | 2020-06-16 23:52:24 +0300 |
---|---|---|
committer | Evgeniy A. Dushistov <dushistov@mail.ru> | 2020-06-17 14:04:42 +0300 |
commit | 3615c72b666633cef9045012bbb05d5372c35cdf (patch) | |
tree | 8c6a456db529bd46e2bec9f6b23e0990c8e4fd2f /tools/qmllint/checkidentifiers.cpp | |
parent | 1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df (diff) |
qmllint: fix wrong warning about enum usage
Fixes: QTBUG-83796
Change-Id: I635bbfd98cf7be8418b454626ba7725e92b71c2c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/checkidentifiers.cpp')
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index 32c2fa4d79..e1593182ab 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -173,6 +173,12 @@ bool CheckIdentifiers::checkMemberAccess(const QVector<ScopeTree::FieldMember> & const auto enums = scope->enums(); for (const auto &enumerator : enums) { + if (enumerator.name() == access.m_name) { + detectedRestrictiveKind = QLatin1String("enum"); + detectedRestrictiveName = access.m_name; + expectedNext.append(enumerator.keys()); + break; + } for (const QString &key : enumerator.keys()) { if (access.m_name == key) { detectedRestrictiveKind = QLatin1String("enum"); |