SSH: Use OpenSSH tools

... instead of our own SSH library.

Advantages:
    - Full compatibility with OpenSSH behavior guaranteed.
    - Minimal maintenance effort.
    - Less code to build.
    - Big chunk of 3rd party sources can be removed from our repository.

One the downside, Windows users now need to install OpenSSH for
RemoteLinux support. Hoewever, people doing embedded development
probably have it installed anyway.

[ChangeLog] Switched SSH backend to OpenSSH

Fixes: QTCREATORBUG-15744
Fixes: QTCREATORBUG-15807
Fixes: QTCREATORBUG-19306
Fixes: QTCREATORBUG-20210
Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Christian Kandeler
2018-11-23 11:07:57 +01:00
parent 030d4d0108
commit d7178b88c4
609 changed files with 2054 additions and 91045 deletions

View File

@@ -25,7 +25,7 @@
#include "callgrindcontroller.h"
#include <ssh/sftpchannel.h>
#include <ssh/sftpsession.h>
#include <ssh/sshconnectionmanager.h>
#include <utils/fileutils.h>
@@ -237,12 +237,12 @@ void CallgrindController::foundRemoteFile()
{
m_remoteFile = m_findRemoteFile->readAllStandardOutput().trimmed();
m_sftp = m_ssh->createSftpChannel();
connect(m_sftp.data(), &QSsh::SftpChannel::finished,
m_sftp = m_ssh->createSftpSession();
connect(m_sftp.get(), &QSsh::SftpSession::commandFinished,
this, &CallgrindController::sftpJobFinished);
connect(m_sftp.data(), &QSsh::SftpChannel::initialized,
connect(m_sftp.get(), &QSsh::SftpSession::started,
this, &CallgrindController::sftpInitialized);
m_sftp->initialize();
m_sftp->start();
}
void CallgrindController::sftpInitialized()
@@ -254,14 +254,14 @@ void CallgrindController::sftpInitialized()
dataFile.setAutoRemove(false);
dataFile.close();
m_downloadJob = m_sftp->downloadFile(QString::fromUtf8(m_remoteFile), m_tempDataFile, QSsh::SftpOverwriteExisting);
m_downloadJob = m_sftp->downloadFile(QString::fromUtf8(m_remoteFile), m_tempDataFile);
}
void CallgrindController::sftpJobFinished(QSsh::SftpJobId job, const QString &error)
{
QTC_ASSERT(job == m_downloadJob, return);
m_sftp->closeChannel();
m_sftp->quit();
if (error.isEmpty())
emit localParseDataAvailable(m_tempDataFile);