forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user