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:
Eike Ziller
2011-10-17 14:22:32 +02:00
76 changed files with 5227 additions and 2121 deletions

View File

@@ -259,6 +259,14 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
default: enter(expression); continue;
} break;
case ternary_op:
if (kind == Colon) {
enter(ternary_op_after_colon);
enter(expression_continuation);
break;
}
// fallthrough
case ternary_op_after_colon:
case expression:
if (tryInsideExpression())
break;
@@ -333,18 +341,6 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
default: leave(); continue;
} break;
case ternary_op:
if (tryInsideExpression())
break;
switch (kind) {
case RightParenthesis:
case RightBracket:
case RightBrace:
case Comma:
case Semicolon: leave(); continue;
case Colon: enter(expression); break; // entering expression makes maybe_continuation work
} break;
case jsblock_open:
case substatement_open:
if (tryStatement())
@@ -495,7 +491,8 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
// some states might be continued on the next line
if (topState == expression
|| topState == expression_or_objectdefinition
|| topState == objectliteral_assignment) {
|| topState == objectliteral_assignment
|| topState == ternary_op_after_colon) {
enter(expression_maybe_continuation);
}
// multi-line comment start?