summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-02-22 13:40:17 +0100
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-02-22 15:50:56 +0100
commit0094e35f2303f5cf43d8fb97330efce916250bf9 (patch)
tree10e8c2342f6abc911817a612de2489ccc36d9fc4 /src/network
parent0ead0218d7500ece1f45999a9fb764b15fd8e119 (diff)
QAbstractSocket: Clarify documentation
Reviewed-by: Thiago
Diffstat (limited to 'src/network')
-rw-r--r--src/network/socket/qabstractsocket.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 829df89dd8..275c4366ed 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)