aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerruncontrol.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2019-06-03 15:18:54 +0200
committerhjk <[email protected]>2019-06-04 06:45:54 +0000
commitd965df6483b54f4090943e805aaa0552b3198ba6 (patch)
tree2788cb23dff995633e580b1437f07a2a9cc843cf /src/plugins/debugger/debuggerruncontrol.cpp
parent677a4692fa8abb4958595460a02b7a5a570236c2 (diff)
Debugger: Use new Utils::CommandLine in LocalProcessRunner
Change-Id: I41e67e5d52aa9a00d9e0fad3caf8da22391d2024 Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerruncontrol.cpp')
-rw-r--r--src/plugins/debugger/debuggerruncontrol.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp
index e2b79cf9b35..0c77157df51 100644
--- a/src/plugins/debugger/debuggerruncontrol.cpp
+++ b/src/plugins/debugger/debuggerruncontrol.cpp
@@ -98,8 +98,8 @@ class LocalProcessRunner : public RunWorker
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::LocalProcessRunner)
public:
- LocalProcessRunner(DebuggerRunTool *runTool, const Runnable &runnable)
- : RunWorker(runTool->runControl()), m_runTool(runTool), m_runnable(runnable)
+ LocalProcessRunner(DebuggerRunTool *runTool, const CommandLine &command)
+ : RunWorker(runTool->runControl()), m_runTool(runTool), m_command(command)
{
connect(&m_proc, &QProcess::errorOccurred,
this, &LocalProcessRunner::handleError);
@@ -113,7 +113,7 @@ public:
void start() override
{
- m_proc.setCommand(m_runnable.commandLine());
+ m_proc.setCommand(m_command);
m_proc.start();
}
@@ -181,7 +181,7 @@ public:
}
QPointer<DebuggerRunTool> m_runTool;
- Runnable m_runnable;
+ CommandLine m_command;
Utils::QtcProcess m_proc;
};
@@ -404,10 +404,8 @@ void DebuggerRunTool::setServerStartScript(const QString &serverStartScript)
{
if (!serverStartScript.isEmpty()) {
// Provide script information about the environment
- Runnable serverStarter;
- serverStarter.executable = serverStartScript;
- QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.inferior.executable);
- QtcProcess::addArg(&serverStarter.commandLineArguments, m_runParameters.remoteChannel);
+ CommandLine serverStarter(FileName::fromString(serverStartScript), {});
+ serverStarter.addArgs({m_runParameters.inferior.executable, m_runParameters.remoteChannel});
addStartDependency(new LocalProcessRunner(this, serverStarter));
}
}