C++ indenter: Indent member initializer lists correctly.

Without requiring ',' to be an electric character.

Task-number: QTCREATORBUG-1866
Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-07-16 10:27:15 +02:00
parent a457d2eec3
commit d292eca5f6
3 changed files with 42 additions and 10 deletions

View File

@@ -672,7 +672,16 @@ void tst_CodeFormatter::memberInitializer()
<< Line("class Foo {")
<< Line(" Foo()")
<< Line(" : baR(),")
<< Line(" moo(barR)")
<< Line(" moodoo(barR + ")
<< Line(" 42),")
<< Line(" xyz()")
<< Line(" {}")
<< Line("};")
<< Line("class Foo {")
<< Line(" Foo() :")
<< Line(" baR(),")
<< Line(" moo(barR)")
<< Line(" , moo(barR)")
<< Line(" {}")
<< Line("}")
;