diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-11-26 15:11:22 +0900 |
| commit | b87533f9904c10f24d6b2e8177c00944e3efe15b (patch) | |
| tree | c1106a381c851b51e86004698457aef1211b77be /doc/html/networkprotocol-example.html | |
| parent | 894037c3e68e1573a34183d936171f8cda5085f3 (diff) | |
| download | tqt-r14.1.x.tar.gz tqt-r14.1.x.zip | |
Replace TRUE/FALSE with boolean values true/false - part 4r14.1.x
Manually cherry-picked from commit 4d495175
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/networkprotocol-example.html')
| -rw-r--r-- | doc/html/networkprotocol-example.html | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html index 38fe4ece5..20c4dd9e7 100644 --- a/doc/html/networkprotocol-example.html +++ b/doc/html/networkprotocol-example.html @@ -111,8 +111,8 @@ protected slots: #include <<a href="qregexp-h.html">ntqregexp.h</a>> <a name="f288"></a>Nntp::Nntp() - : <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>(), connectionReady( FALSE ), - readGroups( FALSE ), readArticle( FALSE ) + : <a href="ntqnetworkprotocol.html">TQNetworkProtocol</a>(), connectionReady( false ), + readGroups( false ), readArticle( false ) { // create the command socket and connect to its signals commandSocket = new <a href="ntqsocket.html">TQSocket</a>( this ); @@ -152,7 +152,7 @@ Nntp::~Nntp() // write the command to the socket <a name="x693"></a><a name="x692"></a><a name="x689"></a> commandSocket-><a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="ntqstring.html#latin1">latin1</a>(), cmd.<a href="ntqstring.html#length">length</a>() ); - readGroups = TRUE; + readGroups = true; } <a name="x674"></a>void Nntp::<a href="ntqnetworkprotocol.html#operationGet">operationGet</a>( <a href="qnetworkoperation.html">TQNetworkOperation</a> *op ) @@ -171,28 +171,28 @@ Nntp::~Nntp() // read the head of the article cmd = "article " + file + "\r\n"; commandSocket-><a href="ntqsocket.html#writeBlock">writeBlock</a>( cmd.<a href="ntqstring.html#latin1">latin1</a>(), cmd.<a href="ntqstring.html#length">length</a>() ); - readArticle = TRUE; + readArticle = true; } <a name="x673"></a>bool Nntp::<a href="ntqnetworkprotocol.html#checkConnection">checkConnection</a>( <a href="qnetworkoperation.html">TQNetworkOperation</a> * ) { - // we are connected, return TRUE + // we are connected, return true <a name="x670"></a> if ( commandSocket-><a href="ntqiodevice.html#isOpen">isOpen</a>() && connectionReady ) - return TRUE; + return true; // seems that there is no chance to connect if ( commandSocket-><a href="ntqiodevice.html#isOpen">isOpen</a>() ) - return FALSE; + return false; // don't call connectToHost() if we are already trying to connect <a name="x688"></a> if ( commandSocket-><a href="ntqsocket.html#state">state</a>() == TQSocket::Connecting ) - return FALSE; + return false; // start connecting - connectionReady = FALSE; + connectionReady = false; <a name="x680"></a> commandSocket-><a href="ntqsocket.html#connectToHost">connectToHost</a>( <a href="ntqnetworkprotocol.html#url">url</a>()->host(), <a href="ntqnetworkprotocol.html#url">url</a>()->port() != -1 ? url()->port() : 119 ); - return FALSE; + return false; } void <a name="f289"></a>Nntp::close() @@ -261,7 +261,7 @@ void <a name="f293"></a>Nntp::readyRead() // of the code of the server response was 200, we know that the // server is ready to get commands from us now <a name="x664"></a> if ( s.<a href="ntqcstring.html#left">left</a>( 3 ) == "200" ) - connectionReady = TRUE; + connectionReady = true; } void <a name="f294"></a>Nntp::parseGroups() @@ -276,7 +276,7 @@ void <a name="f294"></a>Nntp::parseGroups() // if the line starts with a dot, all groups or articles have been listed, // so we finished processing the listChildren() command if ( s[ 0 ] == '.' ) { - readGroups = FALSE; + readGroups = false; <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()->setState( StDone ); emit finished( <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ); return; @@ -299,10 +299,10 @@ void <a name="f294"></a>Nntp::parseGroups() <a name="x700"></a> inf.<a href="ntqurlinfo.html#setName">setName</a>( group ); <a href="ntqstring.html">TQString</a> path = <a href="ntqnetworkprotocol.html#url">url</a>()->path(); <a name="x698"></a> inf.<a href="ntqurlinfo.html#setDir">setDir</a>( path.<a href="ntqstring.html#isEmpty">isEmpty</a>() || path == "/" ); -<a name="x702"></a> inf.<a href="ntqurlinfo.html#setSymLink">setSymLink</a>( FALSE ); +<a name="x702"></a> inf.<a href="ntqurlinfo.html#setSymLink">setSymLink</a>( false ); <a name="x699"></a><a name="x697"></a> inf.<a href="ntqurlinfo.html#setFile">setFile</a>( !inf.<a href="ntqurlinfo.html#isDir">isDir</a>() ); -<a name="x703"></a> inf.<a href="ntqurlinfo.html#setWritable">setWritable</a>( FALSE ); -<a name="x701"></a> inf.<a href="ntqurlinfo.html#setReadable">setReadable</a>( TRUE ); +<a name="x703"></a> inf.<a href="ntqurlinfo.html#setWritable">setWritable</a>( false ); +<a name="x701"></a> inf.<a href="ntqurlinfo.html#setReadable">setReadable</a>( true ); // let others know about our new child emit newChild( inf, operationInProgress() ); @@ -321,7 +321,7 @@ void <a name="f295"></a>Nntp::parseArticle() // if the line starts with a dot, we finished reading something if ( s[ 0 ] == '.' ) { - readArticle = FALSE; + readArticle = false; <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>()->setState( StDone ); emit finished( <a href="ntqnetworkprotocol.html#operationInProgress">operationInProgress</a>() ); return; |
