summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-09-24 17:01:29 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-09-25 14:20:02 +0200
commit54d60a77aef294ca0a6c0fc96bcb592db04d6e12 (patch)
tree325740b81453fa582e47070486251c02674dd3a3 /src
parentefed56c49e132d7e5637ad7805ad23e7a6ad008f (diff)
downloadqt-creator-54d60a77aef294ca0a6c0fc96bcb592db04d6e12.tar.gz
Use the canonical symbol when searching references.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index b0097b2066..d0a83d768b 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -259,8 +259,15 @@ void CppFindReferences::findAll(const Snapshot &snapshot, Symbol *symbol)
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
+ // find the canonical symbol.
+ Symbol *canonicalSymbol = symbol;
+ for (; symbol; symbol = symbol->next()) {
+ if (symbol->name() == canonicalSymbol->name())
+ canonicalSymbol = symbol;
+ }
+
QFuture<Core::Utils::FileSearchResult> result =
- QtConcurrent::run(&find_helper, snapshot, symbol);
+ QtConcurrent::run(&find_helper, snapshot, canonicalSymbol);
m_watcher.setFuture(result);