forked from qt-creator/qt-creator
Make connParams a const member
Change-Id: I1dc75414766b9ec6c16a1c7080878da51310863c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -88,6 +88,9 @@ bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters
|
|||||||
|
|
||||||
struct SshConnection::SshConnectionPrivate
|
struct SshConnection::SshConnectionPrivate
|
||||||
{
|
{
|
||||||
|
SshConnectionPrivate(const SshConnectionParameters &sshParameters)
|
||||||
|
: connParams(sshParameters) {}
|
||||||
|
|
||||||
QString fullProcessError()
|
QString fullProcessError()
|
||||||
{
|
{
|
||||||
QString error;
|
QString error;
|
||||||
@@ -149,7 +152,7 @@ struct SshConnection::SshConnectionPrivate
|
|||||||
return connectionOptions(binary) << connParams.host();
|
return connectionOptions(binary) << connParams.host();
|
||||||
}
|
}
|
||||||
|
|
||||||
SshConnectionParameters connParams;
|
const SshConnectionParameters connParams;
|
||||||
SshConnectionInfo connInfo;
|
SshConnectionInfo connInfo;
|
||||||
SshProcess masterProcess;
|
SshProcess masterProcess;
|
||||||
QString errorString;
|
QString errorString;
|
||||||
@@ -160,11 +163,10 @@ struct SshConnection::SshConnectionPrivate
|
|||||||
|
|
||||||
|
|
||||||
SshConnection::SshConnection(const SshConnectionParameters &serverInfo, QObject *parent)
|
SshConnection::SshConnection(const SshConnectionParameters &serverInfo, QObject *parent)
|
||||||
: QObject(parent), d(new SshConnectionPrivate)
|
: QObject(parent), d(new SshConnectionPrivate(serverInfo))
|
||||||
{
|
{
|
||||||
qRegisterMetaType<QSsh::SftpFileInfo>("QSsh::SftpFileInfo");
|
qRegisterMetaType<QSsh::SftpFileInfo>("QSsh::SftpFileInfo");
|
||||||
qRegisterMetaType<QList <QSsh::SftpFileInfo> >("QList<QSsh::SftpFileInfo>");
|
qRegisterMetaType<QList <QSsh::SftpFileInfo> >("QList<QSsh::SftpFileInfo>");
|
||||||
d->connParams = serverInfo;
|
|
||||||
connect(&d->masterProcess, &QtcProcess::readyReadStandardOutput, [this] {
|
connect(&d->masterProcess, &QtcProcess::readyReadStandardOutput, [this] {
|
||||||
const QByteArray reply = d->masterProcess.readAllStandardOutput();
|
const QByteArray reply = d->masterProcess.readAllStandardOutput();
|
||||||
if (reply == "\n")
|
if (reply == "\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user