qmllint: Check identifiers before giving up in case of previous errors

The identifier check might yet yield more information.

Change-Id: I96f700acf257736fea7e9c2023b9e8797f702f7c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
This commit is contained in:
Ulf Hermann 2020-10-26 13:55:52 +01:00
parent bffcb953e1
commit 03d81887d7
1 changed files with 2 additions and 4 deletions

View File

@ -339,9 +339,6 @@ bool FindWarningVisitor::check()
} }
} }
if (m_visitFailed)
return false;
// now that all ids are known, revisit any Connections whose target were perviously unknown // now that all ids are known, revisit any Connections whose target were perviously unknown
for (auto const &outstandingConnection: m_outstandingConnections) { for (auto const &outstandingConnection: m_outstandingConnections) {
auto targetScope = m_scopesById[outstandingConnection.targetName]; auto targetScope = m_scopesById[outstandingConnection.targetName];
@ -361,7 +358,8 @@ bool FindWarningVisitor::check()
return true; return true;
CheckIdentifiers check(&m_colorOut, m_code, m_rootScopeImports, m_filePath); CheckIdentifiers check(&m_colorOut, m_code, m_rootScopeImports, m_filePath);
return check(m_scopesById, m_signalHandlers, m_memberAccessChains, m_globalScope, m_rootId); return check(m_scopesById, m_signalHandlers, m_memberAccessChains, m_globalScope, m_rootId)
&& !m_visitFailed;
} }
bool FindWarningVisitor::visit(QQmlJS::AST::UiObjectBinding *uiob) bool FindWarningVisitor::visit(QQmlJS::AST::UiObjectBinding *uiob)