forked from qt-creator/qt-creator
ios: translate locked message in output
Change-Id: Ia43fec6716761b40be35e5bfebd453b7a6eabcd7 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -211,17 +211,20 @@ void IosRunner::handleAppOutput(IosToolHandler *handler, const QString &output)
|
|||||||
void IosRunner::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
void IosRunner::handleErrorMsg(IosToolHandler *handler, const QString &msg)
|
||||||
{
|
{
|
||||||
Q_UNUSED(handler);
|
Q_UNUSED(handler);
|
||||||
if (msg.contains(QLatin1String("AMDeviceStartService returned -402653150")))
|
QString res(msg);
|
||||||
|
QLatin1String lockedErr = QLatin1String("Unexpected reply: ELocked (454c6f636b6564) vs OK (4f4b)");
|
||||||
|
if (msg.contains(QLatin1String("AMDeviceStartService returned -402653150"))) {
|
||||||
TaskHub::addTask(Task::Warning,
|
TaskHub::addTask(Task::Warning,
|
||||||
tr("Run failed. The settings in the Organizer window of Xcode might be incorrect."),
|
tr("Run failed. The settings in the Organizer window of Xcode might be incorrect."),
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
else if (msg.contains(QLatin1String("Unexpected reply: ELocked (454c6f636b6564) vs OK (4f4b)")))
|
} else if (msg.contains(lockedErr)) {
|
||||||
TaskHub::addTask(Task::Error,
|
QString message = tr("The device is locked, please unlock.");
|
||||||
tr("The device is locked, please unlock."),
|
TaskHub::addTask(Task::Error, message,
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT);
|
||||||
|
res.replace(lockedErr, msg);
|
||||||
|
}
|
||||||
QRegExp qmlPortRe(QLatin1String("QML Debugger: Waiting for connection on port ([0-9]+)..."));
|
QRegExp qmlPortRe(QLatin1String("QML Debugger: Waiting for connection on port ([0-9]+)..."));
|
||||||
int index = qmlPortRe.indexIn(msg);
|
int index = qmlPortRe.indexIn(msg);
|
||||||
QString res(msg);
|
|
||||||
if (index != -1 && m_qmlPort)
|
if (index != -1 && m_qmlPort)
|
||||||
res.replace(qmlPortRe.cap(1), QString::number(m_qmlPort));
|
res.replace(qmlPortRe.cap(1), QString::number(m_qmlPort));
|
||||||
emit errorMsg(res);
|
emit errorMsg(res);
|
||||||
|
|||||||
Reference in New Issue
Block a user