diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-10-17 13:58:00 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2011-10-19 08:33:28 +0200 |
commit | 3ede0687baa9260ae32f849a1f433de57381a1ff (patch) | |
tree | 226726487ae1997000de6cbccc05408a540dc370 /src/libs/qmljs/qmljscodeformatter.cpp | |
parent | 4a487b1addb1a2be1b66c1b5ccaf3afc45b7f64c (diff) | |
download | qt-creator-3ede0687baa9260ae32f849a1f433de57381a1ff.tar.gz |
QmlJS indenter: Improve indentation of function literals.
Change-Id: Ic79745eefbf37e42d4dd42e73d3752bed34bbfa9
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljscodeformatter.cpp')
-rw-r--r-- | src/libs/qmljs/qmljscodeformatter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/qmljs/qmljscodeformatter.cpp b/src/libs/qmljs/qmljscodeformatter.cpp index 5bbc32cf4f..782e0f36a5 100644 --- a/src/libs/qmljs/qmljscodeformatter.cpp +++ b/src/libs/qmljs/qmljscodeformatter.cpp @@ -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; |