diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-07-06 09:44:04 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-07-06 09:44:35 +0200 |
commit | 793ef6a694c16b78f4810eb6c82cad4233e4b1c6 (patch) | |
tree | a3def6b5f084d235981123b6df2be27a6cc7277d /src/plugins/cpptools/cppcodeformatter.cpp | |
parent | fbf2efa5f6669f7dd5ab49af3e5821b4a0b6ef75 (diff) | |
download | qt-creator-793ef6a694c16b78f4810eb6c82cad4233e4b1c6.tar.gz |
C++ indenter: Fix 'else' indentation in GNU style.
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index 4eb3a3ac84..97db194e70 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -1006,6 +1006,8 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd while (isBracelessState(state(outermostBraceless).type)) ++outermostBraceless; *indentDepth = state(outermostBraceless - 1).savedIndentDepth; + // this is where the else should go, if one appears - aligned to if_statement + *savedIndentDepth = state().savedIndentDepth; } break; case for_statement_paren_open: |