forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Joerg Bornemann
parent
362aef67e0
commit
b729d4b973
@@ -188,9 +188,9 @@ bool AutoCompleter::contextAllowsAutoParentheses(const QTextCursor &cursor,
|
||||
// if a string literal doesn't start with a quote, it must be multiline
|
||||
if (quote != QLatin1Char('"') && quote != QLatin1Char('\'')) {
|
||||
const int startState = blockStartState(cursor.block());
|
||||
if (startState == Scanner::MultiLineStringDQuote)
|
||||
if ((startState & Scanner::MultiLineMask) == Scanner::MultiLineStringDQuote)
|
||||
quote = QLatin1Char('"');
|
||||
else if (startState == Scanner::MultiLineStringSQuote)
|
||||
else if ((startState & Scanner::MultiLineMask) == Scanner::MultiLineStringSQuote)
|
||||
quote = QLatin1Char('\'');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user