forked from qt-creator/qt-creator
QmlJsCheck: Allow new connection syntax in Connections
Change-Id: Ibbef3f8e8230d727d3183fa1615e0f38373a3c7f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -1236,7 +1236,11 @@ bool Check::visit(FunctionExpression *ast)
|
||||
}
|
||||
}
|
||||
|
||||
addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen));
|
||||
const bool isDirectInConnectionsScope =
|
||||
(!m_typeStack.isEmpty() && m_typeStack.last() == "Connections");
|
||||
|
||||
if (!isDirectInConnectionsScope)
|
||||
addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen));
|
||||
|
||||
DeclarationsCheck bodyCheck;
|
||||
addMessages(bodyCheck(ast));
|
||||
|
Reference in New Issue
Block a user