QbsProjectManager: Allow the user to cancel the project resolving phase

Support for this was either forgotten in the initial implementation or
accidentally removed.

Change-Id: I4e35b8063bd0b847459d630e7c8ca0d7b09835aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Christian Kandeler
2018-06-21 14:52:18 +02:00
parent 2d97b5950c
commit 2f5c3d3cf0

View File

@@ -37,6 +37,7 @@
#include <QCoreApplication>
#include <QDir>
#include <QFileInfo>
#include <QFutureWatcher>
using namespace Utils;
@@ -55,6 +56,9 @@ QbsProjectParser::QbsProjectParser(QbsProject *project, QFutureInterface<bool> *
{
m_project = project->qbsProject();
m_projectFilePath = project->projectFilePath().toString();
auto * const watcher = new QFutureWatcher<bool>(this);
connect(watcher, &QFutureWatcher<bool>::canceled, this, &QbsProjectParser::cancel);
watcher->setFuture(fi->future());
}
QbsProjectParser::~QbsProjectParser()