forked from qt-creator/qt-creator
SSH: Fix connection check in SFTPFileSystemModel.
The current code is not technically buggy, but does unnecessary things and therefore might confuse people looking at it. Change-Id: Ia6fcca575a8cc9856e86c66f337e2bffd9bf4b3a Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -120,8 +120,10 @@ void SftpFileSystemModel::setSshConnection(const SshConnectionParameters &sshPar
|
||||
d->sshConnection = SshConnectionManager::instance().acquireConnection(sshParams);
|
||||
connect(d->sshConnection.data(), SIGNAL(error(Utils::SshError)),
|
||||
SLOT(handleSshConnectionFailure()));
|
||||
if (d->sshConnection->state() == SshConnection::Connected)
|
||||
if (d->sshConnection->state() == SshConnection::Connected) {
|
||||
handleSshConnectionEstablished();
|
||||
return;
|
||||
}
|
||||
connect(d->sshConnection.data(), SIGNAL(connected()), SLOT(handleSshConnectionEstablished()));
|
||||
if (d->sshConnection->state() == SshConnection::Unconnected)
|
||||
d->sshConnection->connectToHost();
|
||||
|
Reference in New Issue
Block a user