From 49af23e776209e94addc74eaacf5e5aaec83379f Mon Sep 17 00:00:00 2001 From: Jonas Gastal Date: Fri, 7 Jun 2013 19:16:06 -0300 Subject: Add documentation about reconnect attempts. Task-number: QTBUG-18082 Change-Id: I3cf667bcd9929d1fc3e8d3c5f9d4e612dddd181e Reviewed-by: Thiago Macieira --- src/network/socket/qabstractsocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/network') diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 71d6166840..084e0bc656 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -208,6 +208,10 @@ This signal is emitted after an error occurred. The \a socketError parameter describes the type of error that occurred. + When this signal is emitted, the socket may not be ready for a reconnect + attempt. In that case, attempts to reconnect should be done from the event + loop. For example, use a QTimer::singleShot() with 0 as the timeout. + QAbstractSocket::SocketError is not a registered metatype, so for queued connections, you will have to register it with Q_DECLARE_METATYPE() and qRegisterMetaType(). -- cgit v1.2.3