forked from qt-creator/qt-creator
BuildStep: Remove finished() signal and use FutureInterface to report
Remove the finished() signal that is (sometimes) used to report that a buildstep is done and use the FutureInterface for that purpose consistently. Change-Id: Ibe5520b562b91f1a7f4fc73ee898b33b930029ec Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -408,8 +408,7 @@ void QbsBuildStep::build()
|
||||
m_job = qbsProject()->build(options, m_products, error);
|
||||
if (!m_job) {
|
||||
emit addOutput(error, ErrorMessageOutput);
|
||||
m_fi->reportResult(false);
|
||||
emit finished();
|
||||
reportRunResult(*m_fi, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -430,14 +429,12 @@ void QbsBuildStep::build()
|
||||
void QbsBuildStep::finish()
|
||||
{
|
||||
QTC_ASSERT(m_fi, return);
|
||||
m_fi->reportResult(m_lastWasSuccess);
|
||||
reportRunResult(*m_fi, m_lastWasSuccess);
|
||||
m_fi = 0; // do not delete, it is not ours
|
||||
if (m_job) {
|
||||
m_job->deleteLater();
|
||||
m_job = 0;
|
||||
}
|
||||
|
||||
emit finished();
|
||||
}
|
||||
|
||||
QbsProject *QbsBuildStep::qbsProject() const
|
||||
|
||||
@@ -100,8 +100,7 @@ void QbsCleanStep::run(QFutureInterface<bool> &fi)
|
||||
m_job = pro->clean(options);
|
||||
|
||||
if (!m_job) {
|
||||
m_fi->reportResult(false);
|
||||
emit finished();
|
||||
reportRunResult(*m_fi, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -175,12 +174,10 @@ void QbsCleanStep::cleaningDone(bool success)
|
||||
}
|
||||
|
||||
QTC_ASSERT(m_fi, return);
|
||||
m_fi->reportResult(success);
|
||||
reportRunResult(*m_fi, success);
|
||||
m_fi = 0; // do not delete, it is not ours
|
||||
m_job->deleteLater();
|
||||
m_job = 0;
|
||||
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void QbsCleanStep::handleTaskStarted(const QString &desciption, int max)
|
||||
|
||||
@@ -93,8 +93,7 @@ void QbsInstallStep::run(QFutureInterface<bool> &fi)
|
||||
m_job = pro->install(m_qbsInstallOptions);
|
||||
|
||||
if (!m_job) {
|
||||
m_fi->reportResult(false);
|
||||
emit finished();
|
||||
reportRunResult(*m_fi, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -193,12 +192,10 @@ void QbsInstallStep::installDone(bool success)
|
||||
}
|
||||
|
||||
QTC_ASSERT(m_fi, return);
|
||||
m_fi->reportResult(success);
|
||||
reportRunResult(*m_fi, success);
|
||||
m_fi = 0; // do not delete, it is not ours
|
||||
m_job->deleteLater();
|
||||
m_job = 0;
|
||||
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void QbsInstallStep::handleTaskStarted(const QString &desciption, int max)
|
||||
|
||||
Reference in New Issue
Block a user