summaryrefslogtreecommitdiffstats
path: root/examples/network
diff options
context:
space:
mode:
Diffstat (limited to 'examples/network')
-rw-r--r--examples/network/archivesearch/archivedialog.ui.h2
-rw-r--r--examples/network/ftpclient/ftpmainwindow.ui.h6
-rw-r--r--examples/network/infoprotocol/infoserver/infodata.cpp14
-rw-r--r--examples/network/infoprotocol/infoserver/server.cpp2
-rw-r--r--examples/network/infoprotocol/infourlclient/client.cpp2
-rw-r--r--examples/network/infoprotocol/infourlclient/qip.cpp12
-rw-r--r--examples/network/mail/composer.cpp4
-rw-r--r--examples/network/networkprotocol/nntp.cpp32
-rw-r--r--examples/network/networkprotocol/view.cpp4
-rw-r--r--examples/network/remotecontrol/ipcserver.cpp2
10 files changed, 40 insertions, 40 deletions
diff --git a/examples/network/archivesearch/archivedialog.ui.h b/examples/network/archivesearch/archivedialog.ui.h
index 34467aaa3..a92912e19 100644
--- a/examples/network/archivesearch/archivedialog.ui.h
+++ b/examples/network/archivesearch/archivedialog.ui.h
@@ -87,7 +87,7 @@ void ArchiveDialog::searchDone( bool error )
TQString result(articleSearcher.readAll());
TQRegExp rx("<a href=\"(http://lists\\.trolltech\\.com/qt-interest/.*)\">(.*)</a>");
- rx.setMinimal(TRUE);
+ rx.setMinimal(true);
int pos = 0;
while (pos >= 0) {
pos = rx.search(result, pos);
diff --git a/examples/network/ftpclient/ftpmainwindow.ui.h b/examples/network/ftpclient/ftpmainwindow.ui.h
index 8580b7b69..7ee920758 100644
--- a/examples/network/ftpclient/ftpmainwindow.ui.h
+++ b/examples/network/ftpclient/ftpmainwindow.ui.h
@@ -33,7 +33,7 @@
void FtpMainWindow::init()
{
stateFtp = new TQLabel( tr("Unconnected"), statusBar() );
- statusBar()->addWidget( stateFtp, 0, TRUE );
+ statusBar()->addWidget( stateFtp, 0, true );
ftp = new TQFtp( this );
connect( ftp, TQ_SIGNAL(commandStarted(int)),
@@ -81,7 +81,7 @@ void FtpMainWindow::uploadFile()
0,
this,
"upload progress dialog",
- TRUE );
+ true );
connect( ftp, TQ_SIGNAL(dataTransferProgress(int,int)),
&progress, TQ_SLOT(setProgress(int,int)) );
connect( ftp, TQ_SIGNAL(commandFinished(int,bool)),
@@ -127,7 +127,7 @@ void FtpMainWindow::downloadFile()
0,
this,
"download progress dialog",
- TRUE );
+ true );
connect( ftp, TQ_SIGNAL(dataTransferProgress(int,int)),
&progress, TQ_SLOT(setProgress(int,int)) );
connect( ftp, TQ_SIGNAL(commandFinished(int,bool)),
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 967115c46..3637a0195 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 72b45ca28..a4fcec5dc 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 e9ba7aeb9..e6ca6f5f7 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;
diff --git a/examples/network/mail/composer.cpp b/examples/network/mail/composer.cpp
index 3b7ba596e..aaaa0120f 100644
--- a/examples/network/mail/composer.cpp
+++ b/examples/network/mail/composer.cpp
@@ -47,7 +47,7 @@ Composer::Composer( TQWidget *parent )
void Composer::sendMessage()
{
- send->setEnabled( FALSE );
+ send->setEnabled( false );
sendStatus->setText( tr( "Looking up mail servers" ) );
Smtp *smtp = new Smtp( from->text(), to->text(),
subject->text(),
@@ -61,5 +61,5 @@ void Composer::sendMessage()
void Composer::enableSend()
{
- send->setEnabled( TRUE );
+ send->setEnabled( true );
}
diff --git a/examples/network/networkprotocol/nntp.cpp b/examples/network/networkprotocol/nntp.cpp
index 08c2c18c9..033ddcc24 100644
--- a/examples/network/networkprotocol/nntp.cpp
+++ b/examples/network/networkprotocol/nntp.cpp
@@ -15,8 +15,8 @@
#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 );
@@ -56,7 +56,7 @@ void Nntp::operationListChildren( TQNetworkOperation * )
// write the command to the socket
commandSocket->writeBlock( cmd.latin1(), cmd.length() );
- readGroups = TRUE;
+ readGroups = true;
}
void Nntp::operationGet( TQNetworkOperation *op )
@@ -75,28 +75,28 @@ void Nntp::operationGet( TQNetworkOperation *op )
// 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()
@@ -165,7 +165,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()
@@ -180,7 +180,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;
@@ -203,10 +203,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() );
@@ -225,7 +225,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;
diff --git a/examples/network/networkprotocol/view.cpp b/examples/network/networkprotocol/view.cpp
index a2dd333ad..939f802ff 100644
--- a/examples/network/networkprotocol/view.cpp
+++ b/examples/network/networkprotocol/view.cpp
@@ -44,7 +44,7 @@ View::View()
this, TQ_SLOT( downloadFile() ) );
fileView = new TQMultiLineEdit( this );
- fileView->setReadOnly( TRUE );
+ fileView->setReadOnly( true );
// if new data comes in, display it
connect( &op, TQ_SIGNAL( data( const TQByteArray &, TQNetworkOperation * ) ),
@@ -71,7 +71,7 @@ TQString View::getOpenFileName()
static TQString workingDirectory = TQDir::currentDirPath();
TQFileDialog *dlg = new TQFileDialog( workingDirectory,
- TQString::null, 0, 0, TRUE );
+ TQString::null, 0, 0, true );
dlg->setCaption( TQFileDialog::tr( "Open" ) );
dlg->setMode( TQFileDialog::ExistingFile );
TQString result;
diff --git a/examples/network/remotecontrol/ipcserver.cpp b/examples/network/remotecontrol/ipcserver.cpp
index c6218e203..8418ef1df 100644
--- a/examples/network/remotecontrol/ipcserver.cpp
+++ b/examples/network/remotecontrol/ipcserver.cpp
@@ -53,7 +53,7 @@ private slots:
emit receivedPixmap( TQPixmap(variant.toImage()) );
break;
case TQVariant::Palette:
- TQApplication::setPalette( variant.toPalette(), TRUE );
+ TQApplication::setPalette( variant.toPalette(), true );
break;
default:
break;