QmlJSEditor: Compile with QT_NO_CAST_FROM_ASCII

Change-Id: I899c26e028efe355d4673b55ac9718e103c7d7ec
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Orgad Shaneh
2012-11-26 21:17:34 +02:00
committed by Fawzi Mohamed
parent f5064d064f
commit 9bf654743e
13 changed files with 58 additions and 56 deletions

View File

@@ -87,12 +87,12 @@ void Highlighter::highlightBlock(const QString &text)
case Token::Comment:
if (m_inMultilineComment && text.midRef(token.end() - 2, 2) == QLatin1String("*/")) {
onClosingParenthesis('-', token.end() - 1, index == tokens.size()-1);
onClosingParenthesis(QLatin1Char('-'), token.end() - 1, index == tokens.size()-1);
m_inMultilineComment = false;
} else if (!m_inMultilineComment
&& (m_scanner.state() & Scanner::MultiLineMask) == Scanner::MultiLineComment
&& index == tokens.size() - 1) {
onOpeningParenthesis('+', token.offset, index == 0);
onOpeningParenthesis(QLatin1Char('+'), token.offset, index == 0);
m_inMultilineComment = true;
}
setFormat(token.offset, token.length, m_formats[CommentFormat]);
@@ -103,27 +103,27 @@ void Highlighter::highlightBlock(const QString &text)
break;
case Token::LeftParenthesis:
onOpeningParenthesis('(', token.offset, index == 0);
onOpeningParenthesis(QLatin1Char('('), token.offset, index == 0);
break;
case Token::RightParenthesis:
onClosingParenthesis(')', token.offset, index == tokens.size()-1);
onClosingParenthesis(QLatin1Char(')'), token.offset, index == tokens.size()-1);
break;
case Token::LeftBrace:
onOpeningParenthesis('{', token.offset, index == 0);
onOpeningParenthesis(QLatin1Char('{'), token.offset, index == 0);
break;
case Token::RightBrace:
onClosingParenthesis('}', token.offset, index == tokens.size()-1);
onClosingParenthesis(QLatin1Char('}'), token.offset, index == tokens.size()-1);
break;
case Token::LeftBracket:
onOpeningParenthesis('[', token.offset, index == 0);
onOpeningParenthesis(QLatin1Char('['), token.offset, index == 0);
break;
case Token::RightBracket:
onClosingParenthesis(']', token.offset, index == tokens.size()-1);
onClosingParenthesis(QLatin1Char(']'), token.offset, index == tokens.size()-1);
break;
case Token::Identifier: {