diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2023-09-19 11:14:31 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2023-09-19 12:25:44 +0000 |
commit | 096c825084f52b2c292ada10fec8269c027e029c (patch) | |
tree | 1f0762d84d873a4545c6fca6d3b597750d04dab4 /src/libs/qmljs | |
parent | e156854fc38b61fcfa1b7aec533d92b5055663dd (diff) |
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>
Diffstat (limited to 'src/libs/qmljs')
-rw-r--r-- | src/libs/qmljs/qmljscheck.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 9aaf5c02a1..feab41f24b 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -1442,7 +1442,11 @@ bool Check::visit(BinaryExpression *ast) SourceLocation expressionSourceLocation = locationFromRange(ast->firstSourceLocation(), ast->lastSourceLocation()); - if (expressionAffectsVisualAspects(ast)) + + const bool isDirectInConnectionsScope = (!m_typeStack.isEmpty() + && m_typeStack.last() == "Connections"); + + if (expressionAffectsVisualAspects(ast) && !isDirectInConnectionsScope) addMessage(WarnImperativeCodeNotEditableInVisualDesigner, expressionSourceLocation); // check ==, != |