SSH: Use plain pointers to SshConnection objects.

It used to be shared pointers so that existing connection objects could
easily be passed around in order not to open a new connection to the same
server. Since the introduction of the SshConnectionManager, this
is no longer necessary.

Change-Id: I13fd3eceaf35d562e6260e9969abbffb01edd6b5
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Christian Kandeler
2012-05-29 13:22:33 +02:00
parent 6886dcb787
commit 94ab29519b
34 changed files with 198 additions and 177 deletions

View File

@@ -107,12 +107,6 @@ bool operator!=(const SshConnectionParameters &p1, const SshConnectionParameters
// TODO: Mechanism for checking the host key. First connection to host: save, later: compare
SshConnection::Ptr SshConnection::create(const SshConnectionParameters &serverInfo)
{
doStaticInitializationsIfNecessary();
return Ptr(new SshConnection(serverInfo));
}
SshConnection::SshConnection(const SshConnectionParameters &serverInfo)
: d(new Internal::SshConnectionPrivate(this, serverInfo))
{
@@ -208,6 +202,8 @@ SshConnectionPrivate::SshConnectionPrivate(SshConnection *conn,
m_connParams(serverInfo), m_error(SshNoError), m_ignoreNextPacket(false),
m_conn(conn)
{
doStaticInitializationsIfNecessary();
setupPacketHandlers();
m_socket->setProxy(m_connParams.proxyType == SshConnectionParameters::DefaultProxy
? QNetworkProxy::DefaultProxy : QNetworkProxy::NoProxy);