Component.onCompleted: { if(true) /* true */ { // the true clause } else { // the else clause } } was formatted to : Component.onCompleted: { if (true /* true */) // the true clause {} else // the else clause {} } Add a new parameter to outWithComments that allows to change the indentation. The use cases are: ``` { // 1) some comment attached to '{' ... // 2) some comment attached to '}' } ``` For 1), IncreaseIndentation prints '{' and then increase the indentation before printing any post comment. For 2), DecreaseIndentation prints the pre comments, decrease the indentation and then proceed with '}' and potential post comments. This allows to print the comments attached to `{}` tokens with the correct indentation. Also adapt a test to the new comment behavior on blocks. Pick-to: 6.10 Task-number: QTCREATORBUG-33333 Task-number: QTBUG-123386 Change-Id: If8dd483a520c3bd25e161f3cec05530c1460bb80 Initial-patch-by: Xavier BESSON <developer@xavi-b.fr> Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io> |
||
---|---|---|
.. | ||
combined | ||
domdata | ||
domitem | ||
errormessage | ||
filelocations | ||
merging | ||
path | ||
reformatter | ||
stringdumper | ||
CMakeLists.txt |