QmlJS: Fix auto-indent after an opening brace placed on a new line

Left brace wasn't handled in the expression_maybe_continuation state
of qml/js code formatter. It led to expression_or_objectdefinition
could not be continued on a new line.

Task-number: QTCREATORBUG-12326
Change-Id: Id8fcaa586000008fce72c7c0c03ed1739b1c7aa1
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Denis Klychkov
2016-11-01 12:15:26 +03:00
committed by Tim Jenssen
parent 657eba59f1
commit 1872cff611

View File

@@ -300,7 +300,8 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
case Question: case Question:
case Delimiter: case Delimiter:
case LeftBracket: case LeftBracket:
case LeftParenthesis: leave(); continue; case LeftParenthesis:
case LeftBrace: leave(); continue;
default: leave(true); continue; default: leave(true); continue;
} break; } break;