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,12 +54,14 @@ public:
|
||||
int progress, int maxProgress, const QString &info) {
|
||||
emit progressValueChanged(progress * 100 / maxProgress, info);
|
||||
});
|
||||
connect(m_toolHandler.get(), &IosToolHandler::errorMsg, this,
|
||||
[this](IosToolHandler *, const QString &message) {
|
||||
if (message.contains(QLatin1String("AMDeviceInstallApplication returned -402653103")))
|
||||
TaskHub::addTask(DeploymentTask(Task::Warning, Tr::tr("The Info.plist might be incorrect.")));
|
||||
emit errorMessage(message);
|
||||
});
|
||||
connect(
|
||||
m_toolHandler.get(),
|
||||
&IosToolHandler::errorMsg,
|
||||
this,
|
||||
[this](IosToolHandler *, const QString &message) {
|
||||
TaskHub::addTask(DeploymentTask(Task::Error, message));
|
||||
emit errorMessage(message);
|
||||
});
|
||||
connect(m_toolHandler.get(), &IosToolHandler::didTransferApp, this,
|
||||
[this](IosToolHandler *, const FilePath &, const QString &,
|
||||
IosToolHandler::OpStatus status) {
|
||||
|
@@ -484,10 +484,14 @@ void installApp(QPromise<SimulatorControl::Response> &promise,
|
||||
nullptr,
|
||||
&response.commandOutput,
|
||||
[&promise] { return promise.isCanceled(); });
|
||||
if (!result)
|
||||
promise.addResult(make_unexpected(result.error()));
|
||||
else
|
||||
if (!result) {
|
||||
const QString error = result.error().isEmpty()
|
||||
? response.commandOutput
|
||||
: (result.error() + "\n" + response.commandOutput);
|
||||
promise.addResult(make_unexpected(error));
|
||||
} else {
|
||||
promise.addResult(response);
|
||||
}
|
||||
}
|
||||
|
||||
void launchApp(QPromise<SimulatorControl::Response> &promise,
|
||||
|
Reference in New Issue
Block a user