forked from qt-creator/qt-creator
Valgrind: Avoid a use of Runnable::device
Change-Id: If7b5a9d4be7f4f9238f00406d8145db1222cf659 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include "callgrindcontroller.h"
|
#include "callgrindcontroller.h"
|
||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
|
||||||
|
|
||||||
#include <utils/temporaryfile.h>
|
#include <utils/temporaryfile.h>
|
||||||
#include <utils/qtcprocess.h>
|
#include <utils/qtcprocess.h>
|
||||||
|
|
||||||
@@ -114,13 +112,9 @@ void CallgrindController::run(Option option)
|
|||||||
connect(m_controllerProcess.get(), &QtcProcess::finished,
|
connect(m_controllerProcess.get(), &QtcProcess::finished,
|
||||||
this, &CallgrindController::controllerProcessDone);
|
this, &CallgrindController::controllerProcessDone);
|
||||||
|
|
||||||
CommandLine cmd;
|
const FilePath control =
|
||||||
if (m_valgrindRunnable.device)
|
FilePath(CALLGRIND_CONTROL_BINARY).onDevice(m_valgrindRunnable.command.executable());
|
||||||
cmd.setExecutable(m_valgrindRunnable.device->filePath(CALLGRIND_CONTROL_BINARY));
|
m_controllerProcess->setCommand({control, {toOptionString(option), QString::number(m_pid)}});
|
||||||
else
|
|
||||||
cmd.setExecutable(CALLGRIND_CONTROL_BINARY);
|
|
||||||
cmd.setArguments(QString("%1 %2").arg(toOptionString(option)).arg(m_pid));
|
|
||||||
m_controllerProcess->setCommand(cmd);
|
|
||||||
m_controllerProcess->setWorkingDirectory(m_valgrindRunnable.workingDirectory);
|
m_controllerProcess->setWorkingDirectory(m_valgrindRunnable.workingDirectory);
|
||||||
m_controllerProcess->setEnvironment(m_valgrindRunnable.environment);
|
m_controllerProcess->setEnvironment(m_valgrindRunnable.environment);
|
||||||
m_controllerProcess->start();
|
m_controllerProcess->start();
|
||||||
|
Reference in New Issue
Block a user