ProjectExplorer: Use StandardRunnable in ApplicationLauncher

Change-Id: I7092d748207762d3dbd6c69c01cc06c88cbf63d8
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2016-01-27 16:56:36 +01:00
parent 9ffae7f4ba
commit d5ecd4cf8b
8 changed files with 53 additions and 68 deletions

View File

@@ -76,11 +76,6 @@ void ValgrindProcess::setValgrindExecutable(const QString &valgrindExecutable)
void ValgrindProcess::setDebuggee(const StandardRunnable &debuggee)
{
m_debuggee = debuggee;
if (isLocal()) {
m_localProcess.setWorkingDirectory(m_debuggee.workingDirectory);
m_localProcess.setEnvironment(m_debuggee.environment);
///TODO: remote anything that should/could be done here?
}
}
void ValgrindProcess::setValgrindArguments(const QStringList &valgrindArguments)
@@ -122,8 +117,13 @@ void ValgrindProcess::run()
connect(&m_localProcess, &ApplicationLauncher::appendMessage,
this, &ValgrindProcess::processOutput);
m_localProcess.start(m_debuggee.runMode, m_valgrindExecutable,
argumentString(Utils::HostOsInfo::hostOs()));
StandardRunnable valgrind;
valgrind.executable = m_valgrindExecutable;
valgrind.runMode = m_debuggee.runMode;
valgrind.commandLineArguments = argumentString(Utils::HostOsInfo::hostOs());
valgrind.workingDirectory = m_debuggee.workingDirectory;
valgrind.environment = m_debuggee.environment;
m_localProcess.start(valgrind);
} else {
// connect to host and wait for connection