diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-01 22:09:14 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-08 09:01:42 +0900 |
| commit | 81ade129093a279e6537db25710583fd2bba9427 (patch) | |
| tree | a210834cbccc8aee2e9de7a8b7f41e1d31e2ced0 /examples/network/infoprotocol | |
| parent | 35ced32e331ee29fda1642616c803637952f5b22 (diff) | |
| download | tqt-81ade129.tar.gz tqt-81ade129.zip | |
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c03a4800879ab62692e017e01c825ba12a421ad0)
Diffstat (limited to 'examples/network/infoprotocol')
4 files changed, 15 insertions, 15 deletions
diff --git a/examples/network/infoprotocol/infoserver/infodata.cpp b/examples/network/infoprotocol/infoserver/infodata.cpp index 347c78d31..f31c092b1 100644 --- a/examples/network/infoprotocol/infoserver/infodata.cpp +++ b/examples/network/infoprotocol/infoserver/infodata.cpp @@ -12,10 +12,10 @@ // we hard code all nodes and data in InfoData class InfoData::InfoData() : - nodes( 17, TRUE ), data( 17, TRUE ) + nodes( 17, true ), data( 17, true ) { - nodes.setAutoDelete(TRUE); - data.setAutoDelete(TRUE); + nodes.setAutoDelete(true); + data.setAutoDelete(true); TQStringList *item; nodes.insert( "/", item = new TQStringList( ) ); @@ -63,10 +63,10 @@ TQStringList InfoData::list( TQString path, bool *found ) const path = "/" + path; TQStringList *list = nodes[ path ]; if ( list ) { - *found = TRUE; + *found = true; return *list; } else { - *found = FALSE; + *found = false; TQStringList empty; return empty; } @@ -78,10 +78,10 @@ TQString InfoData::get( TQString path, bool *found ) const path = "/" + path; TQString *file = data[ path ]; if ( file ) { - *found = TRUE; + *found = true; return *file; } else { - *found = FALSE; + *found = false; TQString empty; return empty; } diff --git a/examples/network/infoprotocol/infoserver/server.cpp b/examples/network/infoprotocol/infoserver/server.cpp index d71de6590..242be013a 100644 --- a/examples/network/infoprotocol/infoserver/server.cpp +++ b/examples/network/infoprotocol/infoserver/server.cpp @@ -80,7 +80,7 @@ TQString ClientSocket::processCommand( const TQString& command ) answer += "550 Invalid path\r\n"; } else if ( com.startsWith( "GET " ) ) { bool ok; - TQStringList data = TQStringList::split( '\n', info->get( com.mid( 4 ), &ok ), TRUE ); + TQStringList data = TQStringList::split( '\n', info->get( com.mid( 4 ), &ok ), true ); if ( ok ) { for ( TQStringList::Iterator it = data.begin(); it != data.end(); ++it ) answer += "213+" + *it + "\r\n"; diff --git a/examples/network/infoprotocol/infourlclient/client.cpp b/examples/network/infoprotocol/infourlclient/client.cpp index c3101639f..83df55e5b 100644 --- a/examples/network/infoprotocol/infourlclient/client.cpp +++ b/examples/network/infoprotocol/infourlclient/client.cpp @@ -43,7 +43,7 @@ TQString ClientInfo::getOpenFileName() { static TQString workingDirectory( "qip://localhost/" ); - TQFileDialog dlg( workingDirectory, TQString::null, 0, 0, TRUE ); + TQFileDialog dlg( workingDirectory, TQString::null, 0, 0, true ); dlg.setCaption( TQFileDialog::tr( "Open" ) ); dlg.setMode( TQFileDialog::ExistingFile ); TQString result; diff --git a/examples/network/infoprotocol/infourlclient/qip.cpp b/examples/network/infoprotocol/infourlclient/qip.cpp index aed848388..71d112174 100644 --- a/examples/network/infoprotocol/infourlclient/qip.cpp +++ b/examples/network/infoprotocol/infourlclient/qip.cpp @@ -33,14 +33,14 @@ int Qip::supportedOperations() const bool Qip::checkConnection( TQNetworkOperation * ) { if ( socket->isOpen() ) - return TRUE; + return true; // don't call connectToHost() if we are already trying to connect if ( socket->state() == TQSocket::Connecting ) - return FALSE; + return false; socket->connectToHost( url()->host(), url()->port() != -1 ? url()->port() : infoPort ); - return FALSE; + return false; } void Qip::operationListChildren( TQNetworkOperation * ) @@ -101,10 +101,10 @@ void Qip::socketReadyRead() TQUrlInfo inf; inf.setName( line.mid( 6 ) + TQString( ( line[ 4 ] == 'D' ) ? "/" : "" ) ); inf.setDir( line[ 4 ] == 'D' ); - inf.setSymLink( FALSE ); + inf.setSymLink( false ); inf.setFile( line[ 4 ] == 'F' ); - inf.setWritable( FALSE ); - inf.setReadable( TRUE ); + inf.setWritable( false ); + inf.setReadable( true ); emit newChild( inf, operationInProgress() ); } else if ( line.startsWith( "213+" ) ) { state = Data; |
