aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/ios/iostoolhandler.cpp
diff options
context:
space:
mode:
authorUlf Hermann <[email protected]>2016-04-19 16:43:30 +0200
committerUlf Hermann <[email protected]>2016-04-20 11:06:34 +0000
commit385237dbbd5261ff2825e5b054166ae6a225e423 (patch)
tree3020c9ec0187a614915d291a6768eb94b0105e7c /src/plugins/ios/iostoolhandler.cpp
parente14238650c841fdb314ded3ec59253beff1514a7 (diff)
Use Utils::Port where possible
This solves the ambiguity between 0 and -1 being the "invalid" port. Change-Id: I3bac11dd4117bb1820fbd58186699925b73df1c5 Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/ios/iostoolhandler.cpp')
-rw-r--r--src/plugins/ios/iostoolhandler.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp
index 9ac9ef4be9f..c304ec8ac1e 100644
--- a/src/plugins/ios/iostoolhandler.cpp
+++ b/src/plugins/ios/iostoolhandler.cpp
@@ -141,8 +141,8 @@ public:
IosToolHandler::OpStatus status);
void didStartApp(const QString &bundlePath, const QString &deviceId,
IosToolHandler::OpStatus status);
- void gotServerPorts(const QString &bundlePath, const QString &deviceId, int gdbPort,
- int qmlPort);
+ void gotServerPorts(const QString &bundlePath, const QString &deviceId, Utils::Port gdbPort,
+ Utils::Port qmlPort);
void gotInferiorPid(const QString &bundlePath, const QString &deviceId, qint64 pid);
void deviceInfo(const QString &deviceId, const IosToolHandler::Dict &info);
void appOutput(const QString &output);
@@ -306,8 +306,8 @@ void IosToolHandlerPrivate::didStartApp(const QString &bundlePath, const QString
emit q->didStartApp(q, bundlePath, deviceId, status);
}
-void IosToolHandlerPrivate::gotServerPorts(const QString &bundlePath,
- const QString &deviceId, int gdbPort, int qmlPort)
+void IosToolHandlerPrivate::gotServerPorts(const QString &bundlePath, const QString &deviceId,
+ Utils::Port gdbPort, Utils::Port qmlPort)
{
emit q->gotServerPorts(q, bundlePath, deviceId, gdbPort, qmlPort);
}
@@ -445,8 +445,10 @@ void IosToolHandlerPrivate::processXml()
} else if (elName == QLatin1String("server_ports")) {
stack.append(ParserState(ParserState::ServerPorts));
QXmlStreamAttributes attributes = outputParser.attributes();
- int gdbServerPort = attributes.value(QLatin1String("gdb_server")).toString().toInt();
- int qmlServerPort = attributes.value(QLatin1String("qml_server")).toString().toInt();
+ Utils::Port gdbServerPort(
+ attributes.value(QLatin1String("gdb_server")).toString().toInt());
+ Utils::Port qmlServerPort(
+ attributes.value(QLatin1String("qml_server")).toString().toInt());
gotServerPorts(bundlePath, deviceId, gdbServerPort, qmlServerPort);
} else {
qCWarning(toolHandlerLog) << "unexpected element " << elName;