Move setupSshEnvironment() into SshConnectionParameters

As we are going to remove SshRemoteProcess.

Change-Id: I07cf246791f1adb6cfc454935d7e330c2f1d4dc7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-05-06 02:16:54 +02:00
parent 48d1bd0551
commit d8ee25ec3d
9 changed files with 40 additions and 35 deletions

View File

@@ -42,7 +42,6 @@
#include <projectexplorer/runcontrol.h>
#include <ssh/sshconnection.h>
#include <ssh/sshremoteprocess.h>
#include <ssh/sshsettings.h>
#include <utils/algorithm.h>
@@ -189,7 +188,7 @@ void SshSharedConnection::connectToHost()
}
m_masterProcess.reset(new QtcProcess);
SshRemoteProcess::setupSshEnvironment(m_masterProcess.get());
SshConnectionParameters::setupSshEnvironment(m_masterProcess.get());
m_timer.setSingleShot(true);
connect(&m_timer, &QTimer::timeout, this, &SshSharedConnection::autoDestructRequested);
connect(m_masterProcess.get(), &QtcProcess::readyReadStandardOutput, [this] {
@@ -759,7 +758,7 @@ void SshProcessInterfacePrivate::doStart()
m_process.setTerminalMode(q->m_setup.m_terminalMode);
m_process.setWriteData(q->m_setup.m_writeData);
// TODO: what about other fields from m_setup?
SshRemoteProcess::setupSshEnvironment(&m_process);
SshConnectionParameters::setupSshEnvironment(&m_process);
if (!m_sshParameters.x11DisplayName.isEmpty()) {
Environment env = m_process.environment();
// Note: it seems this is no-op when shared connection is used.
@@ -831,7 +830,7 @@ public:
setSshParameters(parameters);
m_shell.reset(new QtcProcess);
SshRemoteProcess::setupSshEnvironment(m_shell.get());
SshConnectionParameters::setupSshEnvironment(m_shell.get());
const FilePath sshPath = SshSettings::sshFilePath();
CommandLine cmd { sshPath };