From 2d3c3dc2b5132b9b631506cc62a2ec577aa428ce Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 2 May 2022 18:20:25 +0200 Subject: [PATCH] Slog2InfoRunner: Don't use QnxDeviceProcess Use QtcProcess with a path on qnx device instead. Change-Id: I5dcf0f2180b40031c6f0f88b44ee2ad100ba7b5d Reviewed-by: Rafael Roquetto Reviewed-by: --- src/plugins/qnx/slog2inforunner.cpp | 15 ++++++++------- src/plugins/qnx/slog2inforunner.h | 9 ++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/plugins/qnx/slog2inforunner.cpp b/src/plugins/qnx/slog2inforunner.cpp index 6dc74f28a68..d8b8906ffc8 100644 --- a/src/plugins/qnx/slog2inforunner.cpp +++ b/src/plugins/qnx/slog2inforunner.cpp @@ -26,12 +26,12 @@ #include "slog2inforunner.h" #include "qnxdevice.h" -#include "qnxdeviceprocess.h" #include "qnxrunconfiguration.h" #include #include +#include #include @@ -51,13 +51,13 @@ Slog2InfoRunner::Slog2InfoRunner(RunControl *runControl) // We need to limit length of ApplicationId to 63 otherwise it would not match one in slog2info. m_applicationId.truncate(63); - m_testProcess = new QnxDeviceProcess(device(), this); + m_testProcess = new QtcProcess(this); connect(m_testProcess, &QtcProcess::done, this, &Slog2InfoRunner::handleTestProcessCompleted); - m_launchDateTimeProcess = new SshDeviceProcess(device(), this); + m_launchDateTimeProcess = new QtcProcess(this); connect(m_launchDateTimeProcess, &QtcProcess::done, this, &Slog2InfoRunner::launchSlog2Info); - m_logProcess = new QnxDeviceProcess(device(), this); + m_logProcess = new QtcProcess(this); connect(m_logProcess, &QtcProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput); connect(m_logProcess, &QtcProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError); connect(m_logProcess, &QtcProcess::done, this, &Slog2InfoRunner::handleLogDone); @@ -70,7 +70,7 @@ void Slog2InfoRunner::printMissingWarning() void Slog2InfoRunner::start() { - m_testProcess->setCommand({"slog2info", {}}); + m_testProcess->setCommand({device()->mapToGlobalPath("slog2info"), {}}); m_testProcess->start(); reportStarted(); } @@ -107,7 +107,8 @@ void Slog2InfoRunner::handleTestProcessCompleted() void Slog2InfoRunner::readLaunchTime() { - m_launchDateTimeProcess->setCommand({"date", "+\"%d %H:%M:%S\"", CommandLine::Raw}); + m_launchDateTimeProcess->setCommand({device()->mapToGlobalPath("date"), + "+\"%d %H:%M:%S\"", CommandLine::Raw}); m_launchDateTimeProcess->start(); } @@ -125,7 +126,7 @@ void Slog2InfoRunner::launchSlog2Info() m_launchDateTime = QDateTime::fromString(QString::fromLatin1(m_launchDateTimeProcess->readAllStandardOutput()).trimmed(), QString::fromLatin1("dd HH:mm:ss")); - m_logProcess->setCommand({"slog2info", {"-w"}}); + m_logProcess->setCommand({device()->mapToGlobalPath("slog2info"), {"-w"}}); m_logProcess->start(); } diff --git a/src/plugins/qnx/slog2inforunner.h b/src/plugins/qnx/slog2inforunner.h index c6ab4872e01..1f6f4aeb22a 100644 --- a/src/plugins/qnx/slog2inforunner.h +++ b/src/plugins/qnx/slog2inforunner.h @@ -28,13 +28,12 @@ #include #include -#include #include #include #include -namespace ProjectExplorer { class SshDeviceProcess; } +namespace Utils { class QtcProcess; } namespace Qnx { namespace Internal { @@ -70,9 +69,9 @@ private: bool m_currentLogs = false; QString m_remainingData; - ProjectExplorer::SshDeviceProcess *m_launchDateTimeProcess = nullptr; - ProjectExplorer::SshDeviceProcess *m_testProcess = nullptr; - ProjectExplorer::SshDeviceProcess *m_logProcess = nullptr; + Utils::QtcProcess *m_launchDateTimeProcess = nullptr; + Utils::QtcProcess *m_testProcess = nullptr; + Utils::QtcProcess *m_logProcess = nullptr; }; } // namespace Internal