From c8fae1122216b66f16e15aa5a5527ddf613aac26 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 8 Jul 2010 13:07:32 +0200 Subject: C++ indenter: Fix for extending if conditions. Task-number: QTCREATORBUG-1825 --- src/plugins/cpptools/cppcodeformatter.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/plugins/cpptools/cppcodeformatter.cpp') 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 &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) { -- cgit v1.2.1