diff options
author | hjk <hjk@qt.io> | 2017-08-07 18:54:01 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2017-08-10 15:23:07 +0000 |
commit | 7f87e2af3c21343a0a7fd0a74b63b748584d60c6 (patch) | |
tree | 4baacf5f7a2c0c7f2ac372035805dab17da92241 /src/plugins/remotelinux/linuxdevice.cpp | |
parent | 4048629d1a5940032267f80e44c6032e881abd4e (diff) |
DeviceSupport: Implement DesktopDevice::portsGatheringMethod()
The feature is useful in a QtApplicationManager debugging context.
Internally, DeviceUsedPortsGatherer uses a DeviceProcess now,
not an SshRemoteProcess, to cover cases where the (Windows Desktop)
device not have ssh available.
Change-Id: I9d33ceac65a135123a376ebd2727dcb540563179
Reviewed-by: Wolfgang Bremer <wolfgang.bremer@pelagicore.com>
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/remotelinux/linuxdevice.cpp')
-rw-r--r-- | src/plugins/remotelinux/linuxdevice.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 1e6fe89993..0e783a1a19 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -35,6 +35,7 @@ #include <coreplugin/id.h> #include <projectexplorer/devicesupport/sshdeviceprocesslist.h> +#include <projectexplorer/runnables.h> #include <ssh/sshremoteprocessrunner.h> #include <utils/algorithm.h> #include <utils/port.h> @@ -122,7 +123,7 @@ private: class LinuxPortsGatheringMethod : public PortsGatheringMethod { - QByteArray commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const + Runnable runnable(QAbstractSocket::NetworkLayerProtocol protocol) const { // We might encounter the situation that protocol is given IPv6 // but the consumer of the free port information decides to open @@ -135,7 +136,10 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod Q_UNUSED(protocol) // /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6 - return "sed -e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"; + StandardRunnable runnable; + runnable.executable = "sed"; + runnable.commandLineArguments = "-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*"; + return runnable; } QList<Utils::Port> usedPorts(const QByteArray &output) const |