Merge remote-tracking branch 'origin/4.3' into master

Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
This commit is contained in:
Orgad Shaneh
2017-05-23 23:41:14 +03:00
49 changed files with 610 additions and 277 deletions

View File

@@ -58,7 +58,8 @@ using namespace ProjectExplorer;
TestCodeParser::TestCodeParser(TestTreeModel *parent)
: QObject(parent),
m_model(parent)
m_model(parent),
m_threadPool(new QThreadPool(this))
{
// connect to ProgressManager to postpone test parsing when CppModelManager is parsing
auto progressManager = qobject_cast<Core::ProgressManager *>(Core::ProgressManager::instance());
@@ -77,6 +78,7 @@ TestCodeParser::TestCodeParser(TestTreeModel *parent)
connect(this, &TestCodeParser::parsingFinished, this, &TestCodeParser::releaseParserInternals);
m_reparseTimer.setSingleShot(true);
connect(&m_reparseTimer, &QTimer::timeout, this, &TestCodeParser::parsePostponedFiles);
m_threadPool->setMaxThreadCount(std::max(QThread::idealThreadCount()/4, 1));
}
TestCodeParser::~TestCodeParser()
@@ -403,6 +405,7 @@ void TestCodeParser::scanForTests(const QStringList &fileList, ITestParser *pars
parseFileForTests(codeParsers, fi, file);
},
Utils::MapReduceOption::Unordered,
m_threadPool,
QThread::LowestPriority);
m_futureWatcher.setFuture(future);
if (list.size() > 5) {