From 4d495175043c399fdca6e1bb4c74ef176fc76fb4 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 6 Aug 2025 11:29:57 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 4 Signed-off-by: Michele Calgaro --- doc/html/networkprotocol-example.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'doc/html/networkprotocol-example.html') diff --git a/doc/html/networkprotocol-example.html b/doc/html/networkprotocol-example.html index a3f22e7fb..133efa036 100644 --- a/doc/html/networkprotocol-example.html +++ b/doc/html/networkprotocol-example.html @@ -110,8 +110,8 @@ protected slots: #include <tqregexp.h> Nntp::Nntp() - : TQNetworkProtocol(), connectionReady( FALSE ), - readGroups( FALSE ), readArticle( FALSE ) + : TQNetworkProtocol(), connectionReady( false ), + readGroups( false ), readArticle( false ) { // create the command socket and connect to its signals commandSocket = new TQSocket( this ); @@ -151,7 +151,7 @@ Nntp::~Nntp() // write the command to the socket commandSocket->writeBlock( cmd.latin1(), cmd.length() ); - readGroups = TRUE; + readGroups = true; } void Nntp::operationGet( TQNetworkOperation *op ) @@ -170,28 +170,28 @@ Nntp::~Nntp() // read the head of the article cmd = "article " + file + "\r\n"; commandSocket->writeBlock( cmd.latin1(), cmd.length() ); - readArticle = TRUE; + readArticle = true; } bool Nntp::checkConnection( TQNetworkOperation * ) { - // we are connected, return TRUE + // we are connected, return true if ( commandSocket->isOpen() && connectionReady ) - return TRUE; + return true; // seems that there is no chance to connect if ( commandSocket->isOpen() ) - return FALSE; + return false; // don't call connectToHost() if we are already trying to connect if ( commandSocket->state() == TQSocket::Connecting ) - return FALSE; + return false; // start connecting - connectionReady = FALSE; + connectionReady = false; commandSocket->connectToHost( url()->host(), url()->port() != -1 ? url()->port() : 119 ); - return FALSE; + return false; } void Nntp::close() @@ -260,7 +260,7 @@ void Nntp::readyRead() // of the code of the server response was 200, we know that the // server is ready to get commands from us now if ( s.left( 3 ) == "200" ) - connectionReady = TRUE; + connectionReady = true; } void Nntp::parseGroups() @@ -275,7 +275,7 @@ void 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; operationInProgress()->setState( StDone ); emit finished( operationInProgress() ); return; @@ -298,10 +298,10 @@ void Nntp::parseGroups() inf.setName( group ); TQString path = url()->path(); inf.setDir( path.isEmpty() || path == "/" ); - inf.setSymLink( FALSE ); + inf.setSymLink( false ); inf.setFile( !inf.isDir() ); - inf.setWritable( FALSE ); - inf.setReadable( TRUE ); + inf.setWritable( false ); + inf.setReadable( true ); // let others know about our new child emit newChild( inf, operationInProgress() ); @@ -320,7 +320,7 @@ void Nntp::parseArticle() // if the line starts with a dot, we finished reading something if ( s[ 0 ] == '.' ) { - readArticle = FALSE; + readArticle = false; operationInProgress()->setState( StDone ); emit finished( operationInProgress() ); return; -- cgit v1.2.3