diff options
| author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-10-13 14:38:37 +0200 |
|---|---|---|
| committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-10-13 14:38:53 +0200 |
| commit | c33a8e94981f6b1acf2b11aaf04c3e86f6ceea12 (patch) | |
| tree | df0530afd443eb4a70278e324e3263df02d3e5b9 /src/plugins/cpptools/cppfindreferences.cpp | |
| parent | 14058c07ecf0fe254b2d2caec33dbb2a70f13c6b (diff) | |
| download | qt-creator-c33a8e94981f6b1acf2b11aaf04c3e86f6ceea12.tar.gz | |
Rename the given enumerator.
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
| -rw-r--r-- | src/plugins/cpptools/cppfindreferences.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp index a60d8be413..3c11479a02 100644 --- a/src/plugins/cpptools/cppfindreferences.cpp +++ b/src/plugins/cpptools/cppfindreferences.cpp @@ -188,10 +188,10 @@ protected: bool isDeclSymbol(Symbol *symbol) const { - if (! symbol) + if (! symbol) { return false; - else if (symbol == _declSymbol) { + } else if (symbol == _declSymbol) { return true; } else if (symbol->line() == _declSymbol->line() && symbol->column() == _declSymbol->column()) { @@ -369,6 +369,20 @@ protected: return false; } + virtual bool visit(EnumeratorAST *ast) + { + Identifier *id = identifier(ast->identifier_token); + if (id == _id) { + LookupContext context = currentContext(ast); + const QList<Symbol *> candidates = context.resolve(control()->nameId(id)); + reportResult(ast->identifier_token, candidates); + } + + accept(ast->expression); + + return false; + } + virtual bool visit(SimpleNameAST *ast) { Identifier *id = identifier(ast->identifier_token); |
