Commit a874537b authored by Fawzi Mohamed's avatar Fawzi Mohamed

ios: better deploy messages (and handling of missing devices)

Change-Id: I77faa28b1300bbf59f56cf20855147f67fd69368
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@digia.com>
parent dd085030
......@@ -90,6 +90,11 @@ bool IosDeployStep::init()
{
QTC_CHECK(m_transferStatus == NoTransfer);
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
if (m_device.isNull()) {
emit addOutput(tr("Error: no device available, deploy failed."),
BuildStep::ErrorMessageOutput);
return false;
}
return true;
}
......@@ -114,6 +119,8 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
SLOT(handleDidTransferApp(Ios::IosToolHandler*,QString,QString,Ios::IosToolHandler::OpStatus)));
connect(toolHandler, SIGNAL(finished(Ios::IosToolHandler*)),
SLOT(handleFinished(Ios::IosToolHandler*)));
connect(toolHandler, SIGNAL(errorMsg(Ios::IosToolHandler*,QString)),
SLOT(handleErrorMsg(Ios::IosToolHandler*,QString)));
toolHandler->requestTransferApp(appBundle(), deviceId());
}
......@@ -171,6 +178,12 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
m_futureInterface.reportFinished();
}
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
{
Q_UNUSED(handler);
emit addOutput(msg, BuildStep::ErrorMessageOutput);
}
BuildStepConfigWidget *IosDeployStep::createConfigWidget()
{
return new IosDeployStepWidget(this);
......
......@@ -107,6 +107,7 @@ private slots:
void handleDidTransferApp(Ios::IosToolHandler *handler, const QString &bundlePath, const QString &deviceId,
Ios::IosToolHandler::OpStatus status);
void handleFinished(Ios::IosToolHandler *handler);
void handleErrorMsg(Ios::IosToolHandler *handler, const QString &msg);
private:
IosDeployStep(ProjectExplorer::BuildStepList *bc,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment