diff options
author | hjk <hjk121@nokiamail.com> | 2014-11-26 15:29:42 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2014-11-27 12:44:29 +0100 |
commit | 3431a24feef17cae173590558f83cc5775210197 (patch) | |
tree | 1bd0d1e6a78261bf3575b2a7dd44d49e9957c589 /src/libs/ssh/sshchannel.cpp | |
parent | 13c7d1c2ce5eb426f17d190e78188f196fcb29dc (diff) | |
download | qt-creator-3431a24feef17cae173590558f83cc5775210197.tar.gz |
Ssh: Remove indirection in AbstractSshChannel::m_timeoutTimer
... and connect it using Qt5-style connects.
Change-Id: Ic7f36949b38d4773f5ac0f04853abf93bebcf467
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/libs/ssh/sshchannel.cpp')
-rw-r--r-- | src/libs/ssh/sshchannel.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libs/ssh/sshchannel.cpp b/src/libs/ssh/sshchannel.cpp index 269cee765b..453812b928 100644 --- a/src/libs/ssh/sshchannel.cpp +++ b/src/libs/ssh/sshchannel.cpp @@ -48,13 +48,13 @@ const quint32 NoChannel = 0xffffffffu; AbstractSshChannel::AbstractSshChannel(quint32 channelId, SshSendFacility &sendFacility) - : m_sendFacility(sendFacility), m_timeoutTimer(new QTimer(this)), + : m_sendFacility(sendFacility), m_localChannel(channelId), m_remoteChannel(NoChannel), m_localWindowSize(initialWindowSize()), m_remoteWindowSize(0), m_state(Inactive) { - m_timeoutTimer->setSingleShot(true); - connect(m_timeoutTimer, SIGNAL(timeout()), this, SIGNAL(timeout())); + m_timeoutTimer.setSingleShot(true); + connect(&m_timeoutTimer, &QTimer::timeout, this, &AbstractSshChannel::timeout); } AbstractSshChannel::~AbstractSshChannel() @@ -78,7 +78,7 @@ void AbstractSshChannel::requestSessionStart() try { m_sendFacility.sendSessionPacket(m_localChannel, initialWindowSize(), maxPacketSize()); setChannelState(SessionRequested); - m_timeoutTimer->start(ReplyTimeout); + m_timeoutTimer.start(ReplyTimeout); } catch (Botan::Exception &e) { qDebug("Botan error: %s", e.what()); closeChannel(); @@ -147,7 +147,7 @@ void AbstractSshChannel::handleOpenSuccess(quint32 remoteChannelId, "Unexpected SSH_MSG_CHANNEL_OPEN_CONFIRMATION packet."); } - m_timeoutTimer->stop(); + m_timeoutTimer.stop(); if (remoteMaxPacketSize < MinMaxPacketSize) { throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_PROTOCOL_ERROR, @@ -178,7 +178,7 @@ void AbstractSshChannel::handleOpenFailure(const QString &reason) "Unexpected SSH_MSG_CHANNEL_OPEN_CONFIRMATION packet."); } - m_timeoutTimer->stop(); + m_timeoutTimer.stop(); #ifdef CREATOR_SSH_DEBUG qDebug("Channel open request failed for channel %u", m_localChannel); @@ -254,7 +254,7 @@ int AbstractSshChannel::handleChannelOrExtendedChannelData(const QByteArray &dat void AbstractSshChannel::closeChannel() { if (m_state == CloseRequested) { - m_timeoutTimer->stop(); + m_timeoutTimer.stop(); } else if (m_state != Closed) { if (m_state == Inactive) { setChannelState(Closed); |