diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-09 12:02:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-10-15 10:44:25 +0200 |
commit | 678d4ec4b68d43d0c748a8ec62a13716f83a27cf (patch) | |
tree | 863c228d5f0c46d494f2aee24e65f7ef21ee9e77 /tools/qmllint/checkidentifiers.cpp | |
parent | f98c961da6d039621ae40ab6c1a79c4b06efb83f (diff) |
Unify QQmlJSImportVisitor and FindWarningsVisitor
They are both pretty much doing the same thing, except that the import
visitor is not as thorough. We need the full analysis in QtQmlCompiler,
so we successively move the code over.
Change-Id: If7fb47f88165fd8b61f4ccc408ccfbb7dad533e6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tools/qmllint/checkidentifiers.cpp')
-rw-r--r-- | tools/qmllint/checkidentifiers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmllint/checkidentifiers.cpp b/tools/qmllint/checkidentifiers.cpp index b7d331521c..09c39ddd63 100644 --- a/tools/qmllint/checkidentifiers.cpp +++ b/tools/qmllint/checkidentifiers.cpp @@ -373,8 +373,8 @@ bool CheckIdentifiers::operator()( printContext(m_code, m_colorOut, location); - // root(JS) --> program(qml) --> (first element) - const auto firstElement = root->childScopes()[0]->childScopes()[0]; + // root(JS) --> (first element) + const auto firstElement = root->childScopes()[0]; if (firstElement->properties().contains(memberAccessBase.m_name) || firstElement->methods().contains(memberAccessBase.m_name) || firstElement->enums().contains(memberAccessBase.m_name)) { |