diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2011-06-03 08:49:40 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-06-03 08:53:24 +0200 |
commit | b729d4b9738592bfb7bfd8f111b1173d7bfafefe (patch) | |
tree | 39831a3a2382811b044da4a9c5b24ae673e3a187 /src/libs/qmljs/qmljscodeformatter.cpp | |
parent | 362aef67e005a93172f4de2a61a80e433ac11463 (diff) | |
download | qt-creator-b729d4b9738592bfb7bfd8f111b1173d7bfafefe.tar.gz |
QmlJS: Fix uses of Scanner::state().
Change-Id: I5195fc43e8a6653bf52c0eaa6cddb8dfd25b6217
Reviewed-on: http://codereview.qt.nokia.com/319
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/libs/qmljs/qmljscodeformatter.cpp')
-rw-r--r-- | src/libs/qmljs/qmljscodeformatter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/qmljs/qmljscodeformatter.cpp b/src/libs/qmljs/qmljscodeformatter.cpp index 0d4c74bd58..32ab5585da 100644 --- a/src/libs/qmljs/qmljscodeformatter.cpp +++ b/src/libs/qmljs/qmljscodeformatter.cpp @@ -463,7 +463,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) leave(); continue; } else if (m_tokenIndex == m_tokens.size() - 1 - && lexerState == Scanner::Normal) { + && (lexerState & Scanner::MultiLineMask) == Scanner::Normal) { leave(); } else if (m_tokenIndex == 0) { // to allow enter/leave to update the indentDepth @@ -488,7 +488,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) } if (topState != multiline_comment_start && topState != multiline_comment_cont - && lexerState == Scanner::MultiLineComment) { + && (lexerState & Scanner::MultiLineMask) == Scanner::MultiLineComment) { enter(multiline_comment_start); } |