From a8d3159fc71864c06d615fe4a3cdba42836e3336 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 15 Oct 2020 13:27:47 +0200 Subject: QmlCompiler: Pass source location to all scopes from QML files Change-Id: Ic0aeb152acb0d90d15cc48a55c0ad5b15a60a6eb Reviewed-by: Fabian Kosmale --- tools/qmllint/findwarnings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/qmllint') diff --git a/tools/qmllint/findwarnings.cpp b/tools/qmllint/findwarnings.cpp index 7325c26a58..236ede4364 100644 --- a/tools/qmllint/findwarnings.cpp +++ b/tools/qmllint/findwarnings.cpp @@ -109,10 +109,10 @@ void FindWarningVisitor::throwRecursionDepthError() m_visitFailed = true; } -bool FindWarningVisitor::visit(QQmlJS::AST::ExpressionStatement *) +bool FindWarningVisitor::visit(QQmlJS::AST::ExpressionStatement *ast) { if (m_pendingSingalHandler.isValid()) { - enterEnvironment(QQmlJSScope::JSFunctionScope, "signalhandler"); + enterEnvironment(QQmlJSScope::JSFunctionScope, "signalhandler", ast->firstSourceLocation()); flushPendingSignalParameters(); } return true; -- cgit v1.2.3