forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.4'
Conflicts: qtcreator.pri src/libs/qmljs/qmljstypedescriptionreader.cpp tests/auto/qml/qmleditor/qmlcodeformatter/tst_qmlcodeformatter.cpp Change-Id: Id032187023bb42f259a87545ceeb3c965dd01a32
This commit is contained in:
@@ -139,18 +139,15 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd
|
||||
if (*indentDepth == tokenPosition) {
|
||||
// expression_or_objectdefinition doesn't want the indent
|
||||
// expression_or_label already has it
|
||||
// ternary already adjusts indents nicely
|
||||
if (parentState.type != expression_or_objectdefinition
|
||||
&& parentState.type != expression_or_label
|
||||
&& parentState.type != binding_assignment
|
||||
&& parentState.type != ternary_op) {
|
||||
&& parentState.type != binding_assignment) {
|
||||
*indentDepth += 2*m_indentSize;
|
||||
}
|
||||
}
|
||||
// expression_or_objectdefinition and expression_or_label have already consumed the first token
|
||||
else if (parentState.type != expression_or_objectdefinition
|
||||
&& parentState.type != expression_or_label
|
||||
&& parentState.type != ternary_op) {
|
||||
&& parentState.type != expression_or_label) {
|
||||
*indentDepth = tokenPosition;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user