C++/CppTools: Pass UTF-8 encoded source to Lexer

The Lexer can handle it now.

Task-number: QTCREATORBUG-7356
Change-Id: I8c4b03a247656e013d44c3cedca4835e133d4036
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-12-12 21:36:01 +01:00
parent 587eb49c4e
commit 57ff992961
6 changed files with 6 additions and 34 deletions

View File

@@ -61,11 +61,11 @@ bool SimpleLexer::endedJoined() const
return _endedJoined;
}
QList<Token> SimpleLexer::operator()(const QString &text, int state, bool convertToUtf8)
QList<Token> SimpleLexer::operator()(const QString &text, int state)
{
QList<Token> tokens;
const QByteArray bytes = convertToUtf8 ? text.toUtf8() : text.toLatin1();
const QByteArray bytes = text.toUtf8();
const char *firstChar = bytes.constData();
const char *lastChar = firstChar + bytes.size();