forked from qt-creator/qt-creator
SSH: Pass remote command as QString
The old implementation sent the command over the wire as-is, so we declared it as a QByteArray and let the caller choose the encoding. This doesn't make sense anymore, as the command is now passed to an external process as a QString anyway. Change-Id: Ib84bc0f871db2b45b93f71d924c4177cc28d3bb0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
SshRemoteProcessPtr m_process;
|
||||
SshConnection *m_connection;
|
||||
bool m_runInTerminal;
|
||||
QByteArray m_command;
|
||||
QString m_command;
|
||||
QString m_lastConnectionErrorString;
|
||||
QProcess::ExitStatus m_exitStatus;
|
||||
QByteArray m_stdout;
|
||||
@@ -76,8 +76,7 @@ SshRemoteProcessRunner::~SshRemoteProcessRunner()
|
||||
delete d;
|
||||
}
|
||||
|
||||
void SshRemoteProcessRunner::run(const QByteArray &command,
|
||||
const SshConnectionParameters &sshParams)
|
||||
void SshRemoteProcessRunner::run(const QString &command, const SshConnectionParameters &sshParams)
|
||||
{
|
||||
QTC_ASSERT(d->m_state == Inactive, return);
|
||||
|
||||
@@ -85,14 +84,14 @@ void SshRemoteProcessRunner::run(const QByteArray &command,
|
||||
runInternal(command, sshParams);
|
||||
}
|
||||
|
||||
void SshRemoteProcessRunner::runInTerminal(const QByteArray &command,
|
||||
void SshRemoteProcessRunner::runInTerminal(const QString &command,
|
||||
const SshConnectionParameters &sshParams)
|
||||
{
|
||||
d->m_runInTerminal = true;
|
||||
runInternal(command, sshParams);
|
||||
}
|
||||
|
||||
void SshRemoteProcessRunner::runInternal(const QByteArray &command,
|
||||
void SshRemoteProcessRunner::runInternal(const QString &command,
|
||||
const SshConnectionParameters &sshParams)
|
||||
{
|
||||
setState(Connecting);
|
||||
@@ -197,7 +196,7 @@ void SshRemoteProcessRunner::setState(int newState)
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray SshRemoteProcessRunner::command() const { return d->m_command; }
|
||||
QString SshRemoteProcessRunner::command() const { return d->m_command; }
|
||||
QString SshRemoteProcessRunner::lastConnectionErrorString() const {
|
||||
return d->m_lastConnectionErrorString;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user