forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user