diff options
author | Flex Ferrum <flexferrum@gmail.com> | 2012-02-19 14:35:41 +0400 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2012-03-12 14:38:26 +0100 |
commit | 4ca6c51c7fb21ed0d2e56ae3487f78f263f33f01 (patch) | |
tree | 24d475282fe72e0995ae31ed274de983bb16e363 /src/plugins/cpptools/cppcodeformatter.h | |
parent | 48b4abe877a8b16c5bd4ecc6827d13c9f1d703db (diff) | |
download | qt-creator-4ca6c51c7fb21ed0d2e56ae3487f78f263f33f01.tar.gz |
C++: Lambda formatting issues.
Fix code formatting in cases when '{' and '}' appear within expression
context (ex. lambda expression, initializer lists).
Change-Id: I42b28170a8d6d5fd08a9a1a8d8e7698219c18966
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Diffstat (limited to 'src/plugins/cpptools/cppcodeformatter.h')
-rw-r--r-- | src/plugins/cpptools/cppcodeformatter.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcodeformatter.h b/src/plugins/cpptools/cppcodeformatter.h index 8dab0dbc81..a7da67f57c 100644 --- a/src/plugins/cpptools/cppcodeformatter.h +++ b/src/plugins/cpptools/cppcodeformatter.h @@ -177,7 +177,16 @@ public: // must be public to make Q_GADGET introspection work assign_open, // after an assignment token expression, // after a '=' in a declaration_start once we're sure it's not '= {' - assign_open_or_initializer // after a '=' in a declaration start + assign_open_or_initializer, // after a '=' in a declaration start + + lambda_instroducer_or_subscribtion, // just after '[' or in cases '[]' and '[id]' when we're not sure in the exact kind of expression + lambda_declarator_expected, // just after ']' in lambda_introducer_or_subscribtion + lambda_declarator_or_expression, // just after '](' when previous state is 'lambda_instroducer_or_subscribtion' + lambda_statement_expected, + lambda_instroducer, // when '=', '&' or ',' occurred within '[]' + lambda_declarator, // just after ']' when previous state is lambda_introducer + lambda_statement // just after '{' when previous state is lambda_declarator or lambda_declarator_or_expression + }; Q_ENUMS(StateType) |