DeviceProcess: Minimize the usage of DeviceProcess

DeviceProcess doesn't provide any public API, so
replace all usages of it with QtcProcess.
Keep using DeviceProcess only for reimplementations.

Change-Id: I35a14251a81dd0dde426f56ca2e809b527cc863c
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-02-28 12:25:26 +01:00
parent e327007bd8
commit 8af62eb256
28 changed files with 70 additions and 75 deletions

View File

@@ -35,9 +35,8 @@
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QTimer>
@@ -84,8 +83,8 @@ PerfTracePointDialog::PerfTracePointDialog() :
PerfTracePointDialog::~PerfTracePointDialog()
{
if (m_process && m_process->state() != QProcess::NotRunning) {
DeviceProcess *process = m_process.release();
connect(process, &DeviceProcess::finished, process, &QObject::deleteLater);
QtcProcess *process = m_process.release();
connect(process, &QtcProcess::finished, process, &QObject::deleteLater);
process->kill();
QTimer::singleShot(10000, process, &QObject::deleteLater);
}
@@ -108,10 +107,10 @@ void PerfTracePointDialog::runScript()
else
m_process->setCommand({"sh", {}});
connect(m_process.get(), &DeviceProcess::finished,
connect(m_process.get(), &QtcProcess::finished,
this, &PerfTracePointDialog::handleProcessFinished);
connect(m_process.get(), &DeviceProcess::errorOccurred,
connect(m_process.get(), &QtcProcess::errorOccurred,
this, &PerfTracePointDialog::handleProcessError);
m_process->start();