forked from qt-creator/qt-creator
QmlJSCheck: Do not warn about visual properties in Connections
Change-Id: I1b8d9374021d337d87025290fd025dd600fc3967 Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1442,7 +1442,11 @@ bool Check::visit(BinaryExpression *ast)
|
|||||||
|
|
||||||
SourceLocation expressionSourceLocation = locationFromRange(ast->firstSourceLocation(),
|
SourceLocation expressionSourceLocation = locationFromRange(ast->firstSourceLocation(),
|
||||||
ast->lastSourceLocation());
|
ast->lastSourceLocation());
|
||||||
if (expressionAffectsVisualAspects(ast))
|
|
||||||
|
const bool isDirectInConnectionsScope = (!m_typeStack.isEmpty()
|
||||||
|
&& m_typeStack.last() == "Connections");
|
||||||
|
|
||||||
|
if (expressionAffectsVisualAspects(ast) && !isDirectInConnectionsScope)
|
||||||
addMessage(WarnImperativeCodeNotEditableInVisualDesigner, expressionSourceLocation);
|
addMessage(WarnImperativeCodeNotEditableInVisualDesigner, expressionSourceLocation);
|
||||||
|
|
||||||
// check ==, !=
|
// check ==, !=
|
||||||
|
Reference in New Issue
Block a user