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

@@ -87,8 +87,7 @@ void SshDeviceProcess::start(const QString &executable, const QStringList &argum
d->exitCode = -1;
d->executable = executable;
d->arguments = arguments;
d->connection
= QSsh::SshConnectionManager::instance().acquireConnection(device()->sshParameters());
d->connection = QSsh::acquireConnection(device()->sshParameters());
connect(d->connection, SIGNAL(error(QSsh::SshError)), SLOT(handleConnectionError()));
connect(d->connection, SIGNAL(disconnected()), SLOT(handleDisconnected()));
if (d->connection->state() == QSsh::SshConnection::Connected) {
@@ -321,7 +320,7 @@ void SshDeviceProcess::SshDeviceProcessPrivate::setState(SshDeviceProcess::SshDe
process->disconnect(q);
if (connection) {
connection->disconnect(q);
QSsh::SshConnectionManager::instance().releaseConnection(connection);
QSsh::releaseConnection(connection);
connection = 0;
}
}