diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-09-24 15:58:23 +0200 |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-09-24 15:58:23 +0200 |
commit | 17e0886c69a3d2c317f8e146d9a7b02f3cfc0498 (patch) | |
tree | 08874d5e2da31e391a786bde9de7089b078a118b /src/plugins/cpptools/cppcodeformatter.cpp | |
parent | 1b46f422ce043205e2fafda84059cb0aeae4b614 (diff) | |
download | qt-creator-17e0886c69a3d2c317f8e146d9a7b02f3cfc0498.tar.gz |
C++ indenter: Fix error recovery in function definitions.
Task-number: QTCREATORBUG-1517
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.cpp')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index a81a57f339..744465f398 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -160,7 +160,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) if (tryExpression(true)) break; switch (kind) { - case T_RBRACE: + case T_RBRACE: leave(true); continue; case T_SEMICOLON: leave(true); break; case T_EQUAL: enter(initializer); break; case T_LBRACE: enter(defun_open); break; @@ -251,7 +251,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) if (tryStatement()) break; switch (kind) { - case T_RBRACE: leave(); continue; // always nested in declaration_start + case T_RBRACE: leave(); leave(); break; // always nested in declaration_start } break; case switch_statement: |