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>
This commit is contained in:
Orgad Shaneh
2016-02-17 23:27:41 +02:00
committed by Orgad Shaneh
parent 9c0faff713
commit 6234511a2c
7 changed files with 23 additions and 7 deletions

View File

@@ -58,6 +58,7 @@
#include <QDir>
#include <QMutexLocker>
#include <QTextBlock>
#include <QThreadPool>
#include <QTimer>
#if defined(QTCREATOR_WITH_DUMP_AST) && defined(Q_CC_GNU)
@@ -157,6 +158,7 @@ public:
CppFindReferences *m_findReferences;
SymbolFinder m_symbolFinder;
QThreadPool m_threadPool;
bool m_enableGC;
QTimer m_delayedGcTimer;
@@ -1196,4 +1198,9 @@ SymbolFinder *CppModelManager::symbolFinder()
return &d->m_symbolFinder;
}
QThreadPool *CppModelManager::sharedThreadPool()
{
return &d->m_threadPool;
}
} // namespace CppTools