summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppfindreferences.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-02-17 23:27:41 +0200
committerOrgad Shaneh <orgads@gmail.com>2016-02-19 10:21:40 +0000
commit6234511a2c8ae684e15202af690236d0ba55e929 (patch)
tree5b3438e1b2912ea3a018fe65d0bac4c0af23f995 /src/plugins/cpptools/cppfindreferences.cpp
parent9c0faff71380004dfe2afc442cff686eb55be680 (diff)
downloadqt-creator-6234511a2c8ae684e15202af690236d0ba55e929.tar.gz
CppTools: Use a shared thread pool
Without this, too many threads are spawned, and loading a project takes forever. Change-Id: I3c22557ddd7bfb0c70f7b089c276432e3b003097 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppfindreferences.cpp')
-rw-r--r--src/plugins/cpptools/cppfindreferences.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp
index d8732be1f9..0f7bc7e2c4 100644
--- a/src/plugins/cpptools/cppfindreferences.cpp
+++ b/src/plugins/cpptools/cppfindreferences.cpp
@@ -365,7 +365,8 @@ void CppFindReferences::findAll_helper(SearchResult *search, Symbol *symbol,
SearchResultWindow::instance()->popup(IOutputPane::ModeSwitch | IOutputPane::WithFocus);
const WorkingCopy workingCopy = m_modelManager->workingCopy();
QFuture<Usage> result;
- result = Utils::runAsync(find_helper, workingCopy, context, symbol);
+ result = Utils::runAsync(m_modelManager->sharedThreadPool(), find_helper,
+ workingCopy, context, symbol);
createWatcher(result, search);
FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"),
@@ -669,7 +670,8 @@ void CppFindReferences::findMacroUses(const Macro &macro, const QString &replace
}
QFuture<Usage> result;
- result = Utils::runAsync(findMacroUses_helper, workingCopy, snapshot, macro);
+ result = Utils::runAsync(m_modelManager->sharedThreadPool(), findMacroUses_helper,
+ workingCopy, snapshot, macro);
createWatcher(result, search);
FutureProgress *progress = ProgressManager::addTask(result, tr("Searching for Usages"),