From addb8e97ba256c0d155a08f74c9bc5eded66898a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 24 Jan 2022 18:09:36 +0100 Subject: [PATCH] SshDeviceProcess: Use QtcProcess in terminal mode instead of ConsoleProcess Change-Id: Icf4dac4be19878e6f46547d198a85291db80e02a Reviewed-by: hjk Reviewed-by: Qt CI Bot --- .../devicesupport/sshdeviceprocess.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp index 74a761be477..3b848b84089 100644 --- a/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshdeviceprocess.cpp @@ -32,9 +32,9 @@ #include #include #include -#include #include #include +#include #include #include @@ -48,12 +48,12 @@ enum class Signal { Interrupt, Terminate, Kill }; class SshDeviceProcess::SshDeviceProcessPrivate { public: - SshDeviceProcessPrivate(SshDeviceProcess *q) : q(q) {} + SshDeviceProcessPrivate(SshDeviceProcess *q) : q(q), consoleProcess(QtcProcess::TerminalOn) {} SshDeviceProcess * const q; QSsh::SshConnection *connection = nullptr; QSsh::SshRemoteProcessPtr process; - ConsoleProcess consoleProcess; + QtcProcess consoleProcess; Runnable runnable; QString errorMessage; QProcess::ExitStatus exitStatus = QProcess::NormalExit; @@ -193,11 +193,11 @@ void SshDeviceProcess::handleConnected() d->process->requestX11Forwarding(display); if (runInTerminal()) { d->process->setUseTerminal(true); - connect(&d->consoleProcess, &ConsoleProcess::errorOccurred, + connect(&d->consoleProcess, &QtcProcess::errorOccurred, this, &DeviceProcess::error); - connect(&d->consoleProcess, &ConsoleProcess::started, + connect(&d->consoleProcess, &QtcProcess::started, this, &SshDeviceProcess::handleProcessStarted); - connect(&d->consoleProcess, &ConsoleProcess::finished, + connect(&d->consoleProcess, &QtcProcess::finished, this, [this] { handleProcessFinished(d->consoleProcess.errorString()); }); d->consoleProcess.setAbortOnMetaChars(false); d->consoleProcess.setCommand(d->process->fullLocalCommandLine()); @@ -357,7 +357,7 @@ void SshDeviceProcess::SshDeviceProcessPrivate::setState(SshDeviceProcess::SshDe killOperation->disconnect(q); killOperation.clear(); if (q->runInTerminal()) - QMetaObject::invokeMethod(&consoleProcess, &ConsoleProcess::stopProcess, Qt::QueuedConnection); + QMetaObject::invokeMethod(&consoleProcess, &QtcProcess::stopProcess, Qt::QueuedConnection); } killTimer.stop(); consoleProcess.disconnect();