Clean up SshConnectionManager interface

Change-Id: Id1541f83f431171dbdd94d5dd48f93e1c2cdf6fb
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
hjk
2013-09-10 18:52:17 +02:00
parent 8336a1b7ec
commit 122b7344d9
8 changed files with 34 additions and 65 deletions

View File

@@ -113,7 +113,7 @@ SftpFileSystemModel::~SftpFileSystemModel()
void SftpFileSystemModel::setSshConnection(const SshConnectionParameters &sshParams)
{
QSSH_ASSERT_AND_RETURN(!d->sshConnection);
d->sshConnection = SshConnectionManager::instance().acquireConnection(sshParams);
d->sshConnection = QSsh::acquireConnection(sshParams);
connect(d->sshConnection, SIGNAL(error(QSsh::SshError)), SLOT(handleSshConnectionFailure()));
if (d->sshConnection->state() == SshConnection::Connected) {
handleSshConnectionEstablished();
@@ -267,7 +267,7 @@ void SftpFileSystemModel::shutDown()
}
if (d->sshConnection) {
disconnect(d->sshConnection, 0, this, 0);
SshConnectionManager::instance().releaseConnection(d->sshConnection);
QSsh::releaseConnection(d->sshConnection);
d->sshConnection = 0;
}
delete d->rootNode;