summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljscodeformatter.h
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-12-01 15:00:29 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2011-12-02 09:15:04 +0100
commit69d6a508d3d5f99ef706f5d73a5533681ef64096 (patch)
tree857f6ebcd8d7024d1e0ea0ebf938e92e1f700860 /src/libs/qmljs/qmljscodeformatter.h
parent855e4eac4ff9ef779a715c49d972bb6b4f8098fe (diff)
downloadqt-creator-69d6a508d3d5f99ef706f5d73a5533681ef64096.tar.gz
QmlJS indenter: Fix braceless switch/try/with bindings.
Change-Id: Iee25f3f9ec38b1b7fc2697f390386c9a60cb8347 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljscodeformatter.h')
-rw-r--r--src/libs/qmljs/qmljscodeformatter.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljscodeformatter.h b/src/libs/qmljs/qmljscodeformatter.h
index 84fd2ea8db..9fb014cc86 100644
--- a/src/libs/qmljs/qmljscodeformatter.h
+++ b/src/libs/qmljs/qmljscodeformatter.h
@@ -167,10 +167,13 @@ public: // must be public to make Q_GADGET introspection work
return_statement, // After 'return'
throw_statement, // After 'throw'
- statement_with_condition, // After the 'for', 'while', 'catch', ... token
+ statement_with_condition, // After the 'for', 'while', ... token
statement_with_condition_paren_open, // While inside the (...)
- statement_with_block, // try, finally
+ try_statement, // after 'try'
+ catch_statement, // after 'catch', nested in try_statement
+ finally_statement, // after 'finally', nested in try_statement
+ maybe_catch_or_finally, // after ther closing '}' of try_statement and catch_statement, nested in try_statement
do_statement, // after 'do'
do_statement_while_paren_open, // after '(' in while clause
@@ -278,6 +281,7 @@ protected:
bool isExpressionEndState(int type) const;
void dump() const;
+ QString stateToString(int type) const;
private:
void recalculateStateAfter(const QTextBlock &block);