summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index 857324f754..194b4ed790 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -153,14 +153,6 @@ CppFindReferences::CppFindReferences(CppTools::CppModelManagerInterface *modelMa
m_watcher.setPendingResultsLimit(1);
connect(&m_watcher, SIGNAL(resultsReadyAt(int,int)), this, SLOT(displayResults(int,int)));
connect(&m_watcher, SIGNAL(finished()), this, SLOT(searchFinished()));
-
- m_updateDependencyTableTimer = new QTimer(this);
- m_updateDependencyTableTimer->setSingleShot(true);
- m_updateDependencyTableTimer->setInterval(2000);
- connect(m_updateDependencyTableTimer, SIGNAL(timeout()),
- this, SLOT(updateDependencyTable()));
- connect(modelManager, SIGNAL(documentUpdated(CPlusPlus::Document::Ptr)),
- m_updateDependencyTableTimer, SLOT(start()));
}
CppFindReferences::~CppFindReferences()
@@ -231,8 +223,7 @@ static CPlusPlus::DependencyTable dependencyTable(DependencyTable previous, CPlu
void CppFindReferences::updateDependencyTable()
{
- m_depsFuture.cancel();
- m_depsFuture = QtConcurrent::run(&dependencyTable, m_deps, _modelManager->snapshot());
+ m_deps = dependencyTable(m_deps, _modelManager->snapshot());
}
void CppFindReferences::findUsages(CPlusPlus::Symbol *symbol, const CPlusPlus::LookupContext &context)
@@ -276,7 +267,6 @@ void CppFindReferences::findAll_helper(Symbol *symbol, const LookupContext &cont
Core::ProgressManager *progressManager = Core::ICore::instance()->progressManager();
updateDependencyTable(); // ensure the dependency table is updated
- m_deps = m_depsFuture;
QFuture<Usage> result;
@@ -436,7 +426,6 @@ void CppFindReferences::findMacroUses(const Macro &macro)
}
updateDependencyTable(); // ensure the dependency table is updated
- m_deps = m_depsFuture;
QFuture<Usage> result;
result = QtConcurrent::run(&findMacroUses_helper, workingCopy, snapshot, m_deps, macro);