aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-02-04 15:49:39 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-04 23:30:18 +0000
commit9bbbd0cb21e2e0e0cfa605cc7785e76990fca8be (patch)
tree6d4048925b671846510f2ee5c10e288584d1a0bd /src
parentf5d48eb84a0855b0a9492ee6eb3b2fba8f108889 (diff)
QmlCompiler: Place code for CmpNeInt in parentheses
Otherwise it will apply the '!' to the first argument. Fixes: QTBUG-100480 Change-Id: Iaefa25d062ad8bbd9d4278ffeaa52fc53ed417e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit db6459665c4b4a48db9aefebfe310237e7cc92d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/qmlcompiler/qqmljscodegenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljscodegenerator.cpp b/src/qmlcompiler/qqmljscodegenerator.cpp
index 639a832c1e..7a512f5d47 100644
--- a/src/qmlcompiler/qqmljscodegenerator.cpp
+++ b/src/qmlcompiler/qqmljscodegenerator.cpp
@@ -1904,8 +1904,8 @@ void QQmlJSCodeGenerator::generate_CmpNeInt(int lhsConst)
{
INJECT_TRACE_INFO(generate_CmpNeInt);
- m_body += m_state.accumulatorVariableOut + u" = !"_qs + eqIntExpression(lhsConst)
- + u";\n"_qs;
+ m_body += m_state.accumulatorVariableOut + u" = !("_qs + eqIntExpression(lhsConst)
+ + u");\n"_qs;
}
void QQmlJSCodeGenerator::generate_CmpEq(int lhs)