RemoteLinux: Use an SshProcess for rsync

Otherwise, if connection sharing is disabled and public key
authentication fails, the askpass tool is not invoked.

Change-Id: Iea8316675b8f270c924f822f340f6282b21450d5
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2018-12-19 17:28:59 +01:00
parent 97d3858720
commit a0a97c2edc
10 changed files with 14 additions and 16 deletions

View File

@@ -26,7 +26,7 @@
#include "sftpsession.h"
#include "sshlogging_p.h"
#include "sshprocess_p.h"
#include "sshprocess.h"
#include "sshsettings.h"
#include <utils/fileutils.h>

View File

@@ -25,7 +25,7 @@
#include "sftptransfer.h"
#include "sshprocess_p.h"
#include "sshprocess.h"
#include "sshsettings.h"
#include <QDir>
@@ -43,7 +43,7 @@ namespace QSsh {
struct SftpTransfer::SftpTransferPrivate
{
Internal::SshProcess sftpProc;
SshProcess sftpProc;
FilesToTransfer files;
Internal::FileTransferType transferType;
FileTransferErrorHandling errorHandlingMode;

View File

@@ -26,7 +26,7 @@ HEADERS = \
sshconnectionmanager.h \
sshkeycreationdialog.h \
sshlogging_p.h \
sshprocess_p.h \
sshprocess.h \
sshremoteprocess.h \
sshremoteprocessrunner.h \
sshsettings.h \

View File

@@ -32,7 +32,7 @@ Project {
"sshlogging.cpp",
"sshlogging_p.h",
"sshprocess.cpp",
"sshprocess_p.h",
"sshprocess.h",
"sshremoteprocess.cpp",
"sshremoteprocess.h",
"sshremoteprocessrunner.cpp",

View File

@@ -28,7 +28,7 @@
#include "sftpsession.h"
#include "sftptransfer.h"
#include "sshlogging_p.h"
#include "sshprocess_p.h"
#include "sshprocess.h"
#include "sshremoteprocess.h"
#include "sshsettings.h"

View File

@@ -23,7 +23,7 @@
**
****************************************************************************/
#include "sshprocess_p.h"
#include "sshprocess.h"
#include "sshsettings.h"
@@ -35,7 +35,6 @@
#endif
namespace QSsh {
namespace Internal {
SshProcess::SshProcess()
{
@@ -70,5 +69,4 @@ void SshProcess::setupChildProcess()
#endif
}
} // namespace Internal
} // namespace QSsh

View File

@@ -25,12 +25,13 @@
#pragma once
#include "ssh_global.h"
#include <QProcess>
namespace QSsh {
namespace Internal {
class SshProcess : public QProcess
class QSSH_EXPORT SshProcess : public QProcess
{
public:
SshProcess();
@@ -40,5 +41,4 @@ private:
void setupChildProcess() override;
};
} // namespace Internal
} // namespace QSsh

View File

@@ -26,7 +26,7 @@
#pragma once
#include "ssh_global.h"
#include "sshprocess_p.h"
#include "sshprocess.h"
#include <QStringList>
@@ -37,7 +37,7 @@ QT_END_NAMESPACE
namespace QSsh {
class SshConnection;
class QSSH_EXPORT SshRemoteProcess : public Internal::SshProcess
class QSSH_EXPORT SshRemoteProcess : public SshProcess
{
Q_OBJECT

View File

@@ -55,7 +55,7 @@ public:
SshRemoteProcessPtr process;
DeviceUsedPortsGatherer portsGatherer;
SftpSessionPtr sftpSession;
QProcess rsyncProcess;
SshProcess rsyncProcess;
State state = Inactive;
bool sftpWorks = false;
};

View File

@@ -69,7 +69,7 @@ private:
mutable QList<DeployableFile> m_deployableFiles;
bool m_ignoreMissingFiles = false;
QProcess m_rsync;
SshProcess m_rsync;
SshRemoteProcessPtr m_mkdir;
};