forked from qt-creator/qt-creator
ProjectExplorer: Normalize DeviceProcess::start() signature
Change-Id: I2915be34d4a1eed64567874dcf0263b7583cc142 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -79,7 +79,7 @@ qint64 LinuxDeviceProcess::processId() const
|
||||
return m_processId < 0 ? 0 : m_processId;
|
||||
}
|
||||
|
||||
QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||
QString LinuxDeviceProcess::fullCommandLine() const
|
||||
{
|
||||
CommandLine cmd;
|
||||
|
||||
@@ -91,23 +91,22 @@ QString LinuxDeviceProcess::fullCommandLine(const Runnable &runnable) const
|
||||
cmd.addArgs(";", CommandLine::Raw);
|
||||
}
|
||||
|
||||
if (!runnable.workingDirectory.isEmpty()) {
|
||||
cmd.addArgs({"cd", runnable.workingDirectory.path()});
|
||||
if (!workingDirectory().isEmpty()) {
|
||||
cmd.addArgs({"cd", workingDirectory().path()});
|
||||
cmd.addArgs("&&", CommandLine::Raw);
|
||||
}
|
||||
|
||||
if (!usesTerminal())
|
||||
cmd.addArgs(QString("echo ") + pidMarker + "$$" + pidMarker + " && ", CommandLine::Raw);
|
||||
|
||||
const Environment &env = runnable.environment;
|
||||
const Environment &env = environment();
|
||||
for (auto it = env.constBegin(); it != env.constEnd(); ++it)
|
||||
cmd.addArgs(env.key(it) + "='" + env.expandedValueForKey(env.key(it)) + '\'', CommandLine::Raw);
|
||||
|
||||
if (!usesTerminal())
|
||||
cmd.addArg("exec");
|
||||
|
||||
cmd.addArg(runnable.command.executable().toString());
|
||||
cmd.addArgs(runnable.command.arguments(), CommandLine::Raw);
|
||||
cmd.addCommandLineAsArgs(commandLine(), CommandLine::Raw);
|
||||
|
||||
return cmd.arguments();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user