forked from qt-creator/qt-creator
Implement QdbProcessInterface
It's going to replace QdbDeviceProcess. Change-Id: I88d7dc110b71986462894f10ecb18632dcf02669 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
#include <projectexplorer/runcontrol.h>
|
#include <projectexplorer/runcontrol.h>
|
||||||
|
|
||||||
#include <remotelinux/linuxdeviceprocess.h>
|
#include <remotelinux/linuxdeviceprocess.h>
|
||||||
|
#include <remotelinux/linuxprocessinterface.h>
|
||||||
|
|
||||||
#include <ssh/sshconnection.h>
|
#include <ssh/sshconnection.h>
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
#include <QWizard>
|
#include <QWizard>
|
||||||
|
|
||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
|
using namespace RemoteLinux;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb {
|
||||||
@@ -74,6 +76,20 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class QdbProcessImpl : public LinuxProcessInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
QdbProcessImpl(const LinuxDevice *linuxDevice)
|
||||||
|
: LinuxProcessInterface(linuxDevice) {}
|
||||||
|
~QdbProcessImpl() { killIfRunning(); }
|
||||||
|
private:
|
||||||
|
void sendControlSignal(ControlSignal controlSignal) final
|
||||||
|
{
|
||||||
|
QTC_ASSERT(controlSignal != ControlSignal::Interrupt, return);
|
||||||
|
QTC_ASSERT(controlSignal != ControlSignal::KickOff, return);
|
||||||
|
runInShell({Constants::AppcontrollerFilepath, {"--stop"}});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class DeviceApplicationObserver : public ApplicationLauncher
|
class DeviceApplicationObserver : public ApplicationLauncher
|
||||||
{
|
{
|
||||||
@@ -172,6 +188,11 @@ QtcProcess *QdbDevice::createProcess(QObject *parent) const
|
|||||||
return new QdbDeviceProcess(sharedFromThis(), parent);
|
return new QdbDeviceProcess(sharedFromThis(), parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProcessInterface *QdbDevice::createProcessInterface() const
|
||||||
|
{
|
||||||
|
return new QdbProcessImpl(this);
|
||||||
|
}
|
||||||
|
|
||||||
void QdbDevice::setSerialNumber(const QString &serial)
|
void QdbDevice::setSerialNumber(const QString &serial)
|
||||||
{
|
{
|
||||||
m_serialNumber = serial;
|
m_serialNumber = serial;
|
||||||
|
@@ -45,6 +45,7 @@ public:
|
|||||||
ProjectExplorer::IDeviceWidget *createWidget() final;
|
ProjectExplorer::IDeviceWidget *createWidget() final;
|
||||||
|
|
||||||
Utils::QtcProcess *createProcess(QObject *parent) const final;
|
Utils::QtcProcess *createProcess(QObject *parent) const final;
|
||||||
|
Utils::ProcessInterface *createProcessInterface() const override;
|
||||||
|
|
||||||
void setSerialNumber(const QString &serial);
|
void setSerialNumber(const QString &serial);
|
||||||
QString serialNumber() const;
|
QString serialNumber() const;
|
||||||
|
Reference in New Issue
Block a user