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

@@ -995,8 +995,9 @@ void CPPEditor::switchDeclarationDefinition()
LookupContext context(thisDocument, snapshot);
Function *functionDefinition = functionScope->owner()->asFunction();
const QList<Symbol *> declarations = context.lookup(functionDefinition->name(), functionDefinition->scope());
foreach (Symbol *decl, declarations) {
const QList<LookupItem> declarations = context.lookup(functionDefinition->name(), functionDefinition->scope());
foreach (const LookupItem &r, declarations) {
Symbol *decl = r.declaration();
// TODO: check decl.
openCppEditorAt(linkToSymbol(decl));
break;