forked from qt-creator/qt-creator
ProjectExplorer: Use CommandLine instead of Runnable
Lighter and sufficient for all use cases. Change-Id: Ic6749a1a9e3e6906ce71b87b237cc94a6d8a4cbf Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -146,7 +146,7 @@ private:
|
||||
|
||||
class LinuxPortsGatheringMethod : public PortsGatheringMethod
|
||||
{
|
||||
Runnable runnable(QAbstractSocket::NetworkLayerProtocol protocol) const override
|
||||
CommandLine commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const override
|
||||
{
|
||||
// We might encounter the situation that protocol is given IPv6
|
||||
// but the consumer of the free port information decides to open
|
||||
@@ -159,10 +159,8 @@ class LinuxPortsGatheringMethod : public PortsGatheringMethod
|
||||
Q_UNUSED(protocol)
|
||||
|
||||
// /proc/net/tcp* covers /proc/net/tcp and /proc/net/tcp6
|
||||
Runnable runnable;
|
||||
runnable.command.setExecutable("sed");
|
||||
runnable.command.setArguments("-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*");
|
||||
return runnable;
|
||||
return {"sed", "-e 's/.*: [[:xdigit:]]*:\\([[:xdigit:]]\\{4\\}\\).*/\\1/g' /proc/net/tcp*",
|
||||
CommandLine::Raw};
|
||||
}
|
||||
|
||||
QList<Utils::Port> usedPorts(const QByteArray &output) const override
|
||||
|
||||
Reference in New Issue
Block a user