SSH: Add infrastructure for passing additional connection options.

So far, the only option is whether to use the default proxy or not. More
will follow.

Change-Id: Icd1ec407a0269cc8e7577901853d3873fd03015c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Christian Kandeler
2012-10-01 14:51:27 +02:00
parent 41b963934d
commit 6c1b0fc80d
5 changed files with 14 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ namespace {
SshConnectionParameters::SshConnectionParameters() :
timeout(0), authenticationType(AuthenticationByKey), port(0), proxyType(NoProxy)
timeout(0), authenticationType(AuthenticationByKey), port(0), options(SshIgnoreDefaultProxy)
{
}
@@ -226,8 +226,8 @@ SshConnectionPrivate::SshConnectionPrivate(SshConnection *conn,
m_conn(conn)
{
setupPacketHandlers();
m_socket->setProxy(m_connParams.proxyType == SshConnectionParameters::DefaultProxy
? QNetworkProxy::DefaultProxy : QNetworkProxy::NoProxy);
m_socket->setProxy((m_connParams.options & SshIgnoreDefaultProxy)
? QNetworkProxy::NoProxy : QNetworkProxy::DefaultProxy);
m_timeoutTimer.setSingleShot(true);
m_timeoutTimer.setInterval(m_connParams.timeout * 1000);
m_keepAliveTimer.setSingleShot(true);