forked from qt-creator/qt-creator
ios: fix warning for failed run on device
avoid executing a runloop in a signal handler Change-Id: I4822226d3ece93fbfb6b6107add3c1e32b6c973c Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -50,7 +50,7 @@ IosRunner::IosRunner(QObject *parent, IosRunConfiguration *runConfig, bool debug
|
||||
: QObject(parent), m_toolHandler(0), m_bundleDir(runConfig->bundleDir().toString()),
|
||||
m_arguments(runConfig->commandLineArguments()),
|
||||
m_device(ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit())),
|
||||
m_debuggingMode(debuggingMode), m_cleanExit(false)
|
||||
m_debuggingMode(debuggingMode), m_cleanExit(false), m_didWarn(false)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -155,18 +155,25 @@ void IosRunner::handleAppOutput(IosToolHandler *handler, const QString &output)
|
||||
emit appOutput(output);
|
||||
}
|
||||
|
||||
void IosRunner::warnAboutRunFail()
|
||||
{
|
||||
if (m_didWarn)
|
||||
return;
|
||||
m_didWarn = true;
|
||||
QMessageBox mBox;
|
||||
mBox.setText(tr("Running on iOS device failed."));
|
||||
mBox.setInformativeText(tr("The certificates in Xcode or the device might be outdated. Check the certificates in the organizer window of Xcode, and try again."));
|
||||
mBox.setStandardButtons(QMessageBox::Ok);
|
||||
mBox.setDefaultButton(QMessageBox::Ok);
|
||||
mBox.setIcon(QMessageBox::Information);
|
||||
mBox.exec();
|
||||
}
|
||||
|
||||
void IosRunner::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||
{
|
||||
if (msg.contains(QLatin1String("AMDeviceStartService returned -402653150"))) {
|
||||
QMessageBox mBox;
|
||||
mBox.setText(tr("Running on iOS device failed."));
|
||||
mBox.setInformativeText(tr("The certificates in Xcode or the device might be outdated. Check the certificates in the organizer window of Xcode, and try again."));
|
||||
mBox.setStandardButtons(QMessageBox::Ok);
|
||||
mBox.setDefaultButton(QMessageBox::Ok);
|
||||
mBox.setIcon(QMessageBox::Information);
|
||||
mBox.exec();
|
||||
}
|
||||
Q_UNUSED(handler);
|
||||
if (msg.contains(QLatin1String("AMDeviceStartService returned -402653150")))
|
||||
QTimer::singleShot(0, this, SLOT(warnAboutRunFail()));
|
||||
emit errorMsg(msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user