From: Christian Kandeler Date: Tue, 4 Oct 2011 12:21:37 +0000 (+0200) Subject: SSH: Allow querying of IP protocol version. X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=1c52bed5d00c558569d03e65de1c6a31f3ccd3cc;p=qt-creator-jp%2Fqt-creator-jp.git SSH: Allow querying of IP protocol version. Change-Id: I97c8b89da8c8d46afb0bdc840627e142567d5d98 Reviewed-on: http://codereview.qt-project.org/5981 Reviewed-by: Christian Kandeler --- diff --git a/src/libs/utils/ssh/sshconnection.cpp b/src/libs/utils/ssh/sshconnection.cpp index 7e458e28f7..dc3ab4ff55 100644 --- a/src/libs/utils/ssh/sshconnection.cpp +++ b/src/libs/utils/ssh/sshconnection.cpp @@ -165,6 +165,11 @@ SshConnectionParameters SshConnection::connectionParameters() const return d->m_connParams; } +QAbstractSocket::NetworkLayerProtocol SshConnection::ipProtocolVersion() const +{ + return d->m_socket->localAddress().protocol(); +} + SshConnection::~SshConnection() { disconnect(); diff --git a/src/libs/utils/ssh/sshconnection.h b/src/libs/utils/ssh/sshconnection.h index 83493db53c..eed00cce6e 100644 --- a/src/libs/utils/ssh/sshconnection.h +++ b/src/libs/utils/ssh/sshconnection.h @@ -41,6 +41,7 @@ #include #include #include +#include namespace Utils { class SftpChannel; @@ -86,6 +87,7 @@ public: SshError errorState() const; QString errorString() const; SshConnectionParameters connectionParameters() const; + QAbstractSocket::NetworkLayerProtocol ipProtocolVersion() const; ~SshConnection(); QSharedPointer createRemoteProcess(const QByteArray &command);