Cpp{Tools,Editor}: Expect UTF-8 encoded literals

Change-Id: I9843c4163aad3fa3f1bfa33060c76328fc2dc25a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-05-05 11:43:24 -04:00
parent cadc4b42ba
commit bea8fc8e6a
14 changed files with 163 additions and 29 deletions

View File

@@ -67,7 +67,7 @@ void NamePrettyPrinter::visit(const Identifier *name)
{
const Identifier *id = name->identifier();
if (id)
_name = QString::fromLatin1(id->chars(), id->size());
_name = QString::fromUtf8(id->chars(), id->size());
else
_name = QLatin1String("anonymous");
}
@@ -76,7 +76,7 @@ void NamePrettyPrinter::visit(const TemplateNameId *name)
{
const Identifier *id = name->identifier();
if (id)
_name = QString::fromLatin1(id->chars(), id->size());
_name = QString::fromUtf8(id->chars(), id->size());
else
_name = QLatin1String("anonymous");
_name += QLatin1Char('<');
@@ -100,7 +100,7 @@ void NamePrettyPrinter::visit(const DestructorNameId *name)
{
const Identifier *id = name->identifier();
_name += QLatin1Char('~');
_name += QString::fromLatin1(id->chars(), id->size());
_name += QString::fromUtf8(id->chars(), id->size());
}
void NamePrettyPrinter::visit(const OperatorNameId *name)
@@ -263,7 +263,7 @@ void NamePrettyPrinter::visit(const SelectorNameId *name)
continue;
if (const Identifier *id = n->identifier()) {
_name += QString::fromLatin1(id->chars(), id->size());
_name += QString::fromUtf8(id->chars(), id->size());
if (name->hasArguments() || name->nameCount() > 1)
_name += QLatin1Char(':');