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

@@ -36,7 +36,6 @@
#include "ssh_global.h"
#include <QScopedPointer>
#include <QSharedPointer>
namespace QSsh {
class SshConnection;
@@ -49,8 +48,8 @@ class QSSH_EXPORT SshConnectionManager
public:
static SshConnectionManager &instance();
QSharedPointer<SshConnection> acquireConnection(const SshConnectionParameters &sshParams);
void releaseConnection(const QSharedPointer<SshConnection> &connection);
SshConnection *acquireConnection(const SshConnectionParameters &sshParams);
void releaseConnection(SshConnection *connection);
// Make sure the next acquireConnection with the given parameters will return a new connection.
void forceNewConnection(const SshConnectionParameters &sshParams);