forked from qt-creator/qt-creator
QtcProcess: Get rid of useTerminal
Remove SshRemoteProcessRunner::runInTerminal() method,
it wasn't used anywhere (just in test).
Remove QtcProcess::useTerminal, as process should be
created in TerminalOn mode when there is a need for terminal.
Add a parameter to
SshRemoteProcess::fullLocalCommandLine(bool inTerminal)
as this may still be needed when running application
through ssh from terminal (ssh -tt option).
Change-Id: I71911082fcca190b82a1106a2ca1ca48dc5d4c79
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 95a9b22f6f)
This commit is contained in:
@@ -89,13 +89,13 @@ void SshRemoteProcess::requestX11Forwarding(const QString &displayName)
|
||||
m_displayName = displayName;
|
||||
}
|
||||
|
||||
Utils::CommandLine SshRemoteProcess::fullLocalCommandLine() const
|
||||
Utils::CommandLine SshRemoteProcess::fullLocalCommandLine(bool inTerminal) const
|
||||
{
|
||||
Utils::CommandLine cmd{SshSettings::sshFilePath()};
|
||||
|
||||
if (!m_displayName.isEmpty())
|
||||
cmd.addArg("-X");
|
||||
if (useTerminal())
|
||||
if (inTerminal)
|
||||
cmd.addArg("-tt");
|
||||
|
||||
cmd.addArg("-q");
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
void requestX11Forwarding(const QString &displayName);
|
||||
void start();
|
||||
|
||||
Utils::CommandLine fullLocalCommandLine() const;
|
||||
Utils::CommandLine fullLocalCommandLine(bool inTerminal = false) const;
|
||||
|
||||
signals:
|
||||
void done(const QString &error);
|
||||
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
|
||||
SshRemoteProcessPtr m_process;
|
||||
SshConnection *m_connection;
|
||||
bool m_runInTerminal;
|
||||
QString m_command;
|
||||
QString m_lastConnectionErrorString;
|
||||
QProcess::ExitStatus m_exitStatus;
|
||||
@@ -80,14 +79,6 @@ void SshRemoteProcessRunner::run(const QString &command, const SshConnectionPara
|
||||
{
|
||||
QTC_ASSERT(d->m_state == Inactive, return);
|
||||
|
||||
d->m_runInTerminal = false;
|
||||
runInternal(command, sshParams);
|
||||
}
|
||||
|
||||
void SshRemoteProcessRunner::runInTerminal(const QString &command,
|
||||
const SshConnectionParameters &sshParams)
|
||||
{
|
||||
d->m_runInTerminal = true;
|
||||
runInternal(command, sshParams);
|
||||
}
|
||||
|
||||
@@ -128,7 +119,6 @@ void SshRemoteProcessRunner::handleConnected()
|
||||
this, &SshRemoteProcessRunner::handleStdout);
|
||||
connect(d->m_process.get(), &SshRemoteProcess::readyReadStandardError,
|
||||
this, &SshRemoteProcessRunner::handleStderr);
|
||||
d->m_process->setUseTerminal(d->m_runInTerminal);
|
||||
d->m_process->start();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ public:
|
||||
~SshRemoteProcessRunner();
|
||||
|
||||
void run(const QString &command, const SshConnectionParameters &sshParams);
|
||||
void runInTerminal(const QString &command, const SshConnectionParameters &sshParams);
|
||||
QString command() const;
|
||||
|
||||
QString lastConnectionErrorString() const;
|
||||
|
||||
Reference in New Issue
Block a user