diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2016-02-17 23:27:41 +0200 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2016-02-19 10:21:40 +0000 |
commit | 6234511a2c8ae684e15202af690236d0ba55e929 (patch) | |
tree | 5b3438e1b2912ea3a018fe65d0bac4c0af23f995 /src/plugins/cpptools/cppfindreferences.cpp | |
parent | 9c0faff71380004dfe2afc442cff686eb55be680 (diff) | |
download | qt-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.cpp | 6 |
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 ¯o, 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"), |