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:
Tobias Hunger
2016-04-20 12:49:25 +02:00
parent f421176f22
commit 2e5102f45e
25 changed files with 71 additions and 113 deletions

View File

@@ -117,9 +117,8 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
if (iossimulator().isNull())
TaskHub::addTask(Task::Error, tr("Deployment failed. No iOS device found."),
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
m_futureInterface.reportResult(!iossimulator().isNull());
reportRunResult(m_futureInterface, !iossimulator().isNull());
cleanup();
emit finished();
return;
}
m_transferStatus = TransferInProgress;
@@ -179,7 +178,7 @@ void IosDeployStep::handleDidTransferApp(IosToolHandler *handler, const QString
tr("Deployment failed. The settings in the Devices window of Xcode might be incorrect."),
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
}
m_futureInterface.reportResult(status == IosToolHandler::Success);
reportRunResult(m_futureInterface, status == IosToolHandler::Success);
}
void IosDeployStep::handleFinished(IosToolHandler *handler)
@@ -189,7 +188,7 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
m_transferStatus = TransferFailed;
TaskHub::addTask(Task::Error, tr("Deployment failed."),
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
m_futureInterface.reportResult(false);
reportRunResult(m_futureInterface, false);
break;
case NoTransfer:
case TransferOk:
@@ -199,7 +198,6 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
cleanup();
handler->deleteLater();
// move it when result is reported? (would need care to avoid problems with concurrent runs)
emit finished();
}
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)