forked from qt-creator/qt-creator
C++ indenter: Fix for extending if conditions.
Task-number: QTCREATORBUG-1825
This commit is contained in:
@@ -1194,11 +1194,13 @@ void QtStyleCodeFormatter::adjustIndent(const QList<CPlusPlus::Token> &tokens, i
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case T_RPAREN:
|
// Disabled for now, see QTCREATORBUG-1825. It makes extending if conditions
|
||||||
if (topState.type == condition_open) {
|
// awkward: inserting a newline just before the ) shouldn't align to 'if'.
|
||||||
*indentDepth = previousState.savedIndentDepth;
|
//case T_RPAREN:
|
||||||
}
|
// if (topState.type == condition_open) {
|
||||||
break;
|
// *indentDepth = previousState.savedIndentDepth;
|
||||||
|
// }
|
||||||
|
// break;
|
||||||
case T_DEFAULT:
|
case T_DEFAULT:
|
||||||
case T_CASE:
|
case T_CASE:
|
||||||
for (int i = 0; state(i).type != topmost_intro; ++i) {
|
for (int i = 0; state(i).type != topmost_intro; ++i) {
|
||||||
|
|||||||
Reference in New Issue
Block a user