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:
Thomas Hartmann
2021-11-29 12:24:26 +01:00
parent e1370a01ff
commit 0e696e19fe

View File

@@ -1236,6 +1236,10 @@ bool Check::visit(FunctionExpression *ast)
} }
} }
const bool isDirectInConnectionsScope =
(!m_typeStack.isEmpty() && m_typeStack.last() == "Connections");
if (!isDirectInConnectionsScope)
addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen)); addMessage(ErrFunctionsNotSupportedInQmlUi, locationFromRange(locfunc, loclparen));
DeclarationsCheck bodyCheck; DeclarationsCheck bodyCheck;