iOS: Don't initialize invalid ports with 0

The invalid port is -1, and Utils::Port does not need an explicit
initialization.

Change-Id: Id545fb98677d26541aa89611ddd50b735e08530a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2016-10-26 16:45:10 +02:00
parent 1574f9cfca
commit 2acedc82c5
2 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ IosRunner::IosRunner(QObject *parent, IosRunConfiguration *runConfig, bool cppDe
m_arguments(runConfig->commandLineArguments()),
m_device(DeviceKitInformation::device(runConfig->target()->kit())),
m_cppDebug(cppDebug), m_qmlDebugServices(qmlDebugServices), m_cleanExit(false),
m_qmlPort(0), m_pid(0)
m_pid(0)
{
m_deviceType = runConfig->deviceType();
}

View File

@@ -742,9 +742,9 @@ void IosTool::didStartApp(const QString &bundlePath, const QString &deviceId,
QMutexLocker l(&m_xmlMutex);
out.writeStartElement(QLatin1String("server_ports"));
out.writeAttribute(QLatin1String("gdb_server"),
QString::number(gdbServer ? gdbServer->serverPort() : 0));
QString::number(gdbServer ? gdbServer->serverPort() : -1));
out.writeAttribute(QLatin1String("qml_server"),
QString::number(qmlServer ? qmlServer->serverPort() : 0));
QString::number(qmlServer ? qmlServer->serverPort() : -1));
out.writeEndElement();
outFile.flush();
}