C++ indenter: Fix member initializer indent being hardcoded to 4.

Task-number: QTCREATORBUG-2456
This commit is contained in:
Christian Kamm
2010-09-27 10:38:50 +02:00
parent 0e0841dac9
commit 8215a1d0c0

View File

@@ -1282,7 +1282,7 @@ void QtStyleCodeFormatter::adjustIndent(const QList<CPlusPlus::Token> &tokens, i
case T_COLON:
// ### ok for constructor initializer lists - what about ? and bitfields?
if (topState.type == expression && previousState.type == declaration_start) {
*paddingDepth = 4;
*paddingDepth = m_indentSize;
} else if (topState.type == ternary_op) {
*paddingDepth -= 2;
}