diff options
author | Jerome Pasion <jerome.pasion@digia.com> | 2013-10-02 16:51:05 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-08 00:46:27 +0200 |
commit | 4533cc994484a2308297e64e99af005fb4dca065 (patch) | |
tree | bc66283d11cdad100a1aec03f4e1d86bedc9a79e /src/network/socket | |
parent | 50dd0232b61d8ea3fb9aab18972c6e19678656e6 (diff) |
Doc: Adding mark-up to boolean default values.
Default values should have mark-up to denote that they are code.
This commit changes:
-"property is true" to "property is \c true".
-"Returns true" to "Returns \c true".
-"property is false" to "property is \c false".
-"returns true" to "returns \c true".
-"returns false" to "returns \c false".
src/3rdparty and non-documentation instances were ignored.
Task-number: QTBUG-33360
Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/network/socket')
-rw-r--r-- | src/network/socket/qabstractsocket.cpp | 40 | ||||
-rw-r--r-- | src/network/socket/qlocalserver.cpp | 12 | ||||
-rw-r--r-- | src/network/socket/qlocalsocket.cpp | 22 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine.cpp | 16 | ||||
-rw-r--r-- | src/network/socket/qtcpserver.cpp | 18 | ||||
-rw-r--r-- | src/network/socket/qudpsocket.cpp | 10 |
6 files changed, 59 insertions, 59 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp index 084e0bc656..47fec38283 100644 --- a/src/network/socket/qabstractsocket.cpp +++ b/src/network/socket/qabstractsocket.cpp @@ -87,7 +87,7 @@ connection has been established, it enters ConnectedState and emits connected(). If an error occurs at any stage, error() is emitted. Whenever the state changes, stateChanged() is emitted. - For convenience, isValid() returns true if the socket is ready for + For convenience, isValid() returns \c true if the socket is ready for reading and writing, but note that the socket's state must be ConnectedState before reading and writing can occur. @@ -143,7 +143,7 @@ \snippet network/tcpwait.cpp 0 - If \l{QIODevice::}{waitForReadyRead()} returns false, the + If \l{QIODevice::}{waitForReadyRead()} returns \c false, the connection has been closed or an error has occurred. Programming with a blocking socket is radically different from @@ -1464,8 +1464,8 @@ void QAbstractSocket::setPauseMode(PauseModes pauseMode) By default, the socket is bound using the DefaultForPlatform BindMode. If a port is not specified, a random port is chosen. - On success, the functions returns true and the socket enters - BoundState; otherwise it returns false. + On success, the functions returns \c true and the socket enters + BoundState; otherwise it returns \c false. */ bool QAbstractSocket::bind(const QHostAddress &address, quint16 port, BindMode mode) @@ -1537,8 +1537,8 @@ bool QAbstractSocket::bind(quint16 port, BindMode mode) } /*! - Returns true if the socket is valid and ready for use; otherwise - returns false. + Returns \c true if the socket is valid and ready for use; otherwise + returns \c false. \b{Note:} The socket's state must be ConnectedState before reading and writing can occur. @@ -1782,8 +1782,8 @@ QString QAbstractSocket::peerName() const } /*! - Returns true if a line of data can be read from the socket; - otherwise returns false. + Returns \c true if a line of data can be read from the socket; + otherwise returns \c false. \sa readLine() */ @@ -1817,8 +1817,8 @@ qintptr QAbstractSocket::socketDescriptor() const /*! Initializes QAbstractSocket with the native socket descriptor \a - socketDescriptor. Returns true if \a socketDescriptor is accepted - as a valid socket descriptor; otherwise returns false. + socketDescriptor. Returns \c true if \a socketDescriptor is accepted + as a valid socket descriptor; otherwise returns \c false. The socket is opened in the mode specified by \a openMode, and enters the socket state specified by \a socketState. @@ -1960,8 +1960,8 @@ static int qt_timeout_value(int msecs, int elapsed) /*! Waits until the socket is connected, up to \a msecs milliseconds. If the connection has been established, this - function returns true; otherwise it returns false. In the case - where it returns false, you can call error() to determine + function returns \c true; otherwise it returns \c false. In the case + where it returns \c false, you can call error() to determine the cause of the error. The following example waits up to one second for a connection @@ -2072,8 +2072,8 @@ bool QAbstractSocket::waitForConnected(int msecs) will timeout after \a msecs milliseconds; the default timeout is 30000 milliseconds. - The function returns true if the readyRead() signal is emitted and - there is new data available for reading; otherwise it returns false + The function returns \c true if the readyRead() signal is emitted and + there is new data available for reading; otherwise it returns \c false (if an error occurred or the operation timed out). \sa waitForBytesWritten() @@ -2190,7 +2190,7 @@ bool QAbstractSocket::waitForBytesWritten(int msecs) if (readyToWrite) { if (d->canWriteNotification()) { #if defined (QABSTRACTSOCKET_DEBUG) - qDebug("QAbstractSocket::waitForBytesWritten returns true"); + qDebug("QAbstractSocket::waitForBytesWritten returns \c true"); #endif return true; } @@ -2205,8 +2205,8 @@ bool QAbstractSocket::waitForBytesWritten(int msecs) /*! Waits until the socket has disconnected, up to \a msecs milliseconds. If the connection has been disconnected, this - function returns true; otherwise it returns false. In the case - where it returns false, you can call error() to determine + function returns \c true; otherwise it returns \c false. In the case + where it returns \c false, you can call error() to determine the cause of the error. The following example waits up to one second for a connection @@ -2309,8 +2309,8 @@ bool QAbstractSocket::isSequential() const /*! \reimp - Returns true if no more data is currently - available for reading; otherwise returns false. + Returns \c true if no more data is currently + available for reading; otherwise returns \c false. This function is most commonly used when reading data from the socket in a loop. For example: @@ -2327,7 +2327,7 @@ bool QAbstractSocket::atEnd() const /*! This function writes as much as possible from the internal write buffer to the underlying network socket, without blocking. If any data was written, - this function returns true; otherwise false is returned. + this function returns \c true; otherwise false is returned. Call this function if you need QAbstractSocket to start sending buffered data immediately. The number of bytes successfully written depends on the diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp index 95782cc1c3..f7f8aab182 100644 --- a/src/network/socket/qlocalserver.cpp +++ b/src/network/socket/qlocalserver.cpp @@ -218,8 +218,8 @@ QString QLocalServer::errorString() const } /*! - Returns true if the server has a pending connection; otherwise - returns false. + Returns \c true if the server has a pending connection; otherwise + returns \c false. \sa nextPendingConnection(), setMaxPendingConnections() */ @@ -254,7 +254,7 @@ void QLocalServer::incomingConnection(quintptr socketDescriptor) } /*! - Returns true if the server is listening for incoming connections + Returns \c true if the server is listening for incoming connections otherwise false. \sa listen(), close() @@ -399,7 +399,7 @@ QLocalSocket *QLocalServer::nextPendingConnection() \since 4.5 Removes any server instance that might cause a call to listen() to fail - and returns true if successful; otherwise returns false. + and returns \c true if successful; otherwise returns \c false. This function is meant to recover from a crash, when the previous server instance has not been cleaned up. @@ -470,8 +470,8 @@ void QLocalServer::setMaxPendingConnections(int numConnections) /*! Waits for at most \a msec milliseconds or until an incoming connection - is available. Returns true if a connection is available; otherwise - returns false. If the operation timed out and \a timedOut is not 0, + is available. Returns \c true if a connection is available; otherwise + returns \c false. If the operation timed out and \a timedOut is not 0, *timedOut will be set to true. This is a blocking function call. Its use is ill-advised in a diff --git a/src/network/socket/qlocalsocket.cpp b/src/network/socket/qlocalsocket.cpp index f516b932e7..d4251672db 100644 --- a/src/network/socket/qlocalsocket.cpp +++ b/src/network/socket/qlocalsocket.cpp @@ -114,8 +114,8 @@ QT_BEGIN_NAMESPACE LocalSocketState socketState, OpenMode openMode) Initializes QLocalSocket with the native socket descriptor - \a socketDescriptor. Returns true if socketDescriptor is accepted - as a valid socket descriptor; otherwise returns false. The socket is + \a socketDescriptor. Returns \c true if socketDescriptor is accepted + as a valid socket descriptor; otherwise returns \c false. The socket is opened in the mode specified by \a openMode, and enters the socket state specified by \a socketState. @@ -187,7 +187,7 @@ QT_BEGIN_NAMESPACE This function writes as much as possible from the internal write buffer to the socket, without blocking. If any data was written, this function - returns true; otherwise false is returned. + returns \c true; otherwise false is returned. Call this function if you need QLocalSocket to start sending buffered data immediately. The number of bytes successfully written depends on the @@ -221,8 +221,8 @@ QT_BEGIN_NAMESPACE /*! \fn bool QLocalSocket::isValid() const - Returns true if the socket is valid and ready for use; otherwise - returns false. + Returns \c true if the socket is valid and ready for use; otherwise + returns \c false. \note The socket's state must be ConnectedState before reading and writing can occur. @@ -263,8 +263,8 @@ QT_BEGIN_NAMESPACE \fn bool QLocalSocket::waitForConnected(int msecs) Waits until the socket is connected, up to \a msecs milliseconds. If the - connection has been established, this function returns true; otherwise - it returns false. In the case where it returns false, you can call + connection has been established, this function returns \c true; otherwise + it returns \c false. In the case where it returns \c false, you can call error() to determine the cause of the error. The following example waits up to one second for a connection @@ -282,8 +282,8 @@ QT_BEGIN_NAMESPACE Waits until the socket has disconnected, up to \a msecs milliseconds. If the connection has been disconnected, this - function returns true; otherwise it returns false. In the case - where it returns false, you can call error() to determine + function returns \c true; otherwise it returns \c false. In the case + where it returns \c false, you can call error() to determine the cause of the error. The following example waits up to one second for a connection @@ -304,8 +304,8 @@ QT_BEGIN_NAMESPACE will timeout after \a msecs milliseconds; the default timeout is 30000 milliseconds. - The function returns true if data is available for reading; - otherwise it returns false (if an error occurred or the + The function returns \c true if data is available for reading; + otherwise it returns \c false (if an error occurred or the operation timed out). \sa waitForBytesWritten() diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 536bc63ed0..6bf8626f97 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -335,8 +335,8 @@ QNativeSocketEngine::~QNativeSocketEngine() /*! Initializes a QNativeSocketEngine by creating a new socket of type \a - socketType and network layer protocol \a protocol. Returns true on - success; otherwise returns false. + socketType and network layer protocol \a protocol. Returns \c true on + success; otherwise returns \c false. If the socket was already initialized, this function closes the socket before reeinitializing it. @@ -461,7 +461,7 @@ bool QNativeSocketEngine::initialize(qintptr socketDescriptor, QAbstractSocket:: } /*! - Returns true if the socket is valid; otherwise returns false. A + Returns \c true if the socket is valid; otherwise returns \c false. A socket is valid if it has not been successfully initialized, or if it has been closed. */ @@ -483,7 +483,7 @@ qintptr QNativeSocketEngine::socketDescriptor() const /*! Connects to the IP address and port specified by \a address and \a - port. If the connection is established, this function returns true + port. If the connection is established, this function returns \c true and the socket enters ConnectedState. Otherwise, false is returned. @@ -559,7 +559,7 @@ bool QNativeSocketEngine::connectToHostByName(const QString &name, quint16 port) /*! Binds the socket to the address \a address and port \a - port. Returns true on success; otherwise false is returned. The + port. Returns \c true on success; otherwise false is returned. The port may be 0, in which case an arbitrary unused port is assigned automatically by the operating system. @@ -708,7 +708,7 @@ qint64 QNativeSocketEngine::bytesAvailable() const } /*! - Returns true if there is at least one datagram pending. This + Returns \c true if there is at least one datagram pending. This function is only called by UDP sockets, where a datagram can have a size of 0. TCP sockets call bytesAvailable(). */ @@ -880,7 +880,7 @@ void QNativeSocketEngine::close() reading. If \a timedOut is not 0 and \a msecs milliseconds have passed, the value of \a timedOut is set to true. - Returns true if data is available for reading; otherwise returns + Returns \c true if data is available for reading; otherwise returns false. This is a blocking function call; its use is disadvised in a @@ -920,7 +920,7 @@ bool QNativeSocketEngine::waitForRead(int msecs, bool *timedOut) writing. If \a timedOut is not 0 and \a msecs milliseconds have passed, the value of \a timedOut is set to true. - Returns true if data is available for writing; otherwise returns + Returns \c true if data is available for writing; otherwise returns false. This is a blocking function call; its use is disadvised in a diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp index 896980f849..31215ee307 100644 --- a/src/network/socket/qtcpserver.cpp +++ b/src/network/socket/qtcpserver.cpp @@ -271,7 +271,7 @@ QTcpServer::~QTcpServer() automatically. If \a address is QHostAddress::Any, the server will listen on all network interfaces. - Returns true on success; otherwise returns false. + Returns \c true on success; otherwise returns \c false. \sa isListening() */ @@ -351,8 +351,8 @@ bool QTcpServer::listen(const QHostAddress &address, quint16 port) } /*! - Returns true if the server is currently listening for incoming - connections; otherwise returns false. + Returns \c true if the server is currently listening for incoming + connections; otherwise returns \c false. \sa listen() */ @@ -408,8 +408,8 @@ qintptr QTcpServer::socketDescriptor() const /*! Sets the socket descriptor this server should use when listening - for incoming connections to \a socketDescriptor. Returns true if - the socket is set successfully; otherwise returns false. + for incoming connections to \a socketDescriptor. Returns \c true if + the socket is set successfully; otherwise returns \c false. The socket is assumed to be in listening state. @@ -486,8 +486,8 @@ QHostAddress QTcpServer::serverAddress() const /*! Waits for at most \a msec milliseconds or until an incoming - connection is available. Returns true if a connection is - available; otherwise returns false. If the operation timed out + connection is available. Returns \c true if a connection is + available; otherwise returns \c false. If the operation timed out and \a timedOut is not 0, *\a timedOut will be set to true. This is a blocking function call. Its use is disadvised in a @@ -524,8 +524,8 @@ bool QTcpServer::waitForNewConnection(int msec, bool *timedOut) } /*! - Returns true if the server has a pending connection; otherwise - returns false. + Returns \c true if the server has a pending connection; otherwise + returns \c false. \sa nextPendingConnection(), setMaxPendingConnections() */ diff --git a/src/network/socket/qudpsocket.cpp b/src/network/socket/qudpsocket.cpp index a01fdd4646..de2fc22018 100644 --- a/src/network/socket/qudpsocket.cpp +++ b/src/network/socket/qudpsocket.cpp @@ -66,7 +66,7 @@ you don't need to call bind(). The readyRead() signal is emitted whenever datagrams arrive. In - that case, hasPendingDatagrams() returns true. Call + that case, hasPendingDatagrams() returns \c true. Call pendingDatagramSize() to obtain the size of the first pending datagram, and readDatagram() to read it. @@ -182,7 +182,7 @@ QUdpSocket::~QUdpSocket() be bound using IPv6 (or in dual mode, using QHostAddress::Any). You must use QHostAddress::AnyIPv4 instead. - This function returns true if successful; otherwise it returns false + This function returns \c true if successful; otherwise it returns \c false and sets the socket error accordingly. \sa leaveMulticastGroup() @@ -216,7 +216,7 @@ bool QUdpSocket::joinMulticastGroup(const QHostAddress &groupAddress, interface chosen by the operating system. The socket must be in BoundState, otherwise an error occurs. - This function returns true if successful; otherwise it returns false and + This function returns \c true if successful; otherwise it returns \c false and sets the socket error accordingly. \sa joinMulticastGroup() @@ -284,8 +284,8 @@ void QUdpSocket::setMulticastInterface(const QNetworkInterface &iface) #endif // QT_NO_NETWORKINTERFACE /*! - Returns true if at least one datagram is waiting to be read; - otherwise returns false. + Returns \c true if at least one datagram is waiting to be read; + otherwise returns \c false. \sa pendingDatagramSize(), readDatagram() */ |