diff options
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index f0288538a1..45c79e783e 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -1194,11 +1194,13 @@ void QtStyleCodeFormatter::adjustIndent(const QList<CPlusPlus::Token> &tokens, i } break; } - case T_RPAREN: - if (topState.type == condition_open) { - *indentDepth = previousState.savedIndentDepth; - } - break; + // Disabled for now, see QTCREATORBUG-1825. It makes extending if conditions + // awkward: inserting a newline just before the ) shouldn't align to 'if'. + //case T_RPAREN: + // if (topState.type == condition_open) { + // *indentDepth = previousState.savedIndentDepth; + // } + // break; case T_DEFAULT: case T_CASE: for (int i = 0; state(i).type != topmost_intro; ++i) { |