forked from qt-creator/qt-creator
Port to new connect api
Change-Id: I84834f37dd15108ed8c5fbf5353bcabc4e564f70 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -113,13 +113,14 @@ void SshRemoteProcessRunner::runInternal(const QByteArray &command,
|
||||
d->m_exitCode = -1;
|
||||
d->m_command = command;
|
||||
d->m_connection = QSsh::acquireConnection(sshParams);
|
||||
connect(d->m_connection, SIGNAL(error(QSsh::SshError)),
|
||||
SLOT(handleConnectionError(QSsh::SshError)));
|
||||
connect(d->m_connection, SIGNAL(disconnected()), SLOT(handleDisconnected()));
|
||||
connect(d->m_connection, &SshConnection::error,
|
||||
this, &SshRemoteProcessRunner::handleConnectionError);
|
||||
connect(d->m_connection, &SshConnection::disconnected,
|
||||
this, &SshRemoteProcessRunner::handleDisconnected);
|
||||
if (d->m_connection->state() == SshConnection::Connected) {
|
||||
handleConnected();
|
||||
} else {
|
||||
connect(d->m_connection, SIGNAL(connected()), SLOT(handleConnected()));
|
||||
connect(d->m_connection, &SshConnection::connected, this, &SshRemoteProcessRunner::handleConnected);
|
||||
if (d->m_connection->state() == SshConnection::Unconnected)
|
||||
d->m_connection->connectToHost();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user