QmlJs: better indentation for switch common cases

Do not add an empty line between common cases in a `switch` block,
according the best practices for javascript style.

Task-number: QTCREATORBUG-18515
Change-Id: I8b665eabb9b1d5b617d608e430e8b9137dc32032
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Benelli
2017-09-06 11:55:48 +02:00
parent 65b2edbd82
commit d600bae736

View File

@@ -1102,6 +1102,7 @@ protected:
out("case ", ast->caseToken); out("case ", ast->caseToken);
accept(ast->expression); accept(ast->expression);
out(ast->colonToken); out(ast->colonToken);
if (ast->statements)
lnAcceptIndented(ast->statements); lnAcceptIndented(ast->statements);
return false; return false;
} }