From bb6f1e575a1d65162c73ff4f3042c6febd4c939e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sun, 2 Sep 2012 17:23:39 +0200 Subject: move socket disconnect handling out of QXmppStream --- src/client/QXmppOutgoingClient.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index c3bcd8d0..9b379272 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -128,6 +128,10 @@ QXmppOutgoingClient::QXmppOutgoingClient(QObject *parent) QSslSocket *socket = new QSslSocket(this); setSocket(socket); + check = connect(socket, SIGNAL(disconnected()), + this, SLOT(_q_socketDisconnected())); + Q_ASSERT(check); + check = connect(socket, SIGNAL(sslErrors(QList)), this, SLOT(socketSslErrors(QList))); Q_ASSERT(check); @@ -218,6 +222,12 @@ bool QXmppOutgoingClient::isConnected() const return QXmppStream::isConnected() && d->sessionStarted; } +void QXmppOutgoingClient::_q_socketDisconnected() +{ + debug("Socket disconnected"); + emit disconnected(); +} + void QXmppOutgoingClient::socketSslErrors(const QList & error) { warning("SSL errors"); -- cgit v1.2.3