Ssh: Use FilePath for SshConnectionParameters::privateKeyFile

Change-Id: Ifaf97cc744f80e1fa0f4000aabf83671b2ffd972
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-09-27 18:23:27 +02:00
parent 155d9368b5
commit aa4b825809
8 changed files with 15 additions and 15 deletions

View File

@@ -130,7 +130,7 @@ struct SshConnection::SshConnectionPrivate
SshConnectionParameters::AuthenticationTypeSpecificKey;
if (keyOnly) {
args << "-o" << "IdentitiesOnly=yes";
args << "-i" << connParams.privateKeyFile;
args << "-i" << connParams.privateKeyFile.path();
}
if (keyOnly || SshSettings::askpassFilePath().isEmpty())
args << "-o" << "BatchMode=yes";

View File

@@ -28,20 +28,19 @@
#include "sftpdefs.h"
#include "ssh_global.h"
#include <utils/filepath.h>
#include <utils/processutils.h>
#include <QByteArray>
#include <QFlags>
#include <QHostAddress>
#include <QMetaType>
#include <QObject>
#include <QString>
#include <QHostAddress>
#include <QUrl>
#include <memory>
namespace Utils { class FilePath; }
namespace QSsh {
class SshRemoteProcess;
@@ -69,7 +68,7 @@ public:
void setUserName(const QString &name) { url.setUserName(name); }
QUrl url;
QString privateKeyFile;
Utils::FilePath privateKeyFile;
QString x11DisplayName;
int timeout = 0; // In seconds.
AuthenticationType authenticationType = AuthenticationTypeAll;