diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2010-02-22 12:40:17 (GMT) |
---|---|---|
committer | Markus Goetz <Markus.Goetz@nokia.com> | 2010-02-22 14:50:56 (GMT) |
commit | 0094e35f2303f5cf43d8fb97330efce916250bf9 (patch) | |
tree | 10e8c2342f6abc911817a612de2489ccc36d9fc4 /src | |
parent | 0ead0218d7500ece1f45999a9fb764b15fd8e119 (diff) | |
download | Qt-0094e35f2303f5cf43d8fb97330efce916250bf9.zip Qt-0094e35f2303f5cf43d8fb97330efce916250bf9.tar.gz Qt-0094e35f2303f5cf43d8fb97330efce916250bf9.tar.bz2 |
QAbstractSocket: Clarify documentation
Reviewed-by: Thiago
Diffstat (limited to 'src')
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 829df89..275c436 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -155,6 +155,9 @@ See the \l network/fortuneclient and \l network/blockingfortuneclient examples for an overview of both approaches. + \note We discourage the use of the blocking functions together + with signals. One of the two possibilities should be used. + QAbstractSocket can be used with QTextStream and QDataStream's stream operators (operator<<() and operator>>()). There is one issue to be aware of, though: You must make sure that enough data @@ -1682,9 +1685,12 @@ static int qt_timeout_value(int msecs, int elapsed) If msecs is -1, this function will not time out. - Note: This function may wait slightly longer than \a msecs, + \note This function may wait slightly longer than \a msecs, depending on the time it takes to complete the host lookup. + \note Multiple calls to this functions do not accumulate the time. + If the function times out, the connecting process will be aborted. + \sa connectToHost(), connected() */ bool QAbstractSocket::waitForConnected(int msecs) @@ -1722,7 +1728,7 @@ bool QAbstractSocket::waitForConnected(int msecs) d->_q_startConnecting(QHostInfo::fromName(d->hostName)); } if (state() == UnconnectedState) - return false; + return false; // connect not im progress anymore! bool timedOut = true; #if defined (QABSTRACTSOCKET_DEBUG) |