CppEditor: Compile with QT_NO_CAST_FROM_ASCII.

- Avoid unnecessary conversions
- Add missing tr().

Change-Id: I3c0dd627a3621929c9c6fc71db6924fa513e34a7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Friedemann Kleint
2012-01-11 14:26:09 +01:00
parent 9e8f935a03
commit 9128fc2ab0
9 changed files with 129 additions and 89 deletions

View File

@@ -507,7 +507,9 @@ bool CheckSymbols::visit(MemberAccessAST *ast)
const Token end = tokenAt(ast->lastToken() - 1);
const QByteArray expression = _doc->source().mid(start.begin(), end.end() - start.begin());
const QList<LookupItem> candidates = typeOfExpression(expression, enclosingScope(), TypeOfExpression::Preprocess);
const QList<LookupItem> candidates =
typeOfExpression(QLatin1String(expression), enclosingScope(),
TypeOfExpression::Preprocess);
addClassMember(candidates, ast->member_name);
}
}
@@ -531,8 +533,9 @@ bool CheckSymbols::visit(CallAST *ast)
if (maybeVirtualMethod(access->member_name->name)) {
const QByteArray expression = textOf(access);
const QList<LookupItem> candidates = typeOfExpression(expression, enclosingScope(),
TypeOfExpression::Preprocess);
const QList<LookupItem> candidates =
typeOfExpression(QLatin1String(expression), enclosingScope(),
TypeOfExpression::Preprocess);
NameAST *memberName = access->member_name;
if (QualifiedNameAST *q = memberName->asQualifiedName())
@@ -548,9 +551,9 @@ bool CheckSymbols::visit(CallAST *ast)
if (QualifiedNameAST *q = exprName->asQualifiedName())
exprName = q->unqualified_name;
const QList<LookupItem> candidates = typeOfExpression(textOf(idExpr), enclosingScope(),
TypeOfExpression::Preprocess);
const QList<LookupItem> candidates =
typeOfExpression(QLatin1String(textOf(idExpr)), enclosingScope(),
TypeOfExpression::Preprocess);
addVirtualMethod(candidates, exprName, argumentCount);
}
}