forked from qt-creator/qt-creator
iOS: Improve error message when installation on Simulator fails
In case of error, post the output of the simctl command in compile output and issues pane. Fixes: QTCREATORBUG-25833 Change-Id: I62a0f7b10b5188a7c8b4e1db543b66d0661d4e6a Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -54,10 +54,12 @@ public:
|
|||||||
int progress, int maxProgress, const QString &info) {
|
int progress, int maxProgress, const QString &info) {
|
||||||
emit progressValueChanged(progress * 100 / maxProgress, info);
|
emit progressValueChanged(progress * 100 / maxProgress, info);
|
||||||
});
|
});
|
||||||
connect(m_toolHandler.get(), &IosToolHandler::errorMsg, this,
|
connect(
|
||||||
|
m_toolHandler.get(),
|
||||||
|
&IosToolHandler::errorMsg,
|
||||||
|
this,
|
||||||
[this](IosToolHandler *, const QString &message) {
|
[this](IosToolHandler *, const QString &message) {
|
||||||
if (message.contains(QLatin1String("AMDeviceInstallApplication returned -402653103")))
|
TaskHub::addTask(DeploymentTask(Task::Error, message));
|
||||||
TaskHub::addTask(DeploymentTask(Task::Warning, Tr::tr("The Info.plist might be incorrect.")));
|
|
||||||
emit errorMessage(message);
|
emit errorMessage(message);
|
||||||
});
|
});
|
||||||
connect(m_toolHandler.get(), &IosToolHandler::didTransferApp, this,
|
connect(m_toolHandler.get(), &IosToolHandler::didTransferApp, this,
|
||||||
|
@@ -484,10 +484,14 @@ void installApp(QPromise<SimulatorControl::Response> &promise,
|
|||||||
nullptr,
|
nullptr,
|
||||||
&response.commandOutput,
|
&response.commandOutput,
|
||||||
[&promise] { return promise.isCanceled(); });
|
[&promise] { return promise.isCanceled(); });
|
||||||
if (!result)
|
if (!result) {
|
||||||
promise.addResult(make_unexpected(result.error()));
|
const QString error = result.error().isEmpty()
|
||||||
else
|
? response.commandOutput
|
||||||
|
: (result.error() + "\n" + response.commandOutput);
|
||||||
|
promise.addResult(make_unexpected(error));
|
||||||
|
} else {
|
||||||
promise.addResult(response);
|
promise.addResult(response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void launchApp(QPromise<SimulatorControl::Response> &promise,
|
void launchApp(QPromise<SimulatorControl::Response> &promise,
|
||||||
|
Reference in New Issue
Block a user