QmlJS indenter: Improve indentation of function literals.

Change-Id: Ic79745eefbf37e42d4dd42e73d3752bed34bbfa9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-17 13:58:00 +02:00
parent 4a487b1add
commit 3ede0687ba
2 changed files with 33 additions and 2 deletions

View File

@@ -1091,6 +1091,10 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd
// undo the continuation indent of the expression
*indentDepth = parentState.savedIndentDepth;
*savedIndentDepth = *indentDepth;
} else {
// always align to function keyword
*indentDepth = tokenPosition;
*savedIndentDepth = *indentDepth;
}
break;