forked from qt-creator/qt-creator
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:
@@ -317,15 +317,15 @@ LinuxDevice::LinuxDevice()
|
||||
}});
|
||||
|
||||
setOpenTerminal([this](const Environment &env, const FilePath &workingDir) {
|
||||
DeviceProcess * const proc = createProcess(nullptr);
|
||||
QObject::connect(proc, &DeviceProcess::finished, [proc] {
|
||||
QtcProcess * const proc = createProcess(nullptr);
|
||||
QObject::connect(proc, &QtcProcess::finished, [proc] {
|
||||
if (!proc->errorString().isEmpty()) {
|
||||
Core::MessageManager::writeDisrupting(
|
||||
tr("Error running remote shell: %1").arg(proc->errorString()));
|
||||
}
|
||||
proc->deleteLater();
|
||||
});
|
||||
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
|
||||
QObject::connect(proc, &QtcProcess::errorOccurred, [proc] {
|
||||
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||
proc->deleteLater();
|
||||
});
|
||||
@@ -358,7 +358,7 @@ IDeviceWidget *LinuxDevice::createWidget()
|
||||
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
||||
}
|
||||
|
||||
DeviceProcess *LinuxDevice::createProcess(QObject *parent) const
|
||||
QtcProcess *LinuxDevice::createProcess(QObject *parent) const
|
||||
{
|
||||
return new LinuxDeviceProcess(sharedFromThis(), parent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user