forked from qt-creator/qt-creator
Introduce ProcessBlockingInterface
This replaces the ProcessInterface::waitFor...() methods. It's not obligatory to provide this interface when implementing ProcessInterface subclass. In this case generic blocking implementation will be used. The generic implementation usually isn't as efficient as the custom one, however, for some sophisticated implementations of process interface, like e.g. SshProcessInterface, providing custom implementation is really difficult and error prone. That's why we try to keep a balance: we provide two custom implementations for QProcessImpl and for ProcessLauncherImpl, as they are relatively easy to implement, and rely on generic implementation for others. Change-Id: Ifc8bd354479ec67b2e8f74f1510f8de8883e9b94 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -168,10 +168,6 @@ private:
|
||||
qint64 write(const QByteArray &data) override;
|
||||
void sendControlSignal(ControlSignal controlSignal) override;
|
||||
|
||||
bool waitForStarted(int msecs) override;
|
||||
bool waitForReadyRead(int msecs) override;
|
||||
bool waitForFinished(int msecs) override;
|
||||
|
||||
private:
|
||||
CommandLine fullLocalCommandLine(bool interactive);
|
||||
|
||||
@@ -288,27 +284,6 @@ void DockerProcessImpl::sendControlSignal(ControlSignal controlSignal)
|
||||
{"kill", {QString("-%1").arg(signal), QString("%2").arg(m_remotePID)}});
|
||||
}
|
||||
|
||||
bool DockerProcessImpl::waitForStarted(int msecs)
|
||||
{
|
||||
Q_UNUSED(msecs)
|
||||
QTC_CHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DockerProcessImpl::waitForReadyRead(int msecs)
|
||||
{
|
||||
Q_UNUSED(msecs)
|
||||
QTC_CHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DockerProcessImpl::waitForFinished(int msecs)
|
||||
{
|
||||
Q_UNUSED(msecs)
|
||||
QTC_CHECK(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
IDeviceWidget *DockerDevice::createWidget()
|
||||
{
|
||||
return new DockerDeviceWidget(sharedFromThis());
|
||||
|
||||
Reference in New Issue
Block a user