summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-05 13:59:09 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-05 13:59:09 +0200
commit672274378b7e77870b6539a9eace9bf83dae2a8b (patch)
treea61796b5097294906df282bc2a113caec9eef379 /src/plugins/cpptools/cppfindreferences.cpp
parentccf3244932fb763f792782268a54def2704740b0 (diff)
downloadqt-creator-672274378b7e77870b6539a9eace9bf83dae2a8b.tar.gz
Use the most recent snapshot when searching for the usages of a symbol.
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index acad5f3c20..aabe12ca5e 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -176,9 +176,6 @@ static void find_helper(QFutureInterface<Usage> &future,
const DependencyTable dependencyTable,
Symbol *symbol)
{
- QTime tm;
- tm.start();
-
const Identifier *symbolId = symbol->identifier();
Q_ASSERT(symbolId != 0);
@@ -200,7 +197,6 @@ static void find_helper(QFutureInterface<Usage> &future,
files += dependencyTable.filesDependingOn(sourceFile);
}
files.removeDuplicates();
- //qDebug() << "done in:" << tm.elapsed() << "number of files to parse:" << files.size();
future.setProgressRange(0, files.size());
@@ -212,7 +208,7 @@ static void find_helper(QFutureInterface<Usage> &future,
future.setProgressValue(files.size());
}
-static CPlusPlus::DependencyTable dependencyTable(DependencyTable previous, CPlusPlus::Snapshot snapshot)
+static CPlusPlus::DependencyTable dependencyTable(DependencyTable previous, const CPlusPlus::Snapshot &snapshot)
{
if (previous.isValidFor(snapshot))
return previous;
@@ -264,7 +260,6 @@ void CppFindReferences::findAll_helper(Symbol *symbol, const LookupContext &cont
_resultWindow->popup(true);
- const Snapshot snapshot = _modelManager->snapshot();
const CppTools::CppModelManagerInterface::WorkingCopy workingCopy = _modelManager->workingCopy();
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();