C++: Accept UTF-8 byte arrays in type of expression

The model uses UTF-8 internally and it makes more sense to only
convert when necessary.

A following commit will rename the source/setSource methods in
document for more clarity too.

Change-Id: I960ea0754efabd1436ad4b4299a57faeb65a8bee
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Leandro Melo
2012-01-12 17:35:37 +01:00
parent edcb065edb
commit fd179ed951
11 changed files with 51 additions and 51 deletions

View File

@@ -1681,9 +1681,10 @@ private:
typeOfExpression.init(assistInterface()->semanticInfo().doc,
assistInterface()->snapshot(), assistInterface()->context().bindings());
Scope *scope = currentFile->scopeAt(binaryAST->firstToken());
const QList<LookupItem> result = typeOfExpression(currentFile->textOf(binaryAST->right_expression),
scope,
TypeOfExpression::Preprocess);
const QList<LookupItem> result =
typeOfExpression(currentFile->textOf(binaryAST->right_expression).toUtf8(),
scope,
TypeOfExpression::Preprocess);
if (! result.isEmpty()) {