diff options
author | Ali Kianian <ali.kianian@qt.io> | 2023-09-19 17:33:10 +0300 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2023-09-19 16:31:38 +0000 |
commit | 04ea83a79a1a19f822e7f621a210784713785d69 (patch) | |
tree | 910b77562d33a219588f251182d4bd1ba869758a | |
parent | 3f29e13822f3aa2fb62df7ceb928d2f44b50faa7 (diff) |
QmlDesigner: Fix the crash on visiting callExpression
Fixed the bug for visiting a callExpression outside of the statement.
Task-number: QDS-10708
Change-Id: Iebe8c1c8d73f1d601e1fba6adaca1ce89d89d0ff
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r-- | src/plugins/qmldesigner/components/connectioneditor/connectioneditorevaluator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectioneditorevaluator.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectioneditorevaluator.cpp index c7d3ae977a..5bb9639025 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectioneditorevaluator.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectioneditorevaluator.cpp @@ -967,11 +967,11 @@ bool ConnectionEditorEvaluator::visit(QmlJS::AST::FieldMemberExpression *fieldEx bool ConnectionEditorEvaluator::visit(QmlJS::AST::CallExpression *callExpression) { if (d->isInIfCondition()) - d->checkValidityAndReturn(false, "Functions are not allowd in the expressions"); + return d->checkValidityAndReturn(false, "Functions are not allowd in the expressions"); MatchedStatement *currentStatement = d->currentStatement(); if (!currentStatement) - d->checkValidityAndReturn(false, "Invalid place to call an expression"); + return d->checkValidityAndReturn(false, "Invalid place to call an expression"); if (ConnectionEditorStatements::isEmptyStatement(*currentStatement)) { if (d->parentNodeStatus().childId() == 0) { |