forked from qt-creator/qt-creator
ios: better error messages
Change-Id: I2ccb7655320b18eed9f10c8b6130befe8c9cbdb0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <qmakeprojectmanager/qmakebuildconfiguration.h>
|
||||
#include <qmakeprojectmanager/qmakeproject.h>
|
||||
#include <qmakeprojectmanager/qmakenodes.h>
|
||||
@@ -97,6 +98,9 @@ void IosDeployStep::run(QFutureInterface<bool> &fi)
|
||||
m_futureInterface = fi;
|
||||
QTC_CHECK(m_transferStatus == NoTransfer);
|
||||
if (iosdevice().isNull()) {
|
||||
if (iossimulator().isNull())
|
||||
TaskHub::addTask(Task::Error, tr("Deployment failed. No iOS device found."),
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||
m_futureInterface.reportResult(!iossimulator().isNull());
|
||||
cleanup();
|
||||
m_futureInterface.reportFinished();
|
||||
@@ -147,10 +151,14 @@ void IosDeployStep::handleDidTransferApp(IosToolHandler *handler, const QString
|
||||
{
|
||||
Q_UNUSED(handler); Q_UNUSED(bundlePath); Q_UNUSED(deviceId);
|
||||
QTC_CHECK(m_transferStatus == TransferInProgress);
|
||||
if (status == IosToolHandler::Success)
|
||||
if (status == IosToolHandler::Success) {
|
||||
m_transferStatus = TransferOk;
|
||||
else
|
||||
} else {
|
||||
m_transferStatus = TransferFailed;
|
||||
TaskHub::addTask(Task::Error,
|
||||
tr("Deployment failed. The settings in the Organizer window of Xcode might be incorrect."),
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||
}
|
||||
m_futureInterface.reportResult(status == IosToolHandler::Success);
|
||||
}
|
||||
|
||||
@@ -159,6 +167,8 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
|
||||
switch (m_transferStatus) {
|
||||
case TransferInProgress:
|
||||
m_transferStatus = TransferFailed;
|
||||
TaskHub::addTask(Task::Error, tr("Deployment failed."),
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||
m_futureInterface.reportResult(false);
|
||||
break;
|
||||
case NoTransfer:
|
||||
@@ -175,6 +185,10 @@ void IosDeployStep::handleFinished(IosToolHandler *handler)
|
||||
void IosDeployStep::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||
{
|
||||
Q_UNUSED(handler);
|
||||
if (msg.contains(QLatin1String("AMDeviceInstallApplication returned -402653103")))
|
||||
TaskHub::addTask(Task::Warning,
|
||||
tr("The Info.plist might be incorrect."),
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||
emit addOutput(msg, BuildStep::ErrorMessageOutput);
|
||||
}
|
||||
|
||||
@@ -211,7 +225,7 @@ QString IosDeployStep::appBundle() const
|
||||
void IosDeployStep::raiseError(const QString &errorString)
|
||||
{
|
||||
emit addTask(Task(Task::Error, errorString, Utils::FileName::fromString(QString()), -1,
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT));
|
||||
}
|
||||
|
||||
void IosDeployStep::writeOutput(const QString &text, OutputFormat format)
|
||||
|
||||
Reference in New Issue
Block a user