ProcessInterface: Get rid of state() method

This is fully controlled by QtcProcess itself, so provide
general implementation of state() inside QtcProcess.

Task-number: QTCREATORBUG-27358
Change-Id: Id6f0b771ed933f870b80d6856c6d94896f946516
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-04-12 11:18:09 +02:00
parent 160dc16921
commit 44c7020651
10 changed files with 52 additions and 56 deletions

View File

@@ -107,7 +107,7 @@ public:
DockerDeviceProcess(const QSharedPointer<const IDevice> &device, QObject *parent = nullptr);
~DockerDeviceProcess() {}
void start() override;
void startImpl() override;
void interrupt() override;
const QSharedPointer<const IDevice> m_device;
@@ -120,7 +120,7 @@ DockerDeviceProcess::DockerDeviceProcess(const QSharedPointer<const IDevice> &de
setProcessMode(ProcessMode::Writer);
}
void DockerDeviceProcess::start()
void DockerDeviceProcess::startImpl()
{
QTC_ASSERT(state() == QProcess::NotRunning, return);
DockerDevice::ConstPtr dockerDevice = qSharedPointerCast<const DockerDevice>(m_device);
@@ -139,7 +139,7 @@ void DockerDeviceProcess::start()
setCommand(command);
LOG("Running process:" << command.toUserOutput() << "in" << workingDirectory().toUserOutput());
QtcProcess::start();
QtcProcess::startImpl();
}
void DockerDeviceProcess::interrupt()