From 4ae9f3778f9e1f7847783ffd7a1b779dd71d093d Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 27 May 2013 09:56:14 +0200 Subject: [PATCH] Debugger: Fix passing connection when starting from commandline This fixes a regression when starting debugging from the command line using 'qtcreator -debug /some/binary,server="localhost:1234"'. The parameters have been parsed correctly, but were later overwritten by data from the default (desktop) "device". Change-Id: I7747eaec6479e55cc18ea21ab1233e89ee9b119a Reviewed-by: Friedemann Kleint Reviewed-by: Eike Ziller --- src/plugins/debugger/debuggerplugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f0dc1f1965..dce9b7d746 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -693,7 +693,9 @@ bool fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */, QStri IDevice::ConstPtr device = DeviceKitInformation::device(kit); if (device) { sp->connParams = device->sshParameters(); - sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); + // Could have been set from command line. + if (sp->remoteChannel.isEmpty()) + sp->remoteChannel = sp->connParams.host + QLatin1Char(':') + QString::number(sp->connParams.port); } return true; } -- GitLab