forked from qt-creator/qt-creator
QmlJS: Fix code re-formatter for arrays
Task-number: QTCREATORBUG-22026 Change-Id: Iae9e53b149ebfbbe904fc1aef8408b1f6f852a13 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
57495d421c
commit
b7753ac86a
@@ -921,11 +921,10 @@ protected:
|
|||||||
|
|
||||||
bool visit(PatternElement *ast) override
|
bool visit(PatternElement *ast) override
|
||||||
{
|
{
|
||||||
if (!ast->isVariableDeclaration())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
out(ast->identifierToken);
|
out(ast->identifierToken);
|
||||||
if (ast->initializer) {
|
if (ast->initializer) {
|
||||||
|
if (ast->isVariableDeclaration())
|
||||||
out(" = ");
|
out(" = ");
|
||||||
accept(ast->initializer);
|
accept(ast->initializer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user