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 "sftpsession.h"
#include "sshlogging_p.h" #include "sshlogging_p.h"
#include "sshprocess_p.h" #include "sshprocess.h"
#include "sshsettings.h" #include "sshsettings.h"
#include <utils/fileutils.h> #include <utils/fileutils.h>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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