diff options
author | hjk <hjk@qt.io> | 2022-05-23 16:09:43 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-05-25 10:32:23 +0000 |
commit | f79a71df7b32a712ead213541cb8e0e6baf1f4d5 (patch) | |
tree | d739bd8e655350b6d3c905ddc809050eaf19493e /src/plugins/qnx | |
parent | ae42604904839ab548cdfa8e41eec2460102c9b7 (diff) | |
download | qt-creator-f79a71df7b32a712ead213541cb8e0e6baf1f4d5.tar.gz |
ProjectExplorer: Reduce use of Runnable in SimpleTargetRunner
Runnable functionality is nowadays mostly accessed more directly
in QtcProcess and its setup functions.
Change-Id: I2a2b5433aef1d464dc58d5a35069376dee051d57
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/plugins/qnx')
-rw-r--r-- | src/plugins/qnx/qnxanalyzesupport.cpp | 9 | ||||
-rw-r--r-- | src/plugins/qnx/qnxdebugsupport.cpp | 22 |
2 files changed, 12 insertions, 19 deletions
diff --git a/src/plugins/qnx/qnxanalyzesupport.cpp b/src/plugins/qnx/qnxanalyzesupport.cpp index 6cf073c350..83f4194bac 100644 --- a/src/plugins/qnx/qnxanalyzesupport.cpp +++ b/src/plugins/qnx/qnxanalyzesupport.cpp @@ -56,14 +56,13 @@ QnxQmlProfilerSupport::QnxQmlProfilerSupport(RunControl *runControl) profiler->addStartDependency(this); addStopDependency(profiler); - setStarter([this, runControl, portsGatherer, profiler] { + setStartModifier([this, portsGatherer, profiler] { const QUrl serverUrl = portsGatherer->findEndPoint(); profiler->recordData("QmlServerUrl", serverUrl); - Runnable r = runControl->runnable(); - r.command.addArg(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, serverUrl)); - r.device = runControl->device(); - doStart(r); + CommandLine cmd = commandLine(); + cmd.addArg(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlProfilerServices, serverUrl)); + setCommandLine(cmd); }); } diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index 527476bc53..a810d20719 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -26,11 +26,9 @@ #include "qnxdebugsupport.h" #include "qnxconstants.h" -#include "qnxdevice.h" #include "qnxrunconfiguration.h" #include "slog2inforunner.h" #include "qnxqtversion.h" -#include "qnxutils.h" #include <coreplugin/icore.h> @@ -103,21 +101,21 @@ public: { setId("QnxDebuggeeRunner"); - setStarter([this, runControl, portsGatherer] { - Runnable r = runControl->runnable(); + setStartModifier([this, portsGatherer] { + CommandLine cmd = commandLine(); QStringList arguments; if (portsGatherer->useGdbServer()) { int pdebugPort = portsGatherer->gdbServer().port(); - r.command.setExecutable(FilePath::fromString(QNX_DEBUG_EXECUTABLE)); + cmd.setExecutable(FilePath::fromString(QNX_DEBUG_EXECUTABLE)); arguments.append(QString::number(pdebugPort)); } if (portsGatherer->useQmlServer()) { arguments.append(QmlDebug::qmlDebugTcpArguments(QmlDebug::QmlDebuggerServices, portsGatherer->qmlServer())); } - r.command.setArguments(ProcessArgs::joinArgs(arguments)); - r.device = runControl->device(); - doStart(r); + cmd.setArguments(ProcessArgs::joinArgs(arguments)); + setCommandLine(cmd); + }); } }; @@ -197,13 +195,9 @@ public: setId("PDebugRunner"); addStartDependency(portsGatherer); - setStarter([this, runControl, portsGatherer] { + setStartModifier([this, portsGatherer] { const int pdebugPort = portsGatherer->gdbServer().port(); - - Runnable r; - r.command = {QNX_DEBUG_EXECUTABLE, {QString::number(pdebugPort)}}; - r.device = runControl->device(); - doStart(r); + setCommandLine({QNX_DEBUG_EXECUTABLE, {QString::number(pdebugPort)}}); }); } }; |