aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-04-19 16:43:30 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-04-20 11:06:34 +0000
commit385237dbbd5261ff2825e5b054166ae6a225e423 (patch)
tree3020c9ec0187a614915d291a6768eb94b0105e7c /src/plugins/remotelinux/remotelinuxdebugsupport.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 <hjk@theqtcompany.com>
Diffstat (limited to 'src/plugins/remotelinux/remotelinuxdebugsupport.cpp')
-rw-r--r--src/plugins/remotelinux/remotelinuxdebugsupport.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
index 8316dbfedc..9981efbe27 100644
--- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
+++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp
@@ -60,8 +60,7 @@ public:
LinuxDeviceDebugSupportPrivate(const RunConfiguration *runConfig, DebuggerRunControl *runControl)
: runControl(runControl),
qmlDebugging(runConfig->extraAspect<DebuggerRunConfigurationAspect>()->useQmlDebugger()),
- cppDebugging(runConfig->extraAspect<DebuggerRunConfigurationAspect>()->useCppDebugger()),
- gdbServerPort(-1), qmlPort(-1)
+ cppDebugging(runConfig->extraAspect<DebuggerRunConfigurationAspect>()->useCppDebugger())
{
}
@@ -69,8 +68,8 @@ public:
bool qmlDebugging;
bool cppDebugging;
QByteArray gdbserverOutput;
- int gdbServerPort;
- int qmlPort;
+ Port gdbServerPort;
+ Port qmlPort;
};
} // namespace Internal
@@ -149,7 +148,7 @@ void LinuxDeviceDebugSupport::startExecution()
command = QLatin1String("gdbserver");
args.clear();
args.append(QString::fromLatin1("--multi"));
- args.append(QString::fromLatin1(":%1").arg(d->gdbServerPort));
+ args.append(QString::fromLatin1(":%1").arg(d->gdbServerPort.number()));
}
r.executable = command;
r.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);