forked from qt-creator/qt-creator
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:
@@ -37,6 +37,7 @@
|
|||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include <QFutureWatcher>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
@@ -55,6 +56,9 @@ QbsProjectParser::QbsProjectParser(QbsProject *project, QFutureInterface<bool> *
|
|||||||
{
|
{
|
||||||
m_project = project->qbsProject();
|
m_project = project->qbsProject();
|
||||||
m_projectFilePath = project->projectFilePath().toString();
|
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()
|
QbsProjectParser::~QbsProjectParser()
|
||||||
|
Reference in New Issue
Block a user