Introduced helpers to rewrite types and names.

Done-with: Erik Verbruggen
This commit is contained in:
Roberto Raggi
2010-07-16 11:03:39 +02:00
parent 41236d29d3
commit fff4203a46
21 changed files with 880 additions and 134 deletions

View File

@@ -920,7 +920,8 @@ public:
ClassOrNamespace *b = context.lookupType(function);
if (b) {
// Do we have a tr method?
foreach(Symbol *s, b->find(trName)) {
foreach(const LookupItem &r, b->find(trName)) {
Symbol *s = r.declaration();
if (s->type()->isFunctionType()) {
m_option = useTr;
// no context required for tr
@@ -1302,9 +1303,10 @@ protected:
if (Enum *e = result.declaration()->type()->asEnumType())
return e;
if (NamedType *namedType = fst->asNamedType()) {
QList<Symbol *> candidates =
QList<LookupItem> candidates =
typeOfExpression.context().lookup(namedType->name(), scope);
foreach (Symbol *candidate, candidates) {
foreach (const LookupItem &r, candidates) {
Symbol *candidate = r.declaration();
if (Enum *e = candidate->asEnum()) {
return e;
}