SSH: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I04261849c92c54990f9f142fe541d984c5fb21d3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2016-06-07 22:04:26 +03:00
committed by Orgad Shaneh
parent 4cb94be1b5
commit 35036110ce
10 changed files with 50 additions and 47 deletions

View File

@@ -284,19 +284,20 @@ void SftpFileSystemModel::handleSshConnectionFailure()
void SftpFileSystemModel::handleSftpChannelInitialized()
{
connect(d->sftpChannel.data(),
SIGNAL(fileInfoAvailable(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>)),
SLOT(handleFileInfo(QSsh::SftpJobId,QList<QSsh::SftpFileInfo>)));
connect(d->sftpChannel.data(), SIGNAL(finished(QSsh::SftpJobId,QString)),
SLOT(handleSftpJobFinished(QSsh::SftpJobId,QString)));
&SftpChannel::fileInfoAvailable,
this, &SftpFileSystemModel::handleFileInfo);
connect(d->sftpChannel.data(), &SftpChannel::finished,
this, &SftpFileSystemModel::handleSftpJobFinished);
statRootDirectory();
}
void SftpFileSystemModel::handleSshConnectionEstablished()
{
d->sftpChannel = d->sshConnection->createSftpChannel();
connect(d->sftpChannel.data(), SIGNAL(initialized()), SLOT(handleSftpChannelInitialized()));
connect(d->sftpChannel.data(), SIGNAL(channelError(QString)),
SLOT(handleSftpChannelError(QString)));
connect(d->sftpChannel.data(), &SftpChannel::initialized,
this, &SftpFileSystemModel::handleSftpChannelInitialized);
connect(d->sftpChannel.data(), &SftpChannel::channelError,
this, &SftpFileSystemModel::handleSftpChannelError);
d->sftpChannel->initialize();
}