forked from qt-creator/qt-creator
QMakeProject: Use QtConcurrent invocation for async run
Change-Id: I9e5027acb71eb03efef0f5f38a57286c37e74983 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -40,15 +40,17 @@
|
||||
#include <proparser/qmakevfs.h>
|
||||
#include <proparser/qmakeglobals.h>
|
||||
|
||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||
|
||||
#include <qtsupport/profilereader.h>
|
||||
#include <qtsupport/qtcppkitinfo.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/asynctask.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@@ -923,9 +925,9 @@ const FilePath &QmakeBuildSystem::qmakeSysroot() const
|
||||
void QmakeBuildSystem::destroyProFileReader(QtSupport::ProFileReader *reader)
|
||||
{
|
||||
// The ProFileReader destructor is super expensive (but thread-safe).
|
||||
const auto deleteFuture = runAsync(ProjectExplorerPlugin::sharedThreadPool(), QThread::LowestPriority,
|
||||
[reader] { delete reader; });
|
||||
onFinished(deleteFuture, this, [this](const QFuture<void> &) {
|
||||
const auto deleteFuture = Utils::asyncRun(ProjectExplorerPlugin::sharedThreadPool(),
|
||||
[reader] { delete reader; });
|
||||
Utils::onFinished(deleteFuture, this, [this](const QFuture<void> &) {
|
||||
if (!--m_qmakeGlobalsRefCnt) {
|
||||
deregisterFromCacheManager();
|
||||
m_qmakeGlobals.reset();
|
||||
|
||||
Reference in New Issue
Block a user