summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-07-01 22:09:14 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-07-08 09:01:42 +0900
commit81ade129093a279e6537db25710583fd2bba9427 (patch)
treea210834cbccc8aee2e9de7a8b7f41e1d31e2ced0
parent35ced32e331ee29fda1642616c803637952f5b22 (diff)
downloadtqt-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)
-rw-r--r--examples/aclock/main.cpp2
-rw-r--r--examples/action/application.cpp8
-rw-r--r--examples/action/toggleaction/toggleaction.cpp2
-rw-r--r--examples/addressbook/centralwidget.cpp52
-rw-r--r--examples/application/application.cpp8
-rw-r--r--examples/biff/biff.cpp4
-rw-r--r--examples/buttongroups/buttongroups.cpp24
-rw-r--r--examples/canvas/blendshadow.cpp2
-rw-r--r--examples/canvas/canvas.cpp16
-rw-r--r--examples/canvas/makeimg.cpp4
-rw-r--r--examples/chart/canvasview.cpp2
-rw-r--r--examples/chart/chartform.cpp28
-rw-r--r--examples/chart/chartform.h2
-rw-r--r--examples/chart/chartform_files.cpp6
-rw-r--r--examples/chart/optionsform.cpp6
-rw-r--r--examples/chart/optionsform.h2
-rw-r--r--examples/chart/setdataform.cpp10
-rw-r--r--examples/chart/setdataform.h2
-rw-r--r--examples/checklists/checklists.cpp10
-rw-r--r--examples/cursor/cursor.cpp4
-rw-r--r--examples/customlayout/border.cpp8
-rw-r--r--examples/customlayout/border.h8
-rw-r--r--examples/customlayout/flow.cpp4
-rw-r--r--examples/customlayout/flow.h2
-rw-r--r--examples/dclock/dclock.cpp2
-rw-r--r--examples/demo/display.cpp2
-rw-r--r--examples/demo/dnd/dnd.cpp2
-rw-r--r--examples/demo/dnd/iconview.cpp2
-rw-r--r--examples/demo/dnd/listview.cpp12
-rw-r--r--examples/demo/dnd/styledbutton.cpp10
-rw-r--r--examples/demo/frame.cpp18
-rw-r--r--examples/demo/graph.cpp4
-rw-r--r--examples/demo/i18n/i18n.cpp14
-rw-r--r--examples/demo/main.cpp28
-rw-r--r--examples/demo/opengl/fbm.h3
-rw-r--r--examples/demo/opengl/glbox.cpp2
-rw-r--r--examples/demo/opengl/glcontrolwidget.cpp4
-rw-r--r--examples/demo/opengl/glgear.cpp2
-rw-r--r--examples/demo/opengl/gllandscape.cpp16
-rw-r--r--examples/demo/opengl/gltexobj.cpp2
-rw-r--r--examples/demo/opengl/glworkspace.cpp16
-rw-r--r--examples/demo/opengl/printpreview.ui.h4
-rw-r--r--examples/demo/qasteroids/ledmeter.cpp2
-rw-r--r--examples/demo/qasteroids/toplevel.cpp48
-rw-r--r--examples/demo/qasteroids/view.cpp88
-rw-r--r--examples/demo/qasteroids/view.h2
-rw-r--r--examples/demo/qthumbwheel.cpp8
-rw-r--r--examples/demo/sql/sqlex.ui.h14
-rw-r--r--examples/demo/textdrawing/example.html8
-rw-r--r--examples/demo/textdrawing/helpwindow.cpp28
-rw-r--r--examples/demo/textdrawing/textedit.cpp34
-rw-r--r--examples/demo/widgets/widgetsbase.ui.h10
-rw-r--r--examples/demo/widgets/widgetsbase_pro.ui.h8
-rw-r--r--examples/desktop/desktop.cpp10
-rw-r--r--examples/dirview/dirview.cpp32
-rw-r--r--examples/dirview/dirview.h2
-rw-r--r--examples/dirview/main.cpp4
-rw-r--r--examples/distributor/distributor.ui.h58
-rw-r--r--examples/dragdrop/dropsite.cpp2
-rw-r--r--examples/dragdrop/main.cpp8
-rw-r--r--examples/dragdrop/secret.cpp4
-rw-r--r--examples/drawdemo/drawdemo.cpp2
-rw-r--r--examples/drawlines/connect.cpp8
-rw-r--r--examples/extension/dialogform.ui.h2
-rw-r--r--examples/extension/mainform.ui.h10
-rw-r--r--examples/fileiconview/mainwindow.cpp30
-rw-r--r--examples/fileiconview/qfileiconview.cpp70
-rw-r--r--examples/fileiconview/qfileiconview.h2
-rw-r--r--examples/fonts/simple-qfont-demo/viewer.cpp6
-rw-r--r--examples/forever/forever.cpp2
-rw-r--r--examples/hello/hello.cpp2
-rw-r--r--examples/helpdemo/helpdemo.cpp10
-rw-r--r--examples/helpsystem/whatsthis.cpp2
-rw-r--r--examples/helpviewer/helpwindow.cpp24
-rw-r--r--examples/i18n/main.cpp8
-rw-r--r--examples/iconview/main.cpp2
-rw-r--r--examples/iconview/simple_dd/main.cpp20
-rw-r--r--examples/life/life.cpp10
-rw-r--r--examples/life/lifedlg.cpp4
-rw-r--r--examples/lineedits/lineedits.cpp14
-rw-r--r--examples/listbox/listbox.cpp26
-rw-r--r--examples/listboxcombo/listboxcombo.cpp6
-rw-r--r--examples/listviews/listviews.cpp20
-rw-r--r--examples/mdi/application.cpp16
-rw-r--r--examples/menu/menu.cpp18
-rw-r--r--examples/movies/main.cpp2
-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
-rw-r--r--examples/opengl/gear/gear.cpp2
-rw-r--r--examples/opengl/glpixmap/globjwin.cpp10
-rw-r--r--examples/opengl/overlay/glteapots.cpp6
-rw-r--r--examples/opengl/overlay_x11/gearwidget.cpp4
-rw-r--r--examples/opengl/overlay_x11/rubberbandwidget.cpp10
-rw-r--r--examples/opengl/texture/gltexobj.cpp6
-rw-r--r--examples/popup/popup.cpp2
-rw-r--r--examples/progress/progress.cpp38
-rw-r--r--examples/progressbar/progressbar.cpp20
-rw-r--r--examples/qdir/qdir.cpp28
-rw-r--r--examples/qmag/qmag.cpp22
-rw-r--r--examples/qwerty/qwerty.cpp22
-rw-r--r--examples/richtext/richtext.cpp10
-rw-r--r--examples/rot13/rot13.cpp8
-rw-r--r--examples/scribble/scribble.cpp14
-rw-r--r--examples/scrollview/scrollview.cpp14
-rw-r--r--examples/showimg/imagetexteditor.cpp4
-rw-r--r--examples/showimg/showimg.cpp36
-rw-r--r--examples/splitter/splitter.cpp6
-rw-r--r--examples/sql/blob/main.cpp2
-rw-r--r--examples/sql/overview/basicbrowsing/main.cpp2
-rw-r--r--examples/sql/overview/basicbrowsing2/main.cpp2
-rw-r--r--examples/sql/overview/basicdatamanip/main.cpp2
-rw-r--r--examples/sql/overview/connect1/main.cpp2
-rw-r--r--examples/sql/overview/connection.cpp6
-rw-r--r--examples/sql/overview/create_connections/main.cpp2
-rw-r--r--examples/sql/overview/custom1/main.cpp4
-rw-r--r--examples/sql/overview/delete/main.cpp2
-rw-r--r--examples/sql/overview/extract/main.cpp2
-rw-r--r--examples/sql/overview/form2/main.cpp4
-rw-r--r--examples/sql/overview/insert/main.cpp2
-rw-r--r--examples/sql/overview/insert2/main.cpp2
-rw-r--r--examples/sql/overview/navigating/main.cpp2
-rw-r--r--examples/sql/overview/order1/main.cpp2
-rw-r--r--examples/sql/overview/order2/main.cpp2
-rw-r--r--examples/sql/overview/retrieve1/main.cpp2
-rw-r--r--examples/sql/overview/subclass3/main.cpp2
-rw-r--r--examples/sql/overview/subclass4/main.cpp6
-rw-r--r--examples/sql/overview/subclass5/main.cpp6
-rw-r--r--examples/sql/overview/table1/main.cpp2
-rw-r--r--examples/sql/overview/table4/main.h2
-rw-r--r--examples/sql/overview/update/main.cpp2
-rw-r--r--examples/sql/sqltable/main.cpp2
-rw-r--r--examples/tabdialog/tabdialog.cpp8
-rw-r--r--examples/table/bigtable/main.cpp8
-rw-r--r--examples/table/small-table-demo/main.cpp4
-rw-r--r--examples/table/statistics/statistics.cpp6
-rw-r--r--examples/tablet/canvas.cpp14
-rw-r--r--examples/tablet/scribble.cpp4
-rw-r--r--examples/tablet/tabletstats.cpp4
-rw-r--r--examples/tetrix/gtetrix.cpp2
-rw-r--r--examples/tetrix/qdragapp.cpp84
-rw-r--r--examples/tetrix/qtetrix.cpp2
-rw-r--r--examples/tetrix/qtetrixb.cpp18
-rw-r--r--examples/textedit/textedit.cpp30
-rw-r--r--examples/themes/metal.cpp28
-rw-r--r--examples/themes/metal.h4
-rw-r--r--examples/themes/themes.cpp22
-rw-r--r--examples/themes/wood.cpp8
-rw-r--r--examples/thread/prodcons/prodcons.cpp36
-rw-r--r--examples/thread/semaphores/main.cpp12
-rw-r--r--examples/tictac/tictac.cpp16
-rw-r--r--examples/toplevel/options.ui.h2
-rw-r--r--examples/widgets/main.cpp2
-rw-r--r--examples/widgets/widgets.cpp44
-rw-r--r--examples/wizard/wizard.cpp18
-rw-r--r--examples/xform/xform.cpp16
-rw-r--r--examples/xml/outliner/outlinetree.cpp2
-rw-r--r--examples/xml/tagreader-with-features/structureparser.cpp6
-rw-r--r--examples/xml/tagreader-with-features/tagreader.cpp16
-rw-r--r--examples/xml/tagreader/structureparser.cpp6
-rw-r--r--plugins/src/accessible/widgets/main.cpp2
-rw-r--r--plugins/src/accessible/widgets/qaccessiblemenu.cpp26
-rw-r--r--plugins/src/accessible/widgets/qaccessiblewidget.cpp126
-rw-r--r--plugins/src/imageformats/jpeg/main.cpp12
-rw-r--r--plugins/src/imageformats/mng/main.cpp8
-rw-r--r--plugins/src/imageformats/png/main.cpp12
-rw-r--r--plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp22
-rw-r--r--plugins/src/inputmethods/simple/qsimpleinputcontext.cpp36
-rw-r--r--plugins/src/inputmethods/xim/qximinputcontext_x11.cpp30
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp54
-rw-r--r--qmake/generators/mac/pbuilder_pbx.h4
-rw-r--r--qmake/generators/makefile.cpp206
-rw-r--r--qmake/generators/makefile.h6
-rw-r--r--qmake/generators/projectgenerator.cpp52
-rw-r--r--qmake/generators/projectgenerator.h4
-rw-r--r--qmake/generators/unix/unixmake.cpp44
-rw-r--r--qmake/generators/unix/unixmake.h2
-rw-r--r--qmake/generators/unix/unixmake2.cpp46
-rw-r--r--qmake/generators/win32/mingw_make.cpp32
-rw-r--r--qmake/generators/win32/msvc_dsp.cpp24
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp28
-rw-r--r--qmake/generators/win32/msvc_objectmodel.cpp124
-rw-r--r--qmake/generators/win32/msvc_objectmodel.h8
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp36
-rw-r--r--qmake/generators/win32/msvc_vcproj.h2
-rw-r--r--qmake/generators/win32/winmakefile.cpp26
-rw-r--r--qmake/main.cpp8
-rw-r--r--qmake/meta.cpp18
-rw-r--r--qmake/option.cpp56
-rw-r--r--qmake/option.h4
-rw-r--r--qmake/project.cpp138
-rw-r--r--qmake/project.h2
-rw-r--r--qmake/property.cpp26
-rw-r--r--qmake/property.h4
201 files changed, 1549 insertions, 1552 deletions
diff --git a/examples/aclock/main.cpp b/examples/aclock/main.cpp
index 0331d790e..0ca3edae5 100644
--- a/examples/aclock/main.cpp
+++ b/examples/aclock/main.cpp
@@ -16,7 +16,7 @@ int main( int argc, char **argv )
TQApplication a( argc, argv );
AnalogClock *clock = new AnalogClock;
if ( argc == 2 && strcmp( argv[1], "-transparent" ) == 0 )
- clock->setAutoMask( TRUE );
+ clock->setAutoMask( true );
clock->resize( 100, 100 );
a.setMainWidget( clock );
clock->setCaption("TQt Example - Analog Clock");
diff --git a/examples/action/application.cpp b/examples/action/application.cpp
index ecd70cdd0..ffde54348 100644
--- a/examples/action/application.cpp
+++ b/examples/action/application.cpp
@@ -178,7 +178,7 @@ void ApplicationWindow::load( const TQString &fileName )
TQTextStream ts( &f );
e->setText( ts.read() );
- e->setModified( FALSE );
+ e->setModified( false );
setCaption( fileName );
statusBar()->message( "Loaded document " + fileName, 2000 );
}
@@ -203,7 +203,7 @@ void ApplicationWindow::save()
t << text;
f.close();
- e->setModified( FALSE );
+ e->setModified( false );
setCaption( filename );
@@ -226,7 +226,7 @@ void ApplicationWindow::saveAs()
void ApplicationWindow::print()
{
- printer->setFullPage( TRUE );
+ printer->setFullPage( true );
if ( printer->setup(this) ) { // printer dialog
statusBar()->message( "Printing..." );
TQPainter p;
@@ -257,7 +257,7 @@ void ApplicationWindow::print()
break;
printer->newPage();
page++;
- } while (TRUE);
+ } while (true);
statusBar()->message( "Printing completed", 2000 );
} else {
diff --git a/examples/action/toggleaction/toggleaction.cpp b/examples/action/toggleaction/toggleaction.cpp
index 5da1a685c..dcb39f51e 100644
--- a/examples/action/toggleaction/toggleaction.cpp
+++ b/examples/action/toggleaction/toggleaction.cpp
@@ -13,7 +13,7 @@ int main( int argc, char **argv )
TQToolBar * toolbar = new TQToolBar( window );
TQAction * labelonoffaction = new TQAction( window, "labelonoff" );
- labelonoffaction->setToggleAction( TRUE );
+ labelonoffaction->setToggleAction( true );
labelonoffaction->setText( "labels on/off" );
labelonoffaction->setAccel( TQt::ALT+TQt::Key_L );
diff --git a/examples/addressbook/centralwidget.cpp b/examples/addressbook/centralwidget.cpp
index 82a2c81ae..a8eabc746 100644
--- a/examples/addressbook/centralwidget.cpp
+++ b/examples/addressbook/centralwidget.cpp
@@ -175,11 +175,11 @@ void ABCentralWidget::setupTabWidget()
grid2->addWidget( find, 1, 4 );
connect( find, TQ_SIGNAL( clicked() ), this, TQ_SLOT( findEntries() ) );
- cFirstName->setChecked( TRUE );
- sFirstName->setEnabled( TRUE );
- sLastName->setEnabled( FALSE );
- sAddress->setEnabled( FALSE );
- sEMail->setEnabled( FALSE );
+ cFirstName->setChecked( true );
+ sFirstName->setEnabled( true );
+ sLastName->setEnabled( false );
+ sAddress->setEnabled( false );
+ sEMail->setEnabled( false );
tabWidget->addTab( search, "&Search" );
@@ -199,7 +199,7 @@ void ABCentralWidget::setupListView()
connect( listView, TQ_SIGNAL( clicked( TQListViewItem* ) ), this, TQ_SLOT( itemSelected( TQListViewItem* ) ) );
mainGrid->addWidget( listView, 1, 0 );
- listView->setAllColumnsShowFocus( TRUE );
+ listView->setAllColumnsShowFocus( true );
}
void ABCentralWidget::addEntry()
@@ -245,7 +245,7 @@ void ABCentralWidget::itemSelected( TQListViewItem *item )
{
if ( !item )
return;
- item->setSelected( TRUE );
+ item->setSelected( true );
item->repaint();
iFirstName->setText( item->text( 0 ) );
@@ -259,11 +259,11 @@ void ABCentralWidget::toggleFirstName()
sFirstName->setText( "" );
if ( cFirstName->isChecked() ) {
- sFirstName->setEnabled( TRUE );
+ sFirstName->setEnabled( true );
sFirstName->setFocus();
}
else
- sFirstName->setEnabled( FALSE );
+ sFirstName->setEnabled( false );
}
void ABCentralWidget::toggleLastName()
@@ -271,11 +271,11 @@ void ABCentralWidget::toggleLastName()
sLastName->setText( "" );
if ( cLastName->isChecked() ) {
- sLastName->setEnabled( TRUE );
+ sLastName->setEnabled( true );
sLastName->setFocus();
}
else
- sLastName->setEnabled( FALSE );
+ sLastName->setEnabled( false );
}
void ABCentralWidget::toggleAddress()
@@ -283,11 +283,11 @@ void ABCentralWidget::toggleAddress()
sAddress->setText( "" );
if ( cAddress->isChecked() ) {
- sAddress->setEnabled( TRUE );
+ sAddress->setEnabled( true );
sAddress->setFocus();
}
else
- sAddress->setEnabled( FALSE );
+ sAddress->setEnabled( false );
}
void ABCentralWidget::toggleEMail()
@@ -295,11 +295,11 @@ void ABCentralWidget::toggleEMail()
sEMail->setText( "" );
if ( cEMail->isChecked() ) {
- sEMail->setEnabled( TRUE );
+ sEMail->setEnabled( true );
sEMail->setFocus();
}
else
- sEMail->setEnabled( FALSE );
+ sEMail->setEnabled( false );
}
void ABCentralWidget::findEntries()
@@ -315,37 +315,37 @@ void ABCentralWidget::findEntries()
TQListViewItemIterator it( listView );
for ( ; it.current(); ++it ) {
- bool select = TRUE;
+ bool select = true;
if ( cFirstName->isChecked() ) {
if ( select && it.current()->text( 0 ).contains( sFirstName->text() ) )
- select = TRUE;
+ select = true;
else
- select = FALSE;
+ select = false;
}
if ( cLastName->isChecked() ) {
if ( select && it.current()->text( 1 ).contains( sLastName->text() ) )
- select = TRUE;
+ select = true;
else
- select = FALSE;
+ select = false;
}
if ( cAddress->isChecked() ) {
if ( select && it.current()->text( 2 ).contains( sAddress->text() ) )
- select = TRUE;
+ select = true;
else
- select = FALSE;
+ select = false;
}
if ( cEMail->isChecked() ) {
if ( select && it.current()->text( 3 ).contains( sEMail->text() ) )
- select = TRUE;
+ select = true;
else
- select = FALSE;
+ select = false;
}
if ( select )
- it.current()->setSelected( TRUE );
+ it.current()->setSelected( true );
else
- it.current()->setSelected( FALSE );
+ it.current()->setSelected( false );
it.current()->repaint();
}
}
diff --git a/examples/application/application.cpp b/examples/application/application.cpp
index 455bcc425..245ed4ea9 100644
--- a/examples/application/application.cpp
+++ b/examples/application/application.cpp
@@ -166,7 +166,7 @@ void ApplicationWindow::load( const TQString &fileName )
TQTextStream ts( &f );
e->setText( ts.read() );
- e->setModified( FALSE );
+ e->setModified( false );
setCaption( fileName );
statusBar()->message( "Loaded document " + fileName, 2000 );
}
@@ -191,7 +191,7 @@ void ApplicationWindow::save()
t << text;
f.close();
- e->setModified( FALSE );
+ e->setModified( false );
setCaption( filename );
@@ -214,7 +214,7 @@ void ApplicationWindow::saveAs()
void ApplicationWindow::print()
{
- printer->setFullPage( TRUE );
+ printer->setFullPage( true );
if ( printer->setup(this) ) { // printer dialog
statusBar()->message( "Printing..." );
TQPainter p;
@@ -245,7 +245,7 @@ void ApplicationWindow::print()
break;
printer->newPage();
page++;
- } while (TRUE);
+ } while (true);
statusBar()->message( "Printing completed", 2000 );
} else {
diff --git a/examples/biff/biff.cpp b/examples/biff/biff.cpp
index 4bc592d0a..50f4eb636 100644
--- a/examples/biff/biff.cpp
+++ b/examples/biff/biff.cpp
@@ -40,7 +40,7 @@ Biff::Biff( TQWidget *parent, const char *name )
hasNewMail.loadFromData( hasmail_bmp_data, hasmail_bmp_len );
noNewMail.loadFromData( nomail_bmp_data, nomail_bmp_len );
- gotMail = FALSE;
+ gotMail = false;
lastModified = fi.lastModified();
}
@@ -54,7 +54,7 @@ void Biff::timerEvent( TQTimerEvent * )
if ( gotMail )
lastModified = fi.lastModified();
gotMail = newState;
- repaint( FALSE );
+ repaint( false );
}
}
diff --git a/examples/buttongroups/buttongroups.cpp b/examples/buttongroups/buttongroups.cpp
index 2ae71486b..a33a69b4a 100644
--- a/examples/buttongroups/buttongroups.cpp
+++ b/examples/buttongroups/buttongroups.cpp
@@ -36,11 +36,11 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name )
// Create an exclusive button group
TQButtonGroup *bgrp1 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 1 (exclusive)", this);
box1->addWidget( bgrp1 );
- bgrp1->setExclusive( TRUE );
+ bgrp1->setExclusive( true );
// insert 3 radiobuttons
TQRadioButton *rb11 = new TQRadioButton( "&Radiobutton 1", bgrp1 );
- rb11->setChecked( TRUE );
+ rb11->setChecked( true );
(void)new TQRadioButton( "R&adiobutton 2", bgrp1 );
(void)new TQRadioButton( "Ra&diobutton 3", bgrp1 );
@@ -49,32 +49,32 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name )
// Create a non-exclusive buttongroup
TQButtonGroup *bgrp2 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 2 (non-exclusive)", this );
box1->addWidget( bgrp2 );
- bgrp2->setExclusive( FALSE );
+ bgrp2->setExclusive( false );
// insert 3 checkboxes
(void)new TQCheckBox( "&Checkbox 1", bgrp2 );
TQCheckBox *cb12 = new TQCheckBox( "C&heckbox 2", bgrp2 );
- cb12->setChecked( TRUE );
+ cb12->setChecked( true );
TQCheckBox *cb13 = new TQCheckBox( "Triple &State Button", bgrp2 );
- cb13->setTristate( TRUE );
- cb13->setChecked( TRUE );
+ cb13->setTristate( true );
+ cb13->setChecked( true );
// ------------ third group
// create a buttongroup which is exclusive for radiobuttons and non-exclusive for all other buttons
TQButtonGroup *bgrp3 = new TQButtonGroup( 1, TQGroupBox::Horizontal, "Button Group 3 (Radiobutton-exclusive)", this );
box2->addWidget( bgrp3 );
- bgrp3->setRadioButtonExclusive( TRUE );
+ bgrp3->setRadioButtonExclusive( true );
// insert three radiobuttons
rb21 = new TQRadioButton( "Rad&iobutton 1", bgrp3 );
rb22 = new TQRadioButton( "Radi&obutton 2", bgrp3 );
rb23 = new TQRadioButton( "Radio&button 3", bgrp3 );
- rb23->setChecked( TRUE );
+ rb23->setChecked( true );
// insert a checkbox...
state = new TQCheckBox( "E&nable Radiobuttons", bgrp3 );
- state->setChecked( TRUE );
+ state->setChecked( true );
// ...and connect its TQ_SIGNAL clicked() with the TQ_SLOT slotChangeGrp3State()
connect( state, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotChangeGrp3State() ) );
@@ -89,12 +89,12 @@ ButtonsGroups::ButtonsGroups( TQWidget *parent, const char *name )
// now make the second one a toggle button
TQPushButton *tb2 = new TQPushButton( "&Toggle Button", bgrp4, "toggle" );
- tb2->setToggleButton( TRUE );
- tb2->setOn( TRUE );
+ tb2->setToggleButton( true );
+ tb2->setOn( true );
// ... and make the third one a flat button
TQPushButton *tb3 = new TQPushButton( "&Flat Button", bgrp4, "flat" );
- tb3->setFlat(TRUE);
+ tb3->setFlat(true);
// .. and the fourth a button with a menu
TQPushButton *tb4 = new TQPushButton( "Popup Button", bgrp4, "popup" );
diff --git a/examples/canvas/blendshadow.cpp b/examples/canvas/blendshadow.cpp
index d2f761db0..ce635de04 100644
--- a/examples/canvas/blendshadow.cpp
+++ b/examples/canvas/blendshadow.cpp
@@ -38,7 +38,7 @@ int main( int*, char**)
int h = image.height();
TQImage img( w+dx, h+dy, 32 );
- img.setAlphaBuffer( TRUE );
+ img.setAlphaBuffer( true );
for ( int y = 0; y < h+dy; y++ ) {
for ( int x = 0; x < w+dx; x++ ) {
diff --git a/examples/canvas/canvas.cpp b/examples/canvas/canvas.cpp
index bd6589490..5c125d160 100644
--- a/examples/canvas/canvas.cpp
+++ b/examples/canvas/canvas.cpp
@@ -77,7 +77,7 @@ bool ImageItem::hit( const TQPoint &p ) const
int ix = p.x()-int(x());
int iy = p.y()-int(y());
if ( !image.valid( ix , iy ) )
- return FALSE;
+ return false;
TQRgb pixel = image.pixel( ix, iy );
return tqAlpha( pixel ) != 0;
}
@@ -213,7 +213,7 @@ BouncyLogo::BouncyLogo(TQCanvas* canvas) :
}
bouncyLogoCount++;
setSequence(logoarr);
- setAnimated(TRUE);
+ setAnimated(true);
initPos();
}
@@ -270,7 +270,7 @@ void BouncyLogo::advance(int stage)
vy = -vy;
for (int bounce=0; bounce<4; bounce++) {
- TQCanvasItemList l=collisions(FALSE);
+ TQCanvasItemList l=collisions(false);
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
TQCanvasItem *hit = *it;
if ( hit->rtti()==logo_rtti && hit->collidesWith(this) ) {
@@ -362,14 +362,14 @@ Main::Main(TQCanvas& c, TQWidget* parent, const char* name, WFlags f) :
options = new TQPopupMenu( menu );
dbf_id = options->insertItem("Double buffer", this, TQ_SLOT(toggleDoubleBuffer()));
- options->setItemChecked(dbf_id, TRUE);
+ options->setItemChecked(dbf_id, true);
menu->insertItem("&Options",options);
menu->insertSeparator();
TQPopupMenu* help = new TQPopupMenu( menu );
help->insertItem("&About", this, TQ_SLOT(help()), Key_F1);
- help->setItemChecked(dbf_id, TRUE);
+ help->setItemChecked(dbf_id, true);
menu->insertItem("&Help",help);
statusBar();
@@ -441,7 +441,7 @@ void Main::help()
"<li> Press ALT-L for some lines."
"<li> Drag the objects around."
"<li> Read the code!"
- "</ul>", TQMessageBox::Information, 1, 0, 0, this, 0, FALSE );
+ "</ul>", TQMessageBox::Information, 1, 0, 0, this, 0, false );
about->setButtonText( 1, "Dismiss" );
about->show();
}
@@ -536,7 +536,7 @@ void Main::print()
if ( !printer ) printer = new TQPrinter;
if ( printer->setup(this) ) {
TQPainter pp(printer);
- canvas.drawArea(TQRect(0,0,canvas.width(),canvas.height()),&pp,FALSE);
+ canvas.drawArea(TQRect(0,0,canvas.width(),canvas.height()),&pp,false);
}
}
@@ -703,7 +703,7 @@ void Main::addMesh()
#ifndef TQT_NO_PROGRESSDIALOG
TQProgressDialog progress( "Creating mesh...", "Abort", rows,
- this, "progress", TRUE );
+ this, "progress", true );
#endif
TQMemArray<NodeItem*> lastRow(cols);
diff --git a/examples/canvas/makeimg.cpp b/examples/canvas/makeimg.cpp
index d8c4c1928..9640161e3 100644
--- a/examples/canvas/makeimg.cpp
+++ b/examples/canvas/makeimg.cpp
@@ -35,7 +35,7 @@ int main( int*, char**)
img = new TQImage( "in.png" );
int w,h;
int y;
- img->setAlphaBuffer( TRUE );
+ img->setAlphaBuffer( true );
*img = img->convertDepth( 32 );
w = img->width();
h = img->height();
@@ -72,7 +72,7 @@ int main( int*, char**)
h = img->height();
TQImage *img2 = new TQImage( w, h, 32 );
- img2->setAlphaBuffer( TRUE );
+ img2->setAlphaBuffer( true );
for ( y = 0; y < h; y++ ) {
for ( int x = 0; x < w; x++ ) {
TQRgb shader = img->pixel( x, y );
diff --git a/examples/chart/canvasview.cpp b/examples/chart/canvasview.cpp
index 7fe852def..ecec56982 100644
--- a/examples/chart/canvasview.cpp
+++ b/examples/chart/canvasview.cpp
@@ -40,7 +40,7 @@ void CanvasView::contentsMouseMoveEvent( TQMouseEvent *e )
m_movingItem->moveBy( offset.x(), offset.y() );
m_pos = e->pos();
ChartForm *form = (ChartForm*)parent();
- form->setChanged( TRUE );
+ form->setChanged( true );
int chartType = form->chartType();
CanvasText *item = (CanvasText*)m_movingItem;
int i = item->index();
diff --git a/examples/chart/chartform.cpp b/examples/chart/chartform.cpp
index 483003754..16a6848d4 100644
--- a/examples/chart/chartform.cpp
+++ b/examples/chart/chartform.cpp
@@ -95,23 +95,23 @@ ChartForm::ChartForm( const TQString& filename )
TQActionGroup *chartGroup = new TQActionGroup( this ); // Connected later
- chartGroup->setExclusive( TRUE );
+ chartGroup->setExclusive( true );
optionsPieChartAction = new TQAction(
"Pie Chart", TQPixmap( options_piechart ),
"&Pie Chart", CTRL+Key_I, chartGroup, "pie chart" );
- optionsPieChartAction->setToggleAction( TRUE );
+ optionsPieChartAction->setToggleAction( true );
optionsHorizontalBarChartAction = new TQAction(
"Horizontal Bar Chart", TQPixmap( options_horizontalbarchart ),
"&Horizontal Bar Chart", CTRL+Key_H, chartGroup,
"horizontal bar chart" );
- optionsHorizontalBarChartAction->setToggleAction( TRUE );
+ optionsHorizontalBarChartAction->setToggleAction( true );
optionsVerticalBarChartAction = new TQAction(
"Vertical Bar Chart", TQPixmap( options_verticalbarchart ),
"&Vertical Bar Chart", CTRL+Key_V, chartGroup, "Vertical bar chart" );
- optionsVerticalBarChartAction->setToggleAction( TRUE );
+ optionsVerticalBarChartAction->setToggleAction( true );
optionsSetFontAction = new TQAction(
@@ -252,7 +252,7 @@ void ChartForm::init()
{
setCaption( "Chart" );
m_filename = TQString::null;
- m_changed = FALSE;
+ m_changed = false;
m_elements[0] = Element( Element::INVALID, red );
m_elements[1] = Element( Element::INVALID, cyan );
@@ -392,13 +392,13 @@ bool ChartForm::okToClear()
break;
case 1: // Cancel
default:
- return FALSE;
+ return false;
case 2: // Abandon
break;
}
}
- return TRUE;
+ return true;
}
@@ -424,7 +424,7 @@ void ChartForm::optionsSetData()
{
SetDataForm *setDataForm = new SetDataForm( &m_elements, m_decimalPlaces, this );
if ( setDataForm->exec() ) {
- m_changed = TRUE;
+ m_changed = true;
drawElements();
}
delete setDataForm;
@@ -436,13 +436,13 @@ void ChartForm::setChartType( ChartType chartType )
m_chartType = chartType;
switch ( m_chartType ) {
case PIE:
- optionsPieChartAction->setOn( TRUE );
+ optionsPieChartAction->setOn( true );
break;
case VERTICAL_BAR:
- optionsVerticalBarChartAction->setOn( TRUE );
+ optionsVerticalBarChartAction->setOn( true );
break;
case HORIZONTAL_BAR:
- optionsHorizontalBarChartAction->setOn( TRUE );
+ optionsHorizontalBarChartAction->setOn( true );
break;
}
}
@@ -482,13 +482,13 @@ void ChartForm::optionsSetOptions()
optionsForm->setFont( m_font );
switch ( m_addValues ) {
case NO:
- optionsForm->noRadioButton->setChecked( TRUE );
+ optionsForm->noRadioButton->setChecked( true );
break;
case YES:
- optionsForm->yesRadioButton->setChecked( TRUE );
+ optionsForm->yesRadioButton->setChecked( true );
break;
case AS_PERCENTAGE:
- optionsForm->asPercentageRadioButton->setChecked( TRUE );
+ optionsForm->asPercentageRadioButton->setChecked( true );
break;
}
optionsForm->decimalPlacesSpinBox->setValue( m_decimalPlaces );
diff --git a/examples/chart/chartform.h b/examples/chart/chartform.h
index 926bd69be..b843a8ac5 100644
--- a/examples/chart/chartform.h
+++ b/examples/chart/chartform.h
@@ -29,7 +29,7 @@ public:
~ChartForm();
int chartType() { return m_chartType; }
- void setChanged( bool changed = TRUE ) { m_changed = changed; }
+ void setChanged( bool changed = true ) { m_changed = changed; }
void drawElements();
TQPopupMenu *optionsMenu; // Why public? See canvasview.cpp
diff --git a/examples/chart/chartform_files.cpp b/examples/chart/chartform_files.cpp
index b9a5c4f17..27a9427c2 100644
--- a/examples/chart/chartform_files.cpp
+++ b/examples/chart/chartform_files.cpp
@@ -52,7 +52,7 @@ void ChartForm::load( const TQString& filename )
updateRecentFiles( filename );
drawElements();
- m_changed = FALSE;
+ m_changed = false;
}
@@ -78,7 +78,7 @@ void ChartForm::fileSave()
setCaption( TQString( "Chart -- %1" ).arg( m_filename ) );
statusBar()->message( TQString( "Saved \'%1\'" ).arg( m_filename ), 2000 );
- m_changed = FALSE;
+ m_changed = false;
}
@@ -104,7 +104,7 @@ void ChartForm::filePrint()
if ( m_printer->setup() ) {
TQPainter painter( m_printer );
m_canvas->drawArea( TQRect( 0, 0, m_canvas->width(), m_canvas->height() ),
- &painter, FALSE );
+ &painter, false );
if ( !m_printer->outputFileName().isEmpty() )
statusBar()->message( TQString( "Printed \'%1\'" ).
arg( m_printer->outputFileName() ), 2000 );
diff --git a/examples/chart/optionsform.cpp b/examples/chart/optionsform.cpp
index 543783c30..c236c767c 100644
--- a/examples/chart/optionsform.cpp
+++ b/examples/chart/optionsform.cpp
@@ -30,7 +30,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
chartTypeTextLabel = new TQLabel( "&Chart Type", this );
chartTypeLayout->addWidget( chartTypeTextLabel );
- chartTypeComboBox = new TQComboBox( FALSE, this );
+ chartTypeComboBox = new TQComboBox( false, this );
chartTypeComboBox->insertItem( TQPixmap( options_piechart ), "Pie Chart" );
chartTypeComboBox->insertItem( TQPixmap( options_verticalbarchart ),
"Vertical Bar Chart" );
@@ -66,7 +66,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
addValuesButtonGroupLayout->setAlignment( TQt::AlignTop );
noRadioButton = new TQRadioButton( "&No", addValuesButtonGroup );
- noRadioButton->setChecked( TRUE );
+ noRadioButton->setChecked( true );
addValuesButtonGroupLayout->addWidget( noRadioButton );
yesRadioButton = new TQRadioButton( "&Yes", addValuesButtonGroup );
@@ -97,7 +97,7 @@ OptionsForm::OptionsForm( TQWidget* parent, const char* name,
buttonsLayout->addItem( spacer );
okPushButton = new TQPushButton( "OK", this );
- okPushButton->setDefault( TRUE );
+ okPushButton->setDefault( true );
buttonsLayout->addWidget( okPushButton );
cancelPushButton = new TQPushButton( "Cancel", this );
diff --git a/examples/chart/optionsform.h b/examples/chart/optionsform.h
index 8277ad376..bf747418a 100644
--- a/examples/chart/optionsform.h
+++ b/examples/chart/optionsform.h
@@ -20,7 +20,7 @@ class OptionsForm : public TQDialog
TQ_OBJECT
public:
OptionsForm( TQWidget* parent = 0, const char* name = "options form",
- bool modal = FALSE, WFlags f = 0 );
+ bool modal = false, WFlags f = 0 );
~OptionsForm() {}
TQFont font() const { return m_font; }
diff --git a/examples/chart/setdataform.cpp b/examples/chart/setdataform.cpp
index 7de1e2b06..09dc1e3cd 100644
--- a/examples/chart/setdataform.cpp
+++ b/examples/chart/setdataform.cpp
@@ -43,9 +43,9 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,
table = new TQTable( this, "data table" );
table->setNumCols( 5 );
table->setNumRows( ChartForm::MAX_ELEMENTS );
- table->setColumnReadOnly( 1, TRUE );
- table->setColumnReadOnly( 2, TRUE );
- table->setColumnReadOnly( 4, TRUE );
+ table->setColumnReadOnly( 1, true );
+ table->setColumnReadOnly( 2, true );
+ table->setColumnReadOnly( 4, true );
table->setColumnWidth( 0, 80 );
table->setColumnWidth( 1, 60 ); // Columns 1 and 4 must be equal
table->setColumnWidth( 2, 60 );
@@ -63,7 +63,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,
colorPushButton = new TQPushButton( this, "color button" );
colorPushButton->setText( "&Color..." );
- colorPushButton->setEnabled( FALSE );
+ colorPushButton->setEnabled( false );
buttonBox->addWidget( colorPushButton );
TQSpacerItem *spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
@@ -72,7 +72,7 @@ SetDataForm::SetDataForm( ElementVector *elements, int decimalPlaces,
okPushButton = new TQPushButton( this, "ok button" );
okPushButton->setText( "OK" );
- okPushButton->setDefault( TRUE );
+ okPushButton->setDefault( true );
buttonBox->addWidget( okPushButton );
cancelPushButton = new TQPushButton( this, "cancel button" );
diff --git a/examples/chart/setdataform.h b/examples/chart/setdataform.h
index 7759f6158..760df4561 100644
--- a/examples/chart/setdataform.h
+++ b/examples/chart/setdataform.h
@@ -17,7 +17,7 @@ class SetDataForm: public TQDialog
public:
SetDataForm( ElementVector *elements, int decimalPlaces,
TQWidget *parent = 0, const char *name = "set data form",
- bool modal = TRUE, WFlags f = 0 );
+ bool modal = true, WFlags f = 0 );
~SetDataForm() {}
public slots:
diff --git a/examples/checklists/checklists.cpp b/examples/checklists/checklists.cpp
index a75043ed4..116196981 100644
--- a/examples/checklists/checklists.cpp
+++ b/examples/checklists/checklists.cpp
@@ -40,7 +40,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name )
lv1 = new TQListView( this );
vbox1->addWidget( lv1 );
lv1->addColumn( "Items" );
- lv1->setRootIsDecorated( TRUE );
+ lv1->setRootIsDecorated( true );
// create a list with 4 ListViewItems which will be parent items of other ListViewItems
TQValueList<TQListViewItem *> parentList;
@@ -54,7 +54,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name )
unsigned int num = 1;
// go through the list of parent items...
for ( TQValueList<TQListViewItem*>::Iterator it = parentList.begin(); it != parentList.end();
- ( *it )->setOpen( TRUE ), ++it, num++ ) {
+ ( *it )->setOpen( true ), ++it, num++ ) {
item = *it;
// ...and create 5 checkable child ListViewItems for each parent item
for ( unsigned int i = 1; i <= 5; i++ )
@@ -83,7 +83,7 @@ CheckLists::CheckLists( TQWidget *parent, const char *name )
lv2 = new TQListView( this );
vbox2->addWidget( lv2 );
lv2->addColumn( "Items" );
- lv2->setRootIsDecorated( TRUE );
+ lv2->setRootIsDecorated( true );
// another widget needed for layouting only
tmp = new TQVBoxLayout( lay );
@@ -121,7 +121,7 @@ void CheckLists::copy1to2()
// Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
// are inserted into a Listview, the parent item of these MUST be a controller Item!
TQCheckListItem *item = new TQCheckListItem( lv2, "Controller", TQCheckListItem::Controller );
- item->setOpen( TRUE );
+ item->setOpen( true );
// iterate through the first ListView...
for ( ; it.current(); ++it )
@@ -133,7 +133,7 @@ void CheckLists::copy1to2()
(void)new TQCheckListItem( item, it.current()->text( 0 ), TQCheckListItem::RadioButton );
if ( item->firstChild() )
- ( ( TQCheckListItem* )item->firstChild() )->setOn( TRUE );
+ ( ( TQCheckListItem* )item->firstChild() )->setOn( true );
}
/*
diff --git a/examples/cursor/cursor.cpp b/examples/cursor/cursor.cpp
index 77e77ad77..f15ebc6d9 100644
--- a/examples/cursor/cursor.cpp
+++ b/examples/cursor/cursor.cpp
@@ -118,8 +118,8 @@ CursorView::CursorView() // construct view
- TQBitmap cb( cb_width, cb_height, cb_bits, TRUE );
- TQBitmap cm( cm_width, cm_height, cm_bits, TRUE );
+ TQBitmap cb( cb_width, cb_height, cb_bits, true );
+ TQBitmap cm( cm_width, cm_height, cm_bits, true );
TQCursor custom( cb, cm ); // create bitmap cursor
label = new TQLabel( this ); // create the big label
diff --git a/examples/customlayout/border.cpp b/examples/customlayout/border.cpp
index 533b3b635..9e08c41c0 100644
--- a/examples/customlayout/border.cpp
+++ b/examples/customlayout/border.cpp
@@ -92,13 +92,13 @@ void BorderLayout::addWidget( TQWidget *widget, Position pos )
void BorderLayout::add( TQLayoutItem *item, Position pos )
{
list.append( new BorderLayoutStruct( item, pos ) );
- sizeDirty = TRUE; msizeDirty = TRUE;
+ sizeDirty = true; msizeDirty = true;
calcSize( SizeHint ); calcSize( Minimum );
}
bool BorderLayout::hasHeightForWidth() const
{
- return FALSE;
+ return false;
}
TQSize BorderLayout::sizeHint() const
@@ -215,10 +215,10 @@ void BorderLayout::calcSize( SizeType st )
}
if ( st == Minimum ) {
- msizeDirty = FALSE;
+ msizeDirty = false;
mcached = TQSize( w, h );
} else {
- sizeDirty = FALSE;
+ sizeDirty = false;
cached = TQSize( w, h );
}
diff --git a/examples/customlayout/border.h b/examples/customlayout/border.h
index 98788aa61..05d62d9e3 100644
--- a/examples/customlayout/border.h
+++ b/examples/customlayout/border.h
@@ -59,17 +59,17 @@ public:
BorderLayout( TQWidget *parent, int border = 0, int autoBorder = -1,
const char *name = 0 )
: TQLayout( parent, border, autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ),
- sizeDirty( TRUE ), msizeDirty( TRUE )
+ sizeDirty( true ), msizeDirty( true )
{}
BorderLayout( TQLayout* parent, int autoBorder = -1, const char *name = 0 )
: TQLayout( parent, autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ),
- sizeDirty( TRUE ), msizeDirty( TRUE )
+ sizeDirty( true ), msizeDirty( true )
{}
BorderLayout( int autoBorder = -1, const char *name = 0 )
: TQLayout( autoBorder, name ), cached( 0, 0 ), mcached( 0, 0 ),
- sizeDirty( TRUE ), msizeDirty( TRUE )
+ sizeDirty( true ), msizeDirty( true )
{}
~BorderLayout();
@@ -92,7 +92,7 @@ protected:
void setGeometry( const TQRect &rect );
private:
- void doLayout( const TQRect &rect, bool testonly = FALSE );
+ void doLayout( const TQRect &rect, bool testonly = false );
void calcSize( SizeType st );
TQPtrList<BorderLayoutStruct> list;
diff --git a/examples/customlayout/flow.cpp b/examples/customlayout/flow.cpp
index af1fdf5fe..9b5e5bc4d 100644
--- a/examples/customlayout/flow.cpp
+++ b/examples/customlayout/flow.cpp
@@ -57,7 +57,7 @@ int SimpleFlow::heightForWidth( int w ) const
if ( cached_width != w ) {
//Not all C++ compilers support "mutable" yet:
SimpleFlow * mthis = (SimpleFlow*)this;
- int h = mthis->doLayout( TQRect(0,0,w,0), TRUE );
+ int h = mthis->doLayout( TQRect(0,0,w,0), true );
mthis->cached_hfw = h;
mthis->cached_width = w;
return h;
@@ -72,7 +72,7 @@ void SimpleFlow::addItem( TQLayoutItem *item)
bool SimpleFlow::hasHeightForWidth() const
{
- return TRUE;
+ return true;
}
TQSize SimpleFlow::sizeHint() const
diff --git a/examples/customlayout/flow.h b/examples/customlayout/flow.h
index 5b5421cdf..f0bdde821 100644
--- a/examples/customlayout/flow.h
+++ b/examples/customlayout/flow.h
@@ -45,7 +45,7 @@ protected:
void setGeometry( const TQRect& );
private:
- int doLayout( const TQRect&, bool testonly = FALSE );
+ int doLayout( const TQRect&, bool testonly = false );
TQPtrList<TQLayoutItem> list;
int cached_width;
int cached_hfw;
diff --git a/examples/dclock/dclock.cpp b/examples/dclock/dclock.cpp
index 8de9352d6..7e395a994 100644
--- a/examples/dclock/dclock.cpp
+++ b/examples/dclock/dclock.cpp
@@ -18,7 +18,7 @@
DigitalClock::DigitalClock( TQWidget *parent, const char *name )
: TQLCDNumber( parent, name )
{
- showingColon = FALSE;
+ showingColon = false;
setFrameStyle( TQFrame::Panel | TQFrame::Raised );
setLineWidth( 2 ); // set frame line width
showTime(); // display the current time
diff --git a/examples/demo/display.cpp b/examples/demo/display.cpp
index 7cc6a44af..aab99598a 100644
--- a/examples/demo/display.cpp
+++ b/examples/demo/display.cpp
@@ -156,7 +156,7 @@ DisplayWidget::DisplayWidget( TQWidget *parent, const char *name )
TQHBoxLayout *hbox = new TQHBoxLayout( vbox );
screen = new Screen( this );
dial = new TQDial( this );
- dial->setNotchesVisible( TRUE );
+ dial->setNotchesVisible( true );
dial->setRange( -10, 10 );
dial->setValue( 1 );
screen->setStep( dial->value() );
diff --git a/examples/demo/dnd/dnd.cpp b/examples/demo/dnd/dnd.cpp
index f03c918df..7fbac7b9d 100644
--- a/examples/demo/dnd/dnd.cpp
+++ b/examples/demo/dnd/dnd.cpp
@@ -91,7 +91,7 @@ DnDDemo::DnDDemo( TQWidget* parent, const char* name )
IconItem item = it.data();
TQIconViewItem *iitem = new IconViewItem( iconView, item.name(), *item.pixmap(), it.key() );
- iitem->setRenameEnabled( TRUE );
+ iitem->setRenameEnabled( true );
TQListViewItem *litem = new ListViewItem( listView, item.name(), it.key() );
litem->setPixmap( 0, *item.pixmap() );
}
diff --git a/examples/demo/dnd/iconview.cpp b/examples/demo/dnd/iconview.cpp
index 89cac969a..16269ce5c 100644
--- a/examples/demo/dnd/iconview.cpp
+++ b/examples/demo/dnd/iconview.cpp
@@ -36,7 +36,7 @@ void IconView::slotNewItem( TQDropEvent *e, const TQValueList<TQIconDragItem>& )
if ( TQTextDrag::decode( e, tag ) ) {
IconItem item = ((DnDDemo*) parentWidget())->findItem( tag );
IconViewItem *iitem = new IconViewItem( this, item.name(), *item.pixmap(), tag );
- iitem->setRenameEnabled( TRUE );
+ iitem->setRenameEnabled( true );
}
e->acceptAction();
}
diff --git a/examples/demo/dnd/listview.cpp b/examples/demo/dnd/listview.cpp
index 0cb86d2c4..836d04453 100644
--- a/examples/demo/dnd/listview.cpp
+++ b/examples/demo/dnd/listview.cpp
@@ -6,9 +6,9 @@
ListView::ListView( TQWidget* parent, const char* name )
: TQListView( parent, name )
{
- setAcceptDrops( TRUE );
- setSorting( -1, FALSE );
- dragging = FALSE;
+ setAcceptDrops( true );
+ setSorting( -1, false );
+ dragging = false;
}
ListView::~ListView()
@@ -40,7 +40,7 @@ void ListView::dropEvent( TQDropEvent *e )
void ListView::contentsMousePressEvent( TQMouseEvent *e )
{
TQListView::contentsMousePressEvent( e );
- dragging = TRUE;
+ dragging = true;
pressPos = e->pos();
}
@@ -60,13 +60,13 @@ void ListView::contentsMouseMoveEvent( TQMouseEvent *e )
drg->setPixmap(*p);
drg->setSubtype( "dragdemotag" );
drg->dragCopy();
- dragging = FALSE;
+ dragging = false;
}
}
void ListView::contentsMouseReleaseEvent( TQMouseEvent *e )
{
TQListView::contentsMouseReleaseEvent( e );
- dragging = FALSE;
+ dragging = false;
}
diff --git a/examples/demo/dnd/styledbutton.cpp b/examples/demo/dnd/styledbutton.cpp
index 690a1054a..d87109708 100644
--- a/examples/demo/dnd/styledbutton.cpp
+++ b/examples/demo/dnd/styledbutton.cpp
@@ -44,10 +44,10 @@
#include <ntqstyle.h>
StyledButton::StyledButton(TQWidget* parent, const char* name)
- : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( FALSE )
+ : TQButton( parent, name ), pix( 0 ), spix( 0 ), edit( ColorEditor ), s( 0 ), mousePressed( false )
{
setMinimumSize( minimumSizeHint() );
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor()));
}
@@ -222,7 +222,7 @@ void StyledButton::onEditor()
void StyledButton::mousePressEvent(TQMouseEvent* e)
{
TQButton::mousePressEvent(e);
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -241,7 +241,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
else if ( edit == PixmapEditor && pix && !pix->isNull() ) {
@@ -249,7 +249,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
TQImageDrag *drg = new TQImageDrag( img, this );
if(spix)
drg->setPixmap( *spix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
}
diff --git a/examples/demo/frame.cpp b/examples/demo/frame.cpp
index a263b8b1a..d9ab42dd9 100644
--- a/examples/demo/frame.cpp
+++ b/examples/demo/frame.cpp
@@ -38,16 +38,16 @@ Frame::Frame( TQWidget *parent, const char *name )
TQAccel::stringToKey( tr( "Ctrl+Q" ) ) );
TQPopupMenu *styleMenu = new TQPopupMenu( this, "style" );
- styleMenu->setCheckable( TRUE );
+ styleMenu->setCheckable( true );
TQActionGroup *ag = new TQActionGroup( this, 0 );
- ag->setExclusive( TRUE );
+ ag->setExclusive( true );
TQSignalMapper *styleMapper = new TQSignalMapper( this );
connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ),
this, TQ_SLOT( setStyle( const TQString& ) ) );
TQStringList list = TQStyleFactory::keys();
list.sort();
- TQDict<int> stylesDict( 17, FALSE );
+ TQDict<int> stylesDict( 17, false );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
TQString style = *it;
TQString styleAccel = style;
@@ -82,11 +82,11 @@ void Frame::setCategories( const TQPtrList<CategoryInterface> &l )
{
categories = l;
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
- dw->setVerticalStretchable( TRUE );
+ dw->setResizeEnabled( true );
+ dw->setVerticalStretchable( true );
addDockWindow( dw, DockLeft );
- setDockEnabled( dw, DockTop, FALSE );
- setDockEnabled( dw, DockBottom, FALSE );
+ setDockEnabled( dw, DockTop, false );
+ setDockEnabled( dw, DockBottom, false );
dw->setCloseMode( TQDockWindow::Always );
toolBox = new TQToolBox( dw );
@@ -113,9 +113,9 @@ TQWidget *Frame::createCategoryPage( CategoryInterface *c )
b->setBackgroundMode(PaletteBase);
b->setTextLabel( c->categoryName( i ) );
b->setIconSet( c->categoryIcon( i ) );
- b->setAutoRaise( TRUE );
+ b->setAutoRaise( true );
b->setTextPosition( TQToolButton::Right );
- b->setUsesTextLabel( TRUE );
+ b->setUsesTextLabel( true );
g->insert( b, i + c->categoryOffset() );
connect( g, TQ_SIGNAL( clicked( int ) ), c, TQ_SLOT( setCurrentCategory( int ) ) );
}
diff --git a/examples/demo/graph.cpp b/examples/demo/graph.cpp
index 257609f13..4632f71b8 100644
--- a/examples/demo/graph.cpp
+++ b/examples/demo/graph.cpp
@@ -259,7 +259,7 @@ public:
BouncyText::BouncyText( const TQString& text, TQFont f, TQCanvas* canvas) :
TQCanvasText(text, f, canvas)
{
- setAnimated(TRUE);
+ setAnimated(true);
initPos();
}
@@ -421,7 +421,7 @@ void FigureEditor::initialize()
NodeItem *prev = 0;
for ( int c = 0; c < cols; c++ ) {
NodeItem *ni = new NodeItem( graph );
- ni->setAnimated( TRUE );
+ ni->setAnimated( true );
nodecount++;
ni->move(rand()%(graph->canvas->width()-ni->width()),rand()%(graph->canvas->height()-ni->height()));
diff --git a/examples/demo/i18n/i18n.cpp b/examples/demo/i18n/i18n.cpp
index 4458e18bd..e86696066 100644
--- a/examples/demo/i18n/i18n.cpp
+++ b/examples/demo/i18n/i18n.cpp
@@ -19,7 +19,7 @@
static int windowIdNumber = 5000;
-static bool firstShow = TRUE;
+static bool firstShow = true;
I18nDemo::I18nDemo(TQWidget *parent, const char *name)
@@ -88,7 +88,7 @@ void I18nDemo::initMenuBar()
windowMenu = new TQPopupMenu(this);
connect(windowMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(windowSlot(int)));
- windowMenu->setCheckable(TRUE);
+ windowMenu->setCheckable(true);
actionClose->addTo(windowMenu);
actionCloseAll->addTo(windowMenu);
@@ -145,7 +145,7 @@ void I18nDemo::newSlot(int id)
wrapper->show();
windowMenu->insertItem(wrapper->caption(), wrapper->id);
- windowMenu->setItemChecked(wrapper->id, TRUE);
+ windowMenu->setItemChecked(wrapper->id, true);
lastwrapper = wrapper;
windowIdNumber++;
@@ -174,7 +174,7 @@ void I18nDemo::windowActivated(TQWidget *w)
{
if (lastwrapper) {
tqApp->removeTranslator(&lastwrapper->translator);
- windowMenu->setItemChecked(lastwrapper->id, FALSE);
+ windowMenu->setItemChecked(lastwrapper->id, false);
}
if (! w) {
@@ -184,7 +184,7 @@ void I18nDemo::windowActivated(TQWidget *w)
Wrapper *wrapper = (Wrapper *) w;
- windowMenu->setItemChecked(wrapper->id, TRUE);
+ windowMenu->setItemChecked(wrapper->id, true);
lastwrapper = wrapper;
}
@@ -200,7 +200,7 @@ void I18nDemo::closeAllSlot()
{
TQWidget *w;
while ((w = workspace->activeWindow()))
- w->close(TRUE);
+ w->close(true);
}
@@ -233,7 +233,7 @@ void I18nDemo::showEvent(TQShowEvent *)
{
if (firstShow) {
newSlot(1);
- firstShow = FALSE;
+ firstShow = false;
return;
}
diff --git a/examples/demo/main.cpp b/examples/demo/main.cpp
index d2d86ec3e..25f8889d4 100644
--- a/examples/demo/main.cpp
+++ b/examples/demo/main.cpp
@@ -70,7 +70,7 @@ static void qdemo_set_caption( CategoryInterface *c, int i )
class WidgetCategory : public CategoryInterface
{
public:
- WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ WidgetCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "Widgets"; }
TQIconSet icon() const { return TQPixmap( widgeticon ); }
@@ -95,7 +95,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new WidgetsBase( stack ), categoryOffset() + 0 );
stack->addWidget( new DnDDemo( stack ), categoryOffset() + 1 );
}
@@ -111,7 +111,7 @@ private:
class DatabaseCategory : public CategoryInterface
{
public:
- DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ DatabaseCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "Database"; }
TQIconSet icon() const { return TQPixmap( dbicon ); }
@@ -133,7 +133,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new SqlEx( stack ), categoryOffset() + 0 );
}
@@ -149,7 +149,7 @@ private:
class CanvasCategory : public CategoryInterface
{
public:
- CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ CanvasCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "2D Graphics"; }
TQIconSet icon() const { return TQPixmap( twodicon ); }
@@ -174,7 +174,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new GraphWidget( stack ), categoryOffset() + 0 );
stack->addWidget( new DisplayWidget( stack ), categoryOffset() + 1 );
}
@@ -191,7 +191,7 @@ private:
class OpenGLCategory : public CategoryInterface
{
public:
- OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ OpenGLCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "3D Graphics"; }
TQIconSet icon() const { return TQPixmap( threedicon ); }
@@ -219,7 +219,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new GLWorkspace( stack ), categoryOffset() + 0 );
stack->addWidget( new GLLandscapeViewer( stack ), categoryOffset() + 1 );
stack->addWidget( new GLInfoText( stack ), categoryOffset() + 2 );
@@ -235,7 +235,7 @@ private:
class TextCategory : public CategoryInterface
{
public:
- TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ TextCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "Text Drawing/Editing"; }
TQIconSet icon() const { return TQPixmap( texticon ); }
@@ -260,7 +260,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
TextEdit *te = new TextEdit( stack );
te->load( "textdrawing/example.html" );
stack->addWidget( te, categoryOffset() + 0 );
@@ -278,7 +278,7 @@ private:
class I18NCategory : public CategoryInterface
{
public:
- I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ I18NCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "Internationalization"; }
TQIconSet icon() const { return TQPixmap( internicon ); }
@@ -300,7 +300,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new I18nDemo( stack ), categoryOffset() + 0 );
}
int categoryOffset() const { return 100000; }
@@ -314,7 +314,7 @@ private:
class GameCategory : public CategoryInterface
{
public:
- GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( FALSE ) {}
+ GameCategory( TQWidgetStack *s ) : CategoryInterface( s ), created( false ) {}
TQString name() const { return "Game"; }
TQIconSet icon() const { return TQPixmap( joyicon ); }
@@ -336,7 +336,7 @@ public:
void create() {
if ( created )
return;
- created = TRUE;
+ created = true;
stack->addWidget( new KAstTopLevel( stack ), categoryOffset() + 0 );
}
int categoryOffset() const { return 1000000; }
diff --git a/examples/demo/opengl/fbm.h b/examples/demo/opengl/fbm.h
index 474cd3c2d..423e44c5c 100644
--- a/examples/demo/opengl/fbm.h
+++ b/examples/demo/opengl/fbm.h
@@ -17,9 +17,6 @@
extern "C" {
#endif
-#define TRUE 1
-#define FALSE 0
-
typedef struct {
double x;
double y;
diff --git a/examples/demo/opengl/glbox.cpp b/examples/demo/opengl/glbox.cpp
index f065888b5..5250d49e4 100644
--- a/examples/demo/opengl/glbox.cpp
+++ b/examples/demo/opengl/glbox.cpp
@@ -68,7 +68,7 @@ void GLBox::paintGL()
glVertex3f( 0.98, 0.98, 0.98 );
}
glEnd();
- renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) );
+ renderText( 1.0, 1.0, 1.0, "Wirebox", TQFont( "helvetica", 12, TQFont::Bold, true ) );
}
diff --git a/examples/demo/opengl/glcontrolwidget.cpp b/examples/demo/opengl/glcontrolwidget.cpp
index b0d490e78..c6cc474af 100644
--- a/examples/demo/opengl/glcontrolwidget.cpp
+++ b/examples/demo/opengl/glcontrolwidget.cpp
@@ -7,7 +7,7 @@
GLControlWidget::GLControlWidget( TQWidget *parent, const char *name, TQGLWidget *share, WFlags f )
: TQGLWidget( parent, name, share, f ),
- xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(TRUE), wasAnimated(FALSE), delay( 50 )
+ xRot(0),yRot(0),zRot(0),xTrans(0),yTrans(0),zTrans(-10.0),scale(5.0), animation(true), wasAnimated(false), delay( 50 )
{
setCursor( pointingHandCursor );
timer = new TQTimer( this );
@@ -189,7 +189,7 @@ void GLControlWidget::setAnimationDelay( int ms )
timer->stop();
delay = ms;
if ( animation ) {
- wasAnimated = TRUE;
+ wasAnimated = true;
timer->start( delay );
}
}
diff --git a/examples/demo/opengl/glgear.cpp b/examples/demo/opengl/glgear.cpp
index 07c5f3694..6f3d4f0e7 100644
--- a/examples/demo/opengl/glgear.cpp
+++ b/examples/demo/opengl/glgear.cpp
@@ -258,7 +258,7 @@ void GLGear::paintGL()
glVertex3f( 2.98, 2.98, 2.98 );
}
glEnd();
- renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) );
+ renderText( 3.0, 3.0, 3.0, "Gears", TQFont( "helvetica", 12, TQFont::Bold, true ) );
glPopMatrix();
glPopAttrib();
}
diff --git a/examples/demo/opengl/gllandscape.cpp b/examples/demo/opengl/gllandscape.cpp
index 2906a5c84..8e570f2f6 100644
--- a/examples/demo/opengl/gllandscape.cpp
+++ b/examples/demo/opengl/gllandscape.cpp
@@ -18,8 +18,8 @@
GLLandscape::GLLandscape( TQWidget * parent, const char * name )
: TQGLWidget( parent, name )
{
- mouseButtonDown = FALSE;
- animationRunning = FALSE;
+ mouseButtonDown = false;
+ animationRunning = false;
oldX = oldY = oldZ = 0.0;
landscape = 0;
vertexNormals = 0;
@@ -308,7 +308,7 @@ void GLLandscape::createGrid( int size )
size++;
gridSize = size;
gridHalf = gridSize / 2;
- initFractals = TRUE;
+ initFractals = true;
landscape = new double*[gridSize];
normals = new gridNormals*[gridSize];
vertexNormals = new avgNormals*[gridSize];
@@ -425,7 +425,7 @@ void GLLandscape::fractalize()
p.x = p.y = p.z = 0;
// Initialise fbm routine
if ( initFractals ) {
- initFractals = FALSE;
+ initFractals = false;
value = fBm( p, roughness, 2.0, 8.0, 1 );
}
@@ -650,13 +650,13 @@ void GLLandscape::setLandscape( int state )
void GLLandscape::mousePressEvent( TQMouseEvent *e )
{
oldPos = e->pos();
- mouseButtonDown = TRUE;
+ mouseButtonDown = true;
}
void GLLandscape::mouseReleaseEvent( TQMouseEvent *e )
{
oldPos = e->pos();
- mouseButtonDown = FALSE;
+ mouseButtonDown = false;
}
void GLLandscape::mouseMoveEvent( TQMouseEvent *e )
@@ -742,10 +742,10 @@ void GLLandscape::toggleWaveAnimation( bool state )
{
if (state) {
animTimer = startTimer(20);
- animationRunning = TRUE;
+ animationRunning = true;
} else {
killTimer(animTimer);
- animationRunning = FALSE;
+ animationRunning = false;
}
}
diff --git a/examples/demo/opengl/gltexobj.cpp b/examples/demo/opengl/gltexobj.cpp
index 117917e38..207dd3018 100644
--- a/examples/demo/opengl/gltexobj.cpp
+++ b/examples/demo/opengl/gltexobj.cpp
@@ -63,7 +63,7 @@ void GLTexobj::paintGL()
glVertex3f( 0.98f, 0.98f, 0.98f );
}
glEnd();
- renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, TRUE ) );
+ renderText( 1.0, 1.0, 1.0, "Can", TQFont( "helvetica", 12, TQFont::Bold, true ) );
glPopAttrib();
glPopMatrix();
}
diff --git a/examples/demo/opengl/glworkspace.cpp b/examples/demo/opengl/glworkspace.cpp
index 8d7541fcb..867ef1d70 100644
--- a/examples/demo/opengl/glworkspace.cpp
+++ b/examples/demo/opengl/glworkspace.cpp
@@ -46,8 +46,8 @@ void GLWorkspace::setupSceneActions()
TQActionGroup *newGroup = new TQActionGroup( this );
newGroup->setMenuText( tr( "&New" ) );
newGroup->setText( tr( "New" ) );
- newGroup->setUsesDropDown( TRUE );
- newGroup->setExclusive( FALSE );
+ newGroup->setUsesDropDown( true );
+ newGroup->setExclusive( false );
newGroup->setIconSet( TQPixmap( "textdrawing/filenew.png" ) );
a = new TQAction( tr( "Wirebox" ), TQPixmap( "opengl/wirebox.xpm" ), tr( "&Wirebox" ), 0, newGroup );
connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( newWirebox() ) );
@@ -64,8 +64,8 @@ void GLWorkspace::setupSceneActions()
TQActionGroup *printGroup = new TQActionGroup( this );
printGroup->setMenuText( tr( "&Print" ) );
printGroup->setText( tr( "Print" ) );
- printGroup->setUsesDropDown( TRUE );
- printGroup->setExclusive( FALSE );
+ printGroup->setUsesDropDown( true );
+ printGroup->setExclusive( false );
printGroup->setIconSet( TQPixmap( "textdrawing/print.png" ) );
TQAction *da = new TQAction( tr( "Window Size" ), TQPixmap( "textdrawing/print.png" ), tr( "&Window Size" ), CTRL + Key_P, printGroup );
connect( da, TQ_SIGNAL( activated() ), this, TQ_SLOT( filePrintWindowRes() ) );
@@ -148,10 +148,10 @@ void GLWorkspace::filePrint( int x, int y )
img.invertPixels();
}
if ( view.checkMirror->isChecked() ) {
- img = img.mirror( TRUE, FALSE );
+ img = img.mirror( true, false );
}
if ( view.checkFlip->isChecked() ) {
- img = img.mirror( FALSE, TRUE );
+ img = img.mirror( false, true );
}
if ( view.checkLeft->isEnabled() && view.checkLeft->isChecked() ) {
}
@@ -196,13 +196,13 @@ bool GLWorkspace::filePrintSetup()
if ( !printer )
printer = new TQPrinter;
if ( printer->setup() ) {
- return TRUE;
+ return true;
} else {
if ( newPrinter ) {
delete printer;
printer = 0;
}
- return FALSE;
+ return false;
}
}
diff --git a/examples/demo/opengl/printpreview.ui.h b/examples/demo/opengl/printpreview.ui.h
index fd19c2c4b..d0cc91d20 100644
--- a/examples/demo/opengl/printpreview.ui.h
+++ b/examples/demo/opengl/printpreview.ui.h
@@ -24,10 +24,10 @@ void PrintPreview::updatePreview()
img.invertPixels();
}
if ( checkMirror->isChecked() ) {
- img = img.mirror( TRUE, FALSE );
+ img = img.mirror( true, false );
}
if ( checkFlip->isChecked() ) {
- img = img.mirror( FALSE, TRUE );
+ img = img.mirror( false, true );
}
if ( checkLeft->isEnabled() && checkLeft->isChecked() ) {
}
diff --git a/examples/demo/qasteroids/ledmeter.cpp b/examples/demo/qasteroids/ledmeter.cpp
index 5329d7ca8..bfc5e2487 100644
--- a/examples/demo/qasteroids/ledmeter.cpp
+++ b/examples/demo/qasteroids/ledmeter.cpp
@@ -9,7 +9,7 @@
KALedMeter::KALedMeter( TQWidget *parent ) : TQFrame( parent )
{
- mCRanges.setAutoDelete( TRUE );
+ mCRanges.setAutoDelete( true );
mRange = 100;
mCount = 20;
mCurrentCount = 0;
diff --git a/examples/demo/qasteroids/toplevel.cpp b/examples/demo/qasteroids/toplevel.cpp
index c2a22ea14..16ac3ef6c 100644
--- a/examples/demo/qasteroids/toplevel.cpp
+++ b/examples/demo/qasteroids/toplevel.cpp
@@ -234,7 +234,7 @@ KAstTopLevel::KAstTopLevel( TQWidget *parent, const char *name )
hbd->addWidget( powerMeter );
shipsRemain = 3;
- showHiscores = FALSE;
+ showHiscores = false;
actions.insert( TQt::Key_Up, Thrust );
actions.insert( TQt::Key_Left, RotateLeft );
@@ -271,31 +271,31 @@ void KAstTopLevel::keyPressEvent( TQKeyEvent *event )
switch ( a )
{
case RotateLeft:
- view->rotateLeft( TRUE );
+ view->rotateLeft( true );
break;
case RotateRight:
- view->rotateRight( TRUE );
+ view->rotateRight( true );
break;
case Thrust:
- view->thrust( TRUE );
+ view->thrust( true );
break;
case Shoot:
- view->shoot( TRUE );
+ view->shoot( true );
break;
case Shield:
- view->setShield( TRUE );
+ view->setShield( true );
break;
case Teleport:
- view->teleport( TRUE );
+ view->teleport( true );
break;
case Brake:
- view->brake( TRUE );
+ view->brake( true );
break;
default:
@@ -318,38 +318,38 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event )
switch ( a )
{
case RotateLeft:
- view->rotateLeft( FALSE );
+ view->rotateLeft( false );
break;
case RotateRight:
- view->rotateRight( FALSE );
+ view->rotateRight( false );
break;
case Thrust:
- view->thrust( FALSE );
+ view->thrust( false );
break;
case Shoot:
- view->shoot( FALSE );
+ view->shoot( false );
break;
case Brake:
- view->brake( FALSE );
+ view->brake( false );
break;
case Shield:
- view->setShield( FALSE );
+ view->setShield( false );
break;
case Teleport:
- view->teleport( FALSE );
+ view->teleport( false );
break;
case Launch:
if ( waitShip )
{
view->newShip();
- waitShip = FALSE;
+ waitShip = false;
view->hideText();
}
else
@@ -365,11 +365,11 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event )
/*
case Pause:
{
- view->pause( TRUE );
+ view->pause( true );
TQMessageBox::information( this,
tr("KAsteroids is paused"),
tr("Paused") );
- view->pause( FALSE );
+ view->pause( false );
}
break;
*/
@@ -384,14 +384,14 @@ void KAstTopLevel::keyReleaseEvent( TQKeyEvent *event )
void KAstTopLevel::showEvent( TQShowEvent *e )
{
TQMainWindow::showEvent( e );
- view->pause( FALSE );
+ view->pause( false );
view->setFocus();
}
void KAstTopLevel::hideEvent( TQHideEvent *e )
{
TQMainWindow::hideEvent( e );
- view->pause( TRUE );
+ view->pause( true );
}
void KAstTopLevel::slotNewGame()
@@ -407,9 +407,9 @@ void KAstTopLevel::slotNewGame()
view->addRocks( levels[0].nrocks );
// view->showText( tr( "Press L to launch." ), yellow );
view->newShip();
- waitShip = FALSE;
+ waitShip = false;
view->hideText();
- isPaused = FALSE;
+ isPaused = false;
}
void KAstTopLevel::slotShipKilled()
@@ -421,7 +421,7 @@ void KAstTopLevel::slotShipKilled()
if ( shipsRemain )
{
- waitShip = TRUE;
+ waitShip = true;
view->showText( tr( "Ship Destroyed. Press L to launch."), yellow );
}
else
@@ -481,7 +481,7 @@ void KAstTopLevel::doStats()
.arg(r);
*/
- view->showText( "Game Over. Press N for a new game.", yellow, FALSE );
+ view->showText( "Game Over. Press N for a new game.", yellow, false );
}
void KAstTopLevel::slotUpdateVitals()
diff --git a/examples/demo/qasteroids/view.cpp b/examples/demo/qasteroids/view.cpp
index 9e673a386..0bb243698 100644
--- a/examples/demo/qasteroids/view.cpp
+++ b/examples/demo/qasteroids/view.cpp
@@ -72,11 +72,11 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
view.setVScrollBarMode( TQScrollView::AlwaysOff );
view.setHScrollBarMode( TQScrollView::AlwaysOff );
view.viewport()->setFocusProxy( this );
- rocks.setAutoDelete( TRUE );
- missiles.setAutoDelete( TRUE );
- bits.setAutoDelete( TRUE );
- powerups.setAutoDelete( TRUE );
- exhaust.setAutoDelete( TRUE );
+ rocks.setAutoDelete( true );
+ missiles.setAutoDelete( true );
+ bits.setAutoDelete( true );
+ powerups.setAutoDelete( true );
+ exhaust.setAutoDelete( true );
field.setBackgroundColor( black );
TQPixmap pm( IMG_BACKGROUND );
@@ -87,7 +87,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
textSprite->setFont( font );
shield = 0;
- shieldOn = FALSE;
+ shieldOn = false;
refreshRate = REFRESH_DELAY;
initialized = readSprites();
@@ -97,10 +97,10 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
mTimerId = -1;
shipPower = MAX_POWER_LEVEL;
- vitalsChanged = TRUE;
- can_destroy_powerups = FALSE;
+ vitalsChanged = true;
+ can_destroy_powerups = false;
- mPaused = TRUE;
+ mPaused = true;
if ( !initialized ) {
textSprite->setText( tr("Error: Cannot read sprite images") );
@@ -135,7 +135,7 @@ void KAsteroidsView::reset()
rockSpeed = 1.0;
powerupSpeed = 1.0;
mFrameNum = 0;
- mPaused = FALSE;
+ mPaused = false;
ship->hide();
shield->hide();
@@ -156,7 +156,7 @@ void KAsteroidsView::newGame()
if ( shieldOn )
{
shield->hide();
- shieldOn = FALSE;
+ shieldOn = false;
}
reset();
if ( mTimerId < 0 )
@@ -196,13 +196,13 @@ void KAsteroidsView::newShip()
shipDx = 0;
shipDy = 0;
shipAngle = 0;
- rotateL = FALSE;
- rotateR = FALSE;
- thrustShip = FALSE;
- shootShip = FALSE;
- brakeShip = FALSE;
- teleportShip = FALSE;
- shieldOn = TRUE;
+ rotateL = false;
+ rotateR = false;
+ thrustShip = false;
+ shootShip = false;
+ brakeShip = false;
+ teleportShip = false;
+ shieldOn = true;
shootDelay = 0;
shipPower = MAX_POWER_LEVEL;
rotateRate = ROTATE_RATE;
@@ -215,7 +215,7 @@ void KAsteroidsView::newShip()
ship->show();
shield->show();
mShieldCount = 1; // just in case the ship appears on a rock.
- shieldTimer->start( 1000, TRUE );
+ shieldTimer->start( 1000, true );
}
void KAsteroidsView::setShield( bool s )
@@ -238,9 +238,9 @@ void KAsteroidsView::brake( bool b )
{
if ( brakeShip && !b )
{
- rotateL = FALSE;
- rotateR = FALSE;
- thrustShip = FALSE;
+ rotateL = false;
+ rotateR = false;
+ thrustShip = false;
rotateRate = ROTATE_RATE;
}
@@ -261,7 +261,7 @@ bool KAsteroidsView::readSprites()
new TQCanvasPixmapArray( sprites_prefix + kas_animations[i].path,
kas_animations[i].frames );
if ( !anim->isValid() )
- return FALSE;
+ return false;
animation.insert( kas_animations[i].id, anim );
i++;
}
@@ -402,7 +402,7 @@ void KAsteroidsView::timerEvent( TQTimerEvent * )
if ( vitalsChanged && !(mFrameNum % 10) ) {
emit updateVitals();
- vitalsChanged = FALSE;
+ vitalsChanged = false;
}
mFrameNum++;
@@ -521,14 +521,14 @@ void KAsteroidsView::reducePower( int val )
if ( shipPower <= 0 )
{
shipPower = 0;
- thrustShip = FALSE;
+ thrustShip = false;
if ( shieldOn )
{
- shieldOn = FALSE;
+ shieldOn = false;
shield->hide();
}
}
- vitalsChanged = TRUE;
+ vitalsChanged = true;
}
void KAsteroidsView::addExhaust( double x, double y, double dx,
@@ -565,7 +565,7 @@ void KAsteroidsView::processMissiles()
wrapSprite( missile );
- TQCanvasItemList hits = missile->collisions( TRUE );
+ TQCanvasItemList hits = missile->collisions( true );
TQCanvasItemList::Iterator hit;
for ( hit = hits.begin(); hit != hits.end(); ++hit )
{
@@ -598,7 +598,7 @@ void KAsteroidsView::processShip()
shield->setFrame( (shield->frame()+1) % shield->frameCount() );
shield->move( ship->x() - 9, ship->y() - 9 );
- TQCanvasItemList hits = shield->collisions( TRUE );
+ TQCanvasItemList hits = shield->collisions( true );
TQCanvasItemList::Iterator it;
for ( it = hits.begin(); it != hits.end(); ++it )
{
@@ -623,7 +623,7 @@ void KAsteroidsView::processShip()
if ( factor > mShieldCount )
{
// shield not strong enough
- shieldOn = FALSE;
+ shieldOn = false;
break;
}
rockHit( *it );
@@ -636,7 +636,7 @@ void KAsteroidsView::processShip()
if ( !shieldOn )
{
shield->hide();
- TQCanvasItemList hits = ship->collisions( TRUE );
+ TQCanvasItemList hits = ship->collisions( true );
TQCanvasItemList::Iterator it;
for ( it = hits.begin(); it != hits.end(); ++it )
{
@@ -688,16 +688,16 @@ void KAsteroidsView::processShip()
if ( brakeShip )
{
- thrustShip = FALSE;
- rotateL = FALSE;
- rotateR = FALSE;
+ thrustShip = false;
+ rotateL = false;
+ rotateR = false;
rotateRate = ROTATE_RATE;
if ( fabs(shipDx) < 2.5 && fabs(shipDy) < 2.5 )
{
shipDx = 0.0;
shipDy = 0.0;
ship->setVelocity( shipDx, shipDy );
- brakeShip = FALSE;
+ brakeShip = false;
}
else
{
@@ -713,9 +713,9 @@ void KAsteroidsView::processShip()
if ( fdiff > 0.08 )
{
if ( angleDiff > 0 )
- rotateL = TRUE;
+ rotateL = true;
else if ( angleDiff < 0 )
- rotateR = TRUE;
+ rotateR = true;
if ( fdiff > 0.6 )
rotateRate = mBrakeCount + 1;
else if ( fdiff > 0.4 )
@@ -728,7 +728,7 @@ void KAsteroidsView::processShip()
}
else if ( fabs(shipDx) > 1 || fabs(shipDy) > 1 )
{
- thrustShip = TRUE;
+ thrustShip = true;
// we'll make braking a bit faster
shipDx += cosangle/6 * (mBrakeCount - 1);
shipDy += sinangle/6 * (mBrakeCount - 1);
@@ -791,7 +791,7 @@ void KAsteroidsView::processShip()
ship->move( xra, yra );
}
- vitalsChanged = TRUE;
+ vitalsChanged = true;
}
}
@@ -821,7 +821,7 @@ void KAsteroidsView::processPowerups()
wrapSprite( pup );
- TQCanvasItemList hits = pup->collisions( TRUE );
+ TQCanvasItemList hits = pup->collisions( true );
TQCanvasItemList::Iterator it;
for ( it = hits.begin(); it != hits.end(); ++it )
{
@@ -852,7 +852,7 @@ void KAsteroidsView::processPowerups()
}
powerups.removeRef( pup );
- vitalsChanged = TRUE;
+ vitalsChanged = true;
}
else if ( (*it) == shield )
{
@@ -876,7 +876,7 @@ void KAsteroidsView::hideShield()
{
shield->hide();
mShieldCount = 0;
- shieldOn = FALSE;
+ shieldOn = false;
}
double KAsteroidsView::randDouble()
@@ -893,10 +893,10 @@ int KAsteroidsView::randInt( int range )
void KAsteroidsView::showEvent( TQShowEvent *e )
{
#if defined( QT_LICENSE_PROFESSIONAL )
- static bool wasThere = FALSE;
+ static bool wasThere = false;
if ( !wasThere ) {
- wasThere = TRUE;
+ wasThere = true;
TQMessageBox::information( this, tr("TQCanvas demo"),
tr("This game has been implemented using the TQCanvas class.\n"
"The TQCanvas class is not part of the Professional Edition. Please \n"
diff --git a/examples/demo/qasteroids/view.h b/examples/demo/qasteroids/view.h
index 35b360ab0..0d30b1c10 100644
--- a/examples/demo/qasteroids/view.h
+++ b/examples/demo/qasteroids/view.h
@@ -41,7 +41,7 @@ public:
void brake( bool b );
void pause( bool p);
- void showText( const TQString &text, const TQColor &color, bool scroll=TRUE );
+ void showText( const TQString &text, const TQColor &color, bool scroll=true );
void hideText();
int shots() const { return shotsFired; }
diff --git a/examples/demo/qthumbwheel.cpp b/examples/demo/qthumbwheel.cpp
index 984aa1f43..07fbf31b9 100644
--- a/examples/demo/qthumbwheel.cpp
+++ b/examples/demo/qthumbwheel.cpp
@@ -70,8 +70,8 @@ TQThumbWheel::~TQThumbWheel()
void TQThumbWheel::init()
{
- track = TRUE;
- mousePressed = FALSE;
+ track = true;
+ mousePressed = false;
pressedAt = -1;
rat = 1.0;
setFrameStyle( WinPanel | Sunken );
@@ -106,7 +106,7 @@ void TQThumbWheel::setValue( int value )
void TQThumbWheel::valueChange()
{
- repaint( FALSE );
+ repaint( false );
emit valueChanged(value());
}
@@ -166,7 +166,7 @@ void TQThumbWheel::keyPressEvent( TQKeyEvent *e )
void TQThumbWheel::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == LeftButton ) {
- mousePressed = TRUE;
+ mousePressed = true;
pressedAt = valueFromPosition( e->pos() );
}
}
diff --git a/examples/demo/sql/sqlex.ui.h b/examples/demo/sql/sqlex.ui.h
index aa97dfe47..345a2e2dc 100644
--- a/examples/demo/sql/sqlex.ui.h
+++ b/examples/demo/sql/sqlex.ui.h
@@ -33,8 +33,8 @@ void SqlEx::init()
{
hsplit->setResizeMode( lv, TQSplitter::KeepSize );
vsplit->setResizeMode( gb, TQSplitter::KeepSize );
- submitBtn->setEnabled( FALSE );
- conDiag = new ConnectDialog( this, "Connection Dialog", TRUE );
+ submitBtn->setEnabled( false );
+ conDiag = new ConnectDialog( this, "Connection Dialog", true );
}
void SqlEx::dbConnect()
@@ -84,15 +84,15 @@ void SqlEx::dbConnect()
}
lv->insertItem( lvi );
}
- submitBtn->setEnabled( TRUE );
+ submitBtn->setEnabled( true );
}
void SqlEx::execQuery()
{
// use a custom cursor to populate the data table
- TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", TRUE ) );
+ TQSqlSelectCursor* cursor = new TQSqlSelectCursor( te->text(), TQSqlDatabase::database( "SqlEx", true ) );
if ( cursor->isSelect() ) {
- dt->setSqlCursor( cursor, TRUE, TRUE );
+ dt->setSqlCursor( cursor, true, true );
dt->setSort( TQStringList() );
dt->refresh( TQDataTable::RefreshAll );
TQString txt( "Query OK" );
@@ -118,8 +118,8 @@ void SqlEx::showTable( TQListViewItem * item )
}
// populate the data table
- TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), TRUE, TQSqlDatabase::database( "SqlEx", TRUE ) );
- dt->setSqlCursor( cursor, TRUE, TRUE );
+ TQSqlCursor* cursor = new TQSqlCursor( i->text( 0 ), true, TQSqlDatabase::database( "SqlEx", true ) );
+ dt->setSqlCursor( cursor, true, true );
dt->setSort( cursor->primaryIndex() );
dt->refresh( TQDataTable::RefreshAll );
lbl->setText( "Displaying table " + i->text( 0 ) );
diff --git a/examples/demo/textdrawing/example.html b/examples/demo/textdrawing/example.html
index eca9d9210..c20fe8116 100644
--- a/examples/demo/textdrawing/example.html
+++ b/examples/demo/textdrawing/example.html
@@ -138,7 +138,7 @@ constructor.
<p>See also <a href="#1f406e">setAlignment</a>().
<h3 class="fn">bool <a name="75b2a1"></a>TQLabel::autoResize () const</h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p>
-<p>Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing
+<p>Returns true if auto-resizing is enabled, or false if auto-resizing
is disabled.
<p>Auto-resizing is disabled by default.
<p>See also <a href="#c0e104">setAutoResize</a>().
@@ -187,7 +187,7 @@ returns 0.
<p>The <em>alignment</em> must be a bitwise OR of <a href="ntqt.html#AlignmentFlags">TQt::AlignmentFlags</a>
values. The <code>WordBreak, ExpandTabs, SingleLine</code> and <code>ShowPrefix</code> flags apply only if the label contains a plain text, and
are otherwise ignored. The <code>DontClip</code> flag is always ignored.
-<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to TRUE.
+<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to true.
<p>The default alignment is <code>AlignLeft | AlignVCenter |
ExpandTabs</code> if the label doesn't have a buddy and
<code>AlignLeft | AlignVCenter | ExpandTabs | ShowPrefix </code> if
@@ -204,7 +204,7 @@ the label has a buddy.
<p>Reimplemented from <a href="ntqwidget.html#c7a335">TQWidget.</a>
<h3 class="fn">void <a name="c0e104"></a>TQLabel::setAutoResize ( bool enable ) <code>[virtual]</code></h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of TQt. We strongly advise against using it in new code.<p>
-Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</em> is FALSE.
+Enables auto-resizing if <em>enable</em> is true, or disables it if <em>enable</em> is false.
<p>When auto-resizing is enabled, the label will resize itself to fit
the contents whenever the contents change. The top left corner is
not moved. This is useful for TQLabel widgets that are not managed by
@@ -279,7 +279,7 @@ the label. Any previous content is cleared.
<p>The label resizes itself if auto-resizing is enabled.
<p>See also <a href="#101ecb">pixmap</a>() and <a href="#191701">setBuddy</a>().
<h3 class="fn">void <a name="e9e3cf"></a>TQLabel::setScaledContents ( bool enable )</h3>
-<p>When called with <em>enable</em> == TRUE, and the label shows a pixmap,
+<p>When called with <em>enable</em> == true, and the label shows a pixmap,
it will scale the pixmap to fill available space.
<p>See also <a href="#7e1f73">hasScaledContents</a>().
<h3 class="fn">void <a name="dffb43"></a>TQLabel::setText ( const <a href="ntqstring.html">TQString</a> &amp; text ) <code>[virtual slot]</code></h3>
diff --git a/examples/demo/textdrawing/helpwindow.cpp b/examples/demo/textdrawing/helpwindow.cpp
index 01bb90add..98ead9a8a 100644
--- a/examples/demo/textdrawing/helpwindow.cpp
+++ b/examples/demo/textdrawing/helpwindow.cpp
@@ -100,8 +100,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
menuBar()->insertItem( tr( "History" ), hist );
menuBar()->insertItem( tr( "Bookmarks" ), bookm );
- menuBar()->setItemEnabled( forwardId, FALSE);
- menuBar()->setItemEnabled( backwardId, FALSE);
+ menuBar()->setItemEnabled( forwardId, false);
+ menuBar()->setItemEnabled( backwardId, false);
connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ),
this, TQ_SLOT( setBackwardAvailable( bool ) ) );
connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ),
@@ -114,21 +114,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar );
connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) );
- button->setEnabled( FALSE );
+ button->setEnabled( false );
button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar );
connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) );
- button->setEnabled( FALSE );
+ button->setEnabled( false );
button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar );
toolbar->addSeparator();
- pathCombo = new TQComboBox( TRUE, toolbar );
+ pathCombo = new TQComboBox( true, toolbar );
connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT( pathSelected( const TQString & ) ) );
toolbar->setStretchableWidget( pathCombo );
- setRightJustification( TRUE );
- setDockEnabled( DockLeft, FALSE );
- setDockEnabled( DockRight, FALSE );
+ setRightJustification( true );
+ setDockEnabled( DockLeft, false );
+ setDockEnabled( DockRight, false );
pathCombo->insertItem( home_ );
@@ -156,11 +156,11 @@ void HelpWindow::textChanged()
selectedURL = caption();
if ( !selectedURL.isEmpty() && pathCombo ) {
- bool exists = FALSE;
+ bool exists = false;
int i;
for ( i = 0; i < pathCombo->count(); ++i ) {
if ( pathCombo->text( i ) == selectedURL ) {
- exists = TRUE;
+ exists = true;
break;
}
}
@@ -232,7 +232,7 @@ void HelpWindow::print()
{
#ifndef TQT_NO_PRINTER
TQPrinter printer;
- printer.setFullPage(TRUE);
+ printer.setFullPage(true);
if ( printer.setup() ) {
TQPainter p( &printer );
TQPaintDeviceMetrics metrics(p.device());
@@ -275,7 +275,7 @@ void HelpWindow::print()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
@@ -284,10 +284,10 @@ void HelpWindow::pathSelected( const TQString &_path )
{
browser->setSource( _path );
TQMap<int, TQString>::Iterator it = mHistory.begin();
- bool exists = FALSE;
+ bool exists = false;
for ( ; it != mHistory.end(); ++it ) {
if ( *it == _path ) {
- exists = TRUE;
+ exists = true;
break;
}
}
diff --git a/examples/demo/textdrawing/textedit.cpp b/examples/demo/textdrawing/textedit.cpp
index 5e203ed16..dc722e35d 100644
--- a/examples/demo/textdrawing/textedit.cpp
+++ b/examples/demo/textdrawing/textedit.cpp
@@ -110,7 +110,7 @@ void TextEdit::setupTextActions()
TQPopupMenu *menu = new TQPopupMenu( this );
menuBar()->insertItem( tr( "For&mat" ), menu );
- comboStyle = new TQComboBox( FALSE, tb );
+ comboStyle = new TQComboBox( false, tb );
comboStyle->insertItem( tr("Standard") );
comboStyle->insertItem( tr("Bullet List (Disc)") );
comboStyle->insertItem( tr("Bullet List (Circle)") );
@@ -121,14 +121,14 @@ void TextEdit::setupTextActions()
connect( comboStyle, TQ_SIGNAL( activated( int ) ),
this, TQ_SLOT( textStyle( int ) ) );
- comboFont = new TQComboBox( TRUE, tb );
+ comboFont = new TQComboBox( true, tb );
TQFontDatabase db;
comboFont->insertStringList( db.families() );
connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT( textFamily( const TQString & ) ) );
comboFont->lineEdit()->setText( TQApplication::font().family() );
- comboSize = new TQComboBox( TRUE, tb );
+ comboSize = new TQComboBox( true, tb );
TQValueList<int> sizes = db.standardSizes();
TQValueList<int>::Iterator it = sizes.begin();
for ( ; it != sizes.end(); ++it )
@@ -141,39 +141,39 @@ void TextEdit::setupTextActions()
connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) );
actionTextBold->addTo( tb );
actionTextBold->addTo( menu );
- actionTextBold->setToggleAction( TRUE );
+ actionTextBold->setToggleAction( true );
actionTextItalic = new TQAction( tr( "Italic" ), TQPixmap( "textdrawing/textitalic.png" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) );
actionTextItalic->addTo( tb );
actionTextItalic->addTo( menu );
- actionTextItalic->setToggleAction( TRUE );
+ actionTextItalic->setToggleAction( true );
actionTextUnderline = new TQAction( tr( "Underline" ), TQPixmap( "textdrawing/textunderline.png" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) );
actionTextUnderline->addTo( tb );
actionTextUnderline->addTo( menu );
- actionTextUnderline->setToggleAction( TRUE );
+ actionTextUnderline->setToggleAction( true );
menu->insertSeparator();
TQActionGroup *grp = new TQActionGroup( this );
- grp->setExclusive( TRUE );
+ grp->setExclusive( true );
connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) );
actionAlignLeft = new TQAction( tr( "Left" ), TQPixmap( "textdrawing/textleft.png" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
actionAlignLeft->addTo( tb );
actionAlignLeft->addTo( menu );
- actionAlignLeft->setToggleAction( TRUE );
+ actionAlignLeft->setToggleAction( true );
actionAlignCenter = new TQAction( tr( "Center" ), TQPixmap( "textdrawing/textcenter.png" ), tr( "C&enter" ), CTRL + Key_M, grp, "textCenter" );
actionAlignCenter->addTo( tb );
actionAlignCenter->addTo( menu );
- actionAlignCenter->setToggleAction( TRUE );
+ actionAlignCenter->setToggleAction( true );
actionAlignRight = new TQAction( tr( "Right" ), TQPixmap( "textdrawing/textright.png" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
actionAlignRight->addTo( tb );
actionAlignRight->addTo( menu );
- actionAlignRight->setToggleAction( TRUE );
+ actionAlignRight->setToggleAction( true );
actionAlignJustify = new TQAction( tr( "Justify" ), TQPixmap( "textdrawing/textjustify.png" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
actionAlignJustify->addTo( tb );
actionAlignJustify->addTo( menu );
- actionAlignJustify->setToggleAction( TRUE );
+ actionAlignJustify->setToggleAction( true );
menu->insertSeparator();
@@ -273,7 +273,7 @@ void TextEdit::filePrint()
return;
#ifndef TQT_NO_PRINTER
TQPrinter printer;
- printer.setFullPage(TRUE);
+ printer.setFullPage(true);
TQPaintDeviceMetrics screen( this );
printer.setResolution( screen.logicalDpiY() );
if ( printer.setup( this ) ) {
@@ -302,7 +302,7 @@ void TextEdit::filePrint()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
@@ -458,13 +458,13 @@ void TextEdit::colorChanged( const TQColor &c )
void TextEdit::alignmentChanged( int a )
{
if ( ( a == AlignAuto ) || ( a & AlignLeft ))
- actionAlignLeft->setOn( TRUE );
+ actionAlignLeft->setOn( true );
else if ( ( a & AlignHCenter ) )
- actionAlignCenter->setOn( TRUE );
+ actionAlignCenter->setOn( true );
else if ( ( a & AlignRight ) )
- actionAlignRight->setOn( TRUE );
+ actionAlignRight->setOn( true );
else if ( ( a & AlignJustify ) )
- actionAlignJustify->setOn( TRUE );
+ actionAlignJustify->setOn( true );
}
void TextEdit::editorChanged( TQWidget * )
diff --git a/examples/demo/widgets/widgetsbase.ui.h b/examples/demo/widgets/widgetsbase.ui.h
index e50ea1bae..eb366ae89 100644
--- a/examples/demo/widgets/widgetsbase.ui.h
+++ b/examples/demo/widgets/widgetsbase.ui.h
@@ -13,14 +13,14 @@ void WidgetsBase::destroy()
void WidgetsBase::resetColors()
{
- groupBox->setPalette( palette(), FALSE );
+ groupBox->setPalette( palette(), false );
TQObjectList *chldn = groupBox->queryList();
if ( chldn ) {
for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) {
if(obj->isWidgetType()) {
TQWidget *w = (TQWidget *)obj;
if(!w->isTopLevel())
- w->setPalette(palette(), FALSE);
+ w->setPalette(palette(), false);
}
}
}
@@ -28,14 +28,14 @@ void WidgetsBase::resetColors()
void WidgetsBase::setColor( const TQString & color )
{
- groupBox->setPalette( TQColor( color ), FALSE );
+ groupBox->setPalette( TQColor( color ), false );
TQObjectList *chldn = groupBox->queryList();
if ( chldn ) {
for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) {
if(obj->isWidgetType()) {
TQWidget *w = (TQWidget *)obj;
if(!w->isTopLevel())
- w->setPalette(TQColor(color), FALSE);
+ w->setPalette(TQColor(color), false);
}
}
}
@@ -53,7 +53,7 @@ void WidgetsBase::updateClock()
void WidgetsBase::updateColorTest( const TQString & color )
{
- colorTest->setPalette( TQColor( color ), TRUE);
+ colorTest->setPalette( TQColor( color ), true);
}
void WidgetsBase::updateDateTimeString()
diff --git a/examples/demo/widgets/widgetsbase_pro.ui.h b/examples/demo/widgets/widgetsbase_pro.ui.h
index af6b656e4..c356c969c 100644
--- a/examples/demo/widgets/widgetsbase_pro.ui.h
+++ b/examples/demo/widgets/widgetsbase_pro.ui.h
@@ -13,13 +13,13 @@ void WidgetsBase::destroy()
void WidgetsBase::resetColors()
{
- groupBox->setPalette( palette(), FALSE );
+ groupBox->setPalette( palette(), false );
if(TQObjectList *chldn = groupBox->queryList()) {
for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) {
if(obj->isWidgetType()) {
TQWidget *w = (TQWidget *)obj;
if(!w->isTopLevel())
- w->setPalette(palette(), FALSE);
+ w->setPalette(palette(), false);
}
}
}
@@ -27,13 +27,13 @@ void WidgetsBase::resetColors()
void WidgetsBase::setColor( const TQString & color )
{
- groupBox->setPalette( TQColor( color ), FALSE );
+ groupBox->setPalette( TQColor( color ), false );
if(TQObjectList *chldn = groupBox->queryList()) {
for(TQObject *obj=chldn->first(); obj; obj = chldn->next()) {
if(obj->isWidgetType()) {
TQWidget *w = (TQWidget *)obj;
if(!w->isTopLevel())
- w->setPalette(TQColor(color), FALSE);
+ w->setPalette(TQColor(color), false);
}
}
}
diff --git a/examples/desktop/desktop.cpp b/examples/desktop/desktop.cpp
index 15353e98f..d5fc0ed66 100644
--- a/examples/desktop/desktop.cpp
+++ b/examples/desktop/desktop.cpp
@@ -310,10 +310,10 @@ int main( int argc, char **argv )
app.setFont( f );
}
- bool validOptions = FALSE;
+ bool validOptions = false;
if ( argc == 2 ) {
- validOptions = TRUE;
+ validOptions = true;
if ( strcmp(argv[1],"-poly") == 0 )
poly();
else if ( strcmp(argv[1],"-rotate") == 0 )
@@ -323,16 +323,16 @@ int main( int argc, char **argv )
else if ( strcmp(argv[1],"-trollwidget") == 0 )
desktopWidget();
else
- validOptions = FALSE;
+ validOptions = false;
}
if ( argc == 3 ) {
- validOptions = TRUE;
+ validOptions = true;
if ( strcmp(argv[1],"-shadetext") == 0 )
desktopText( argv[2] );
else if ( strcmp(argv[1],"-shadewidget") == 0 )
desktopWidget( argv[2] );
else
- validOptions = FALSE;
+ validOptions = false;
}
if ( !validOptions ) {
fprintf( stderr, "Usage:\n\tdesktop -poly"
diff --git a/examples/dirview/dirview.cpp b/examples/dirview/dirview.cpp
index 7bd26d3f5..1c4a2df07 100644
--- a/examples/dirview/dirview.cpp
+++ b/examples/dirview/dirview.cpp
@@ -200,12 +200,12 @@ void Directory::setOpen( bool o )
TQString s( fullName() );
TQDir thisDir( s );
if ( !thisDir.isReadable() ) {
- readable = FALSE;
- setExpandable( FALSE );
+ readable = false;
+ setExpandable( false );
return;
}
- listView()->setUpdatesEnabled( FALSE );
+ listView()->setUpdatesEnabled( false );
const TQFileInfoList * files = thisDir.entryInfoList();
if ( files ) {
TQFileInfoListIterator it( *files );
@@ -229,7 +229,7 @@ void Directory::setOpen( bool o )
}
}
}
- listView()->setUpdatesEnabled( TRUE );
+ listView()->setUpdatesEnabled( true );
}
TQListViewItem::setOpen( o );
}
@@ -237,7 +237,7 @@ void Directory::setOpen( bool o )
void Directory::setup()
{
- setExpandable( TRUE );
+ setExpandable( true );
TQListViewItem::setup();
}
@@ -274,7 +274,7 @@ TQString Directory::text( int column ) const
DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo )
: TQListView( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ),
- dropItem( 0 ), mousePressed( FALSE )
+ dropItem( 0 ), mousePressed( false )
{
autoopen_timer = new TQTimer( this );
if ( !folderLocked ) {
@@ -289,8 +289,8 @@ DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo )
connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ),
this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) );
- setAcceptDrops( TRUE );
- viewport()->setAcceptDrops( TRUE );
+ setAcceptDrops( true );
+ viewport()->setAcceptDrops( true );
connect( autoopen_timer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( openFolder() ) );
@@ -309,7 +309,7 @@ void DirectoryView::openFolder()
{
autoopen_timer->stop();
if ( dropItem && !dropItem->isOpen() ) {
- dropItem->setOpen( TRUE );
+ dropItem->setOpen( true );
dropItem->repaint();
}
}
@@ -344,7 +344,7 @@ void DirectoryView::contentsDragMoveEvent( TQDragMoveEvent *e )
TQPoint vp = contentsToViewport( ( (TQDragMoveEvent*)e )->pos() );
TQListViewItem *i = itemAt( vp );
if ( i ) {
- setSelected( i, TRUE );
+ setSelected( i, true );
e->accept();
if ( i != dropItem ) {
autoopen_timer->stop();
@@ -376,7 +376,7 @@ void DirectoryView::contentsDragLeaveEvent( TQDragLeaveEvent * )
dropItem = 0;
setCurrentItem( oldCurrent );
- setSelected( oldCurrent, TRUE );
+ setSelected( oldCurrent, true );
}
void DirectoryView::contentsDropEvent( TQDropEvent *e )
@@ -461,7 +461,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e )
treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() ||
p.x() < header()->cellPos( header()->mapToActual( 0 ) ) ) {
presspos = e->pos();
- mousePressed = TRUE;
+ mousePressed = true;
}
}
}
@@ -469,7 +469,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e )
void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e )
{
if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
- mousePressed = FALSE;
+ mousePressed = false;
TQListViewItem *item = itemAt( contentsToViewport(presspos) );
if ( item ) {
TQString source = fullPath(item);
@@ -486,7 +486,7 @@ void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e )
void DirectoryView::contentsMouseReleaseEvent( TQMouseEvent * )
{
- mousePressed = FALSE;
+ mousePressed = false;
}
void DirectoryView::setDir( const TQString &s )
@@ -494,7 +494,7 @@ void DirectoryView::setDir( const TQString &s )
TQListViewItemIterator it( this );
++it;
for ( ; it.current(); ++it ) {
- it.current()->setOpen( FALSE );
+ it.current()->setOpen( false );
}
TQStringList lst( TQStringList::split( "/", s ) );
@@ -503,7 +503,7 @@ void DirectoryView::setDir( const TQString &s )
for ( ; it2 != lst.end(); ++it2 ) {
while ( item ) {
if ( item->text( 0 ) == *it2 ) {
- item->setOpen( TRUE );
+ item->setOpen( true );
break;
}
item = item->itemBelow();
diff --git a/examples/dirview/dirview.h b/examples/dirview/dirview.h
index d08574976..e3db20539 100644
--- a/examples/dirview/dirview.h
+++ b/examples/dirview/dirview.h
@@ -74,7 +74,7 @@ class DirectoryView : public TQListView
TQ_OBJECT
public:
- DirectoryView( TQWidget *parent = 0, const char *name = 0, bool sdo = FALSE );
+ DirectoryView( TQWidget *parent = 0, const char *name = 0, bool sdo = false );
bool showDirsOnly() { return dirsOnly; }
public slots:
diff --git a/examples/dirview/main.cpp b/examples/dirview/main.cpp
index d6cf1a584..b9a2c8f19 100644
--- a/examples/dirview/main.cpp
+++ b/examples/dirview/main.cpp
@@ -29,12 +29,12 @@ int main( int argc, char ** argv )
++i;
Directory * root = new Directory( &mw, fi->filePath() );
if ( roots->count() <= 1 )
- root->setOpen( TRUE ); // be interesting
+ root->setOpen( true ); // be interesting
}
mw.resize( 400, 400 );
mw.setCaption( "TQt Example - Directory Browser" );
- mw.setAllColumnsShowFocus( TRUE );
+ mw.setAllColumnsShowFocus( true );
a.setMainWidget( &mw );
mw.show();
diff --git a/examples/distributor/distributor.ui.h b/examples/distributor/distributor.ui.h
index 93e6826cc..c51056f59 100644
--- a/examples/distributor/distributor.ui.h
+++ b/examples/distributor/distributor.ui.h
@@ -24,29 +24,29 @@ void Distributor::init()
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(checkLibData()) );
- cancelButton()->setAutoDefault( FALSE );
- backButton()->setAutoDefault( FALSE );
+ cancelButton()->setAutoDefault( false );
+ backButton()->setAutoDefault( false );
- setNextEnabled( selectLibrary, FALSE );
+ setNextEnabled( selectLibrary, false );
- setHelpEnabled( selectLibrary, FALSE );
- setHelpEnabled( modifyPaths, FALSE );
- setHelpEnabled( verifyMods, FALSE );
+ setHelpEnabled( selectLibrary, false );
+ setHelpEnabled( modifyPaths, false );
+ setHelpEnabled( verifyMods, false );
- setFinishEnabled( verifyMods, TRUE );
+ setFinishEnabled( verifyMods, true );
}
void Distributor::showPage( TQWidget *page )
{
if ( page == selectLibrary ) {
- nextButton()->setDefault( TRUE );
+ nextButton()->setDefault( true );
libFilename->setFocus();
} else if ( page == modifyPaths ) {
- nextButton()->setDefault( TRUE );
+ nextButton()->setDefault( true );
prefixPath->selectAll();
prefixPath->setFocus();
} else if ( page == verifyMods ) {
- finishButton()->setDefault( TRUE );
+ finishButton()->setDefault( true );
finishButton()->setFocus();
TQString labeltext =
@@ -81,13 +81,13 @@ void Distributor::showPage( TQWidget *page )
void Distributor::checkLibFilename( const TQString &filename )
{
- setNextEnabled( selectLibrary, FALSE );
+ setNextEnabled( selectLibrary, false );
TQFileInfo fileinfo( filename );
if ( ! filename.isEmpty() && fileinfo.exists() &&
fileinfo.isReadable() && fileinfo.isWritable() &&
fileinfo.isFile() && !fileinfo.isSymLink() )
- timer->start( 500, TRUE );
+ timer->start( 500, true );
}
void Distributor::browseLibFilename()
@@ -134,25 +134,25 @@ void Distributor::checkLibData()
} steps[7];
steps[0].key = "qt_nstpath=";
- steps[0].done = FALSE;
+ steps[0].done = false;
steps[1].key = "qt_binpath=";
- steps[1].done = FALSE;
+ steps[1].done = false;
steps[2].key = "qt_docpath=";
- steps[2].done = FALSE;
+ steps[2].done = false;
steps[3].key = "qt_hdrpath=";
- steps[3].done = FALSE;
+ steps[3].done = false;
steps[4].key = "qt_libpath=";
- steps[4].done = FALSE;
+ steps[4].done = false;
steps[5].key = "qt_plgpath=";
- steps[5].done = FALSE;
+ steps[5].done = false;
steps[6].key = "qt_datpath=";
- steps[6].done = FALSE;
+ steps[6].done = false;
uint completed = 0;
uint total_steps = sizeof(steps) / sizeof(step);
@@ -192,7 +192,7 @@ void Distributor::checkLibData()
}
steps[x].value = s;
- steps[x].done = TRUE;
+ steps[x].done = true;
++completed;
}
@@ -209,7 +209,7 @@ void Distributor::checkLibData()
}
if ( completed == total_steps ) {
- setNextEnabled( selectLibrary, TRUE );
+ setNextEnabled( selectLibrary, true );
TQString prefix = TQFile::decodeName( steps[0].value );
prefixPath->setText( prefix );
@@ -281,31 +281,31 @@ void Distributor::accept()
steps[0].key = "qt_nstpath=";
steps[0].value = TQFile::encodeName( prefixPath->text() );
- steps[0].done = FALSE;
+ steps[0].done = false;
steps[1].key = "qt_binpath=";
steps[1].value = TQFile::encodeName( binPath->text() );
- steps[1].done = FALSE;
+ steps[1].done = false;
steps[2].key = "qt_docpath=";
steps[2].value = TQFile::encodeName( docPath->text() );
- steps[2].done = FALSE;
+ steps[2].done = false;
steps[3].key = "qt_hdrpath=";
steps[3].value = TQFile::encodeName( hdrPath->text() );
- steps[3].done = FALSE;
+ steps[3].done = false;
steps[4].key = "qt_libpath=";
steps[4].value = TQFile::encodeName( libPath->text() );
- steps[4].done = FALSE;
+ steps[4].done = false;
steps[5].key = "qt_plgpath=";
steps[5].value = TQFile::encodeName( plgPath->text() );
- steps[5].done = FALSE;
+ steps[5].done = false;
steps[6].key = "qt_datpath=";
steps[6].value = TQFile::encodeName( datPath->text() );
- steps[6].done = FALSE;
+ steps[6].done = false;
uint completed = 0;
uint total_steps = sizeof(steps) / sizeof(step);
@@ -346,7 +346,7 @@ void Distributor::accept()
}
qstrcpy( s, steps[x].value );
- steps[x].done = TRUE;
+ steps[x].done = true;
++completed;
}
diff --git a/examples/dragdrop/dropsite.cpp b/examples/dragdrop/dropsite.cpp
index 7257e6ed0..33458f689 100644
--- a/examples/dragdrop/dropsite.cpp
+++ b/examples/dragdrop/dropsite.cpp
@@ -23,7 +23,7 @@
DropSite::DropSite( TQWidget * parent, const char * name )
: TQLabel( parent, name )
{
- setAcceptDrops(TRUE);
+ setAcceptDrops(true);
}
diff --git a/examples/dragdrop/main.cpp b/examples/dragdrop/main.cpp
index 3a618b60f..d06bc5867 100644
--- a/examples/dragdrop/main.cpp
+++ b/examples/dragdrop/main.cpp
@@ -17,7 +17,7 @@
#include <ntqlabel.h>
#include <ntqpixmap.h>
-static void addStuff( TQWidget * parent, bool image, bool secret = FALSE )
+static void addStuff( TQWidget * parent, bool image, bool secret = false )
{
TQVBoxLayout * tll = new TQVBoxLayout( parent, 10 );
DropSite * d = new DropSite( parent );
@@ -54,17 +54,17 @@ int main( int argc, char ** argv )
TQApplication a( argc, argv );
TQWidget mw;
- addStuff( &mw, TRUE );
+ addStuff( &mw, true );
mw.setCaption( "TQt Example - Drag and Drop" );
mw.show();
TQWidget mw2;
- addStuff( &mw2, FALSE );
+ addStuff( &mw2, false );
mw2.setCaption( "TQt Example - Drag and Drop" );
mw2.show();
TQWidget mw3;
- addStuff( &mw3, TRUE, TRUE );
+ addStuff( &mw3, true, true );
mw3.setCaption( "TQt Example - Drag and Drop" );
mw3.show();
diff --git a/examples/dragdrop/secret.cpp b/examples/dragdrop/secret.cpp
index fdba44884..2d672b46d 100644
--- a/examples/dragdrop/secret.cpp
+++ b/examples/dragdrop/secret.cpp
@@ -39,9 +39,9 @@ bool SecretDrag::decode( TQDropEvent* e, TQString& str )
TQString msg;
msg.sprintf("The secret number is %d", payload[0] );
str = msg;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/examples/drawdemo/drawdemo.cpp b/examples/drawdemo/drawdemo.cpp
index 5fc1e0f7b..3ea0f3b2f 100644
--- a/examples/drawdemo/drawdemo.cpp
+++ b/examples/drawdemo/drawdemo.cpp
@@ -191,7 +191,7 @@ DrawView::DrawView()
maxheight += 30;
if ( i == 0 )
- rb->setChecked( TRUE );
+ rb->setChecked( true );
}
maxheight += 10; // maxheight is now 10 pixels upper margin
diff --git a/examples/drawlines/connect.cpp b/examples/drawlines/connect.cpp
index 3b7e140cb..c4d5ddf8f 100644
--- a/examples/drawlines/connect.cpp
+++ b/examples/drawlines/connect.cpp
@@ -35,7 +35,7 @@ private:
TQPoint *points; // point array
TQColor *colors; // color array
int count; // count = number of points
- bool down; // TRUE if mouse down
+ bool down; // true if mouse down
};
@@ -48,7 +48,7 @@ ConnectWidget::ConnectWidget( TQWidget *parent, const char *name )
{
setBackgroundColor( white ); // white background
count = 0;
- down = FALSE;
+ down = false;
points = new TQPoint[MAXPOINTS];
colors = new TQColor[MAXCOLORS];
for ( int i=0; i<MAXCOLORS; i++ ) // init color array
@@ -84,7 +84,7 @@ void ConnectWidget::paintEvent( TQPaintEvent * )
void ConnectWidget::mousePressEvent( TQMouseEvent * )
{
- down = TRUE;
+ down = true;
count = 0; // start recording points
erase(); // erase widget contents
}
@@ -96,7 +96,7 @@ void ConnectWidget::mousePressEvent( TQMouseEvent * )
void ConnectWidget::mouseReleaseEvent( TQMouseEvent * )
{
- down = FALSE; // done recording points
+ down = false; // done recording points
update(); // draw the lines
}
diff --git a/examples/extension/dialogform.ui.h b/examples/extension/dialogform.ui.h
index d6f873f33..194db19da 100644
--- a/examples/extension/dialogform.ui.h
+++ b/examples/extension/dialogform.ui.h
@@ -8,7 +8,7 @@
void DialogForm::init()
{
- extensionShown = FALSE;
+ extensionShown = false;
setExtension( new Extension( this ) );
setOrientation( Vertical );
}
diff --git a/examples/extension/mainform.ui.h b/examples/extension/mainform.ui.h
index 1eab636fa..e36fe146e 100644
--- a/examples/extension/mainform.ui.h
+++ b/examples/extension/mainform.ui.h
@@ -13,16 +13,16 @@
void MainForm::init()
{
- sessions = FALSE;
- logging = FALSE;
+ sessions = false;
+ logging = false;
log_filename = TQString::null;
- log_errors = TRUE;
- log_actions = TRUE;
+ log_errors = true;
+ log_actions = true;
}
void MainForm::optionsDlg()
{
- DialogForm *dlg = new DialogForm( this, "dialog", TRUE );
+ DialogForm *dlg = new DialogForm( this, "dialog", true );
Extension *ext = (Extension*)dlg->extension()->tqt_cast( "Extension" );
if ( !ext )
return;
diff --git a/examples/fileiconview/mainwindow.cpp b/examples/fileiconview/mainwindow.cpp
index d2d6f2edb..505bdb0be 100644
--- a/examples/fileiconview/mainwindow.cpp
+++ b/examples/fileiconview/mainwindow.cpp
@@ -77,11 +77,11 @@ void FileMainWindow::setup()
{
TQSplitter *splitter = new TQSplitter( this );
- dirlist = new DirectoryView( splitter, "dirlist", TRUE );
+ dirlist = new DirectoryView( splitter, "dirlist", true );
dirlist->addColumn( "Name" );
dirlist->addColumn( "Type" );
Directory *root = new Directory( dirlist, "/" );
- root->setOpen( TRUE );
+ root->setOpen( true );
splitter->setResizeMode( dirlist, TQSplitter::KeepSize );
fileview = new TQtFileIconView( "/", splitter );
@@ -90,12 +90,12 @@ void FileMainWindow::setup()
setCentralWidget( splitter );
TQToolBar *toolbar = new TQToolBar( this, "toolbar" );
- setRightJustification( TRUE );
+ setRightJustification( true );
(void)new TQLabel( tr( " Path: " ), toolbar );
- pathCombo = new TQComboBox( TRUE, toolbar );
- pathCombo->setAutoCompletion( TRUE );
+ pathCombo = new TQComboBox( true, toolbar );
+ pathCombo->setAutoCompletion( true );
toolbar->setStretchableWidget( pathCombo );
connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT ( changePath( const TQString & ) ) );
@@ -123,13 +123,13 @@ void FileMainWindow::setup()
connect( fileview, TQ_SIGNAL( readDirDone() ),
this, TQ_SLOT( slotReadDirDone() ) );
- setDockEnabled( DockLeft, FALSE );
- setDockEnabled( DockRight, FALSE );
+ setDockEnabled( DockLeft, false );
+ setDockEnabled( DockRight, false );
label = new TQLabel( statusBar() );
- statusBar()->addWidget( label, 2, TRUE );
+ statusBar()->addWidget( label, 2, true );
progress = new TQProgressBar( statusBar() );
- statusBar()->addWidget( progress, 1, TRUE );
+ statusBar()->addWidget( progress, 1, true );
connect( fileview, TQ_SIGNAL( enableUp() ),
this, TQ_SLOT( enableUp() ) );
@@ -145,10 +145,10 @@ void FileMainWindow::setPathCombo()
{
TQString dir = caption();
int i = 0;
- bool found = FALSE;
+ bool found = false;
for ( i = 0; i < pathCombo->count(); ++i ) {
if ( pathCombo->text( i ) == dir) {
- found = TRUE;
+ found = true;
break;
}
}
@@ -209,20 +209,20 @@ void FileMainWindow::changePath( const TQString &path )
void FileMainWindow::enableUp()
{
- upButton->setEnabled( TRUE );
+ upButton->setEnabled( true );
}
void FileMainWindow::disableUp()
{
- upButton->setEnabled( FALSE );
+ upButton->setEnabled( false );
}
void FileMainWindow::enableMkdir()
{
- mkdirButton->setEnabled( TRUE );
+ mkdirButton->setEnabled( true );
}
void FileMainWindow::disableMkdir()
{
- mkdirButton->setEnabled( FALSE );
+ mkdirButton->setEnabled( false );
}
diff --git a/examples/fileiconview/qfileiconview.cpp b/examples/fileiconview/qfileiconview.cpp
index e684b90b0..26244d7a6 100644
--- a/examples/fileiconview/qfileiconview.cpp
+++ b/examples/fileiconview/qfileiconview.cpp
@@ -307,7 +307,7 @@ void TQtFileIconDrag::append( const TQIconDragItem &item, const TQRect &pr,
TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *fi )
: TQIconViewItem( parent, fi->fileName() ), itemFileName( fi->filePath() ),
- itemFileInfo( fi ), checkSetText( FALSE )
+ itemFileInfo( fi ), checkSetText( false )
{
vm = TQtFileIconView::Large;
@@ -322,9 +322,9 @@ TQtFileIconViewItem::TQtFileIconViewItem( TQtFileIconView *parent, TQFileInfo *f
if ( itemFileInfo->fileName() == "." ||
itemFileInfo->fileName() == ".." )
- setRenameEnabled( FALSE );
+ setRenameEnabled( false );
- checkSetText = TRUE;
+ checkSetText = true;
TQObject::connect( &timer, TQ_SIGNAL( timeout() ),
iconView(), TQ_SLOT( openFolder() ) );
@@ -334,7 +334,7 @@ void TQtFileIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
{
if ( itemFileInfo->isSymLink() ) {
TQFont f( p->font() );
- f.setItalic( TRUE );
+ f.setItalic( true );
p->setFont( f );
}
@@ -394,7 +394,7 @@ void TQtFileIconViewItem::setText( const TQString &text )
return;
TQDir dir( itemFileInfo->dir() );
if ( dir.rename( itemFileInfo->fileName(), text ) ) {
- itemFileName = itemFileInfo->dirPath( TRUE ) + "/" + text;
+ itemFileName = itemFileInfo->dirPath( true ) + "/" + text;
delete itemFileInfo;
itemFileInfo = new TQFileInfo( itemFileName );
TQIconViewItem::setText( text );
@@ -408,9 +408,9 @@ bool TQtFileIconViewItem::acceptDrop( const TQMimeSource *e ) const
{
if ( type() == Dir && e->provides( "text/uri-list" ) &&
dropEnabled() )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void TQtFileIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & )
@@ -496,7 +496,7 @@ TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const c
setGridX( 75 );
setResizeMode( Adjust );
- setWordWrapIconText( FALSE );
+ setWordWrapIconText( false );
connect( this, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ),
this, TQ_SLOT( itemDoubleClicked( TQIconViewItem * ) ) );
@@ -510,8 +510,8 @@ TQtFileIconView::TQtFileIconView( const TQString &dir, TQWidget *parent, const c
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( Auto );
- setAutoArrange( TRUE );
- setSorting( TRUE );
+ setAutoArrange( true );
+ setSorting( true );
openItem = 0;
}
@@ -542,22 +542,22 @@ void TQtFileIconView::setDirectory( const TQDir &dir )
void TQtFileIconView::newDirectory()
{
- setAutoArrange( FALSE );
- selectAll( FALSE );
+ setAutoArrange( false );
+ selectAll( false );
if ( viewDir.mkdir( TQString( "New Folder %1" ).arg( ++newFolderNum ) ) ) {
TQFileInfo *fi = new TQFileInfo( viewDir, TQString( "New Folder %1" ).arg( newFolderNum ) );
TQtFileIconViewItem *item = new TQtFileIconViewItem( this, new TQFileInfo( *fi ) );
item->setKey( TQString( "000000%1" ).arg( fi->fileName() ) );
delete fi;
- repaintContents( contentsX(), contentsY(), contentsWidth(), contentsHeight(), FALSE );
+ repaintContents( contentsX(), contentsY(), contentsWidth(), contentsHeight(), false );
ensureItemVisible( item );
- item->setSelected( TRUE, TRUE );
+ item->setSelected( true, true );
setCurrentItem( item );
repaintItem( item );
tqApp->processEvents();
item->rename();
}
- setAutoArrange( TRUE );
+ setAutoArrange( true );
}
TQDir TQtFileIconView::currentDir()
@@ -569,22 +569,22 @@ static bool isRoot( const TQString &s )
{
#if defined(Q_OS_UNIX)
if ( s == "/" )
- return TRUE;
+ return true;
#elif defined(Q_OS_WIN32)
TQString p = s;
if ( p.length() == 3 &&
p.right( 2 ) == ":/" )
- return TRUE;
+ return true;
if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) {
int slashes = p.contains( '/' );
if ( slashes <= 3 )
- return TRUE;
+ return true;
if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' )
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
void TQtFileIconView::readDir( const TQDir &dir )
@@ -607,7 +607,7 @@ void TQtFileIconView::readDir( const TQDir &dir )
TQFileInfoListIterator it( *filist );
TQFileInfo *fi;
- bool allowRename = FALSE, allowRenameSet = FALSE;
+ bool allowRename = false, allowRenameSet = false;
while ( ( fi = it.current() ) != 0 ) {
++it;
if ( fi && fi->fileName() == ".." && ( fi->dirPath() == "/" || fi->dirPath().isEmpty() ) )
@@ -621,13 +621,13 @@ void TQtFileIconView::readDir( const TQDir &dir )
if ( !allowRenameSet ) {
if ( !TQFileInfo( fi->absFilePath() ).isWritable() ||
item->text() == "." || item->text() == ".." )
- allowRename = FALSE;
+ allowRename = false;
else
- allowRename = TRUE;
+ allowRename = true;
if ( item->text() == "." || item->text() == ".." )
- allowRenameSet = FALSE;
+ allowRenameSet = false;
else
- allowRenameSet = TRUE;
+ allowRenameSet = true;
}
item->setRenameEnabled( allowRename );
}
@@ -669,11 +669,11 @@ TQDragObject *TQtFileIconView::dragObject()
TQIconDragItem id;
id.setData( TQCString( item->filename() ) );
drag->append( id,
- TQRect( item->pixmapRect( FALSE ).x() - orig.x(),
- item->pixmapRect( FALSE ).y() - orig.y(),
+ TQRect( item->pixmapRect( false ).x() - orig.x(),
+ item->pixmapRect( false ).y() - orig.y(),
item->pixmapRect().width(), item->pixmapRect().height() ),
- TQRect( item->textRect( FALSE ).x() - orig.x(),
- item->textRect( FALSE ).y() - orig.y(),
+ TQRect( item->textRect( false ).x() - orig.x(),
+ item->textRect( false ).y() - orig.y(),
item->textRect().width(), item->textRect().height() ),
TQString( item->filename() ) );
}
@@ -757,22 +757,22 @@ void TQtFileIconView::flowSouth()
void TQtFileIconView::sortAscending()
{
- sort( TRUE );
+ sort( true );
}
void TQtFileIconView::sortDescending()
{
- sort( FALSE );
+ sort( false );
}
void TQtFileIconView::itemTextTruncate()
{
- setWordWrapIconText( FALSE );
+ setWordWrapIconText( false );
}
void TQtFileIconView::itemTextWordWrap()
{
- setWordWrapIconText( TRUE );
+ setWordWrapIconText( true );
}
void TQtFileIconView::slotRightPressed( TQIconViewItem *item )
@@ -797,7 +797,7 @@ void TQtFileIconView::slotRightPressed( TQIconViewItem *item )
menu.insertItem( "Sort &ascending", this, TQ_SLOT( sortAscending() ) );
menu.insertItem( "Sort &descending", this, TQ_SLOT( sortDescending() ) );
- menu.setMouseTracking( TRUE );
+ menu.setMouseTracking( true );
menu.exec( TQCursor::pos() );
} else { // on item
TQPopupMenu menu( this );
@@ -805,7 +805,7 @@ void TQtFileIconView::slotRightPressed( TQIconViewItem *item )
int RENAME_ITEM = menu.insertItem( "Rename Item" );
int REMOVE_ITEM = menu.insertItem( "Remove Item" );
- menu.setMouseTracking( TRUE );
+ menu.setMouseTracking( true );
int id = menu.exec( TQCursor::pos() );
if ( id == -1 )
diff --git a/examples/fileiconview/qfileiconview.h b/examples/fileiconview/qfileiconview.h
index 898f26bf9..df6b1219c 100644
--- a/examples/fileiconview/qfileiconview.h
+++ b/examples/fileiconview/qfileiconview.h
@@ -97,7 +97,7 @@ protected slots:
void sortAscending();
void sortDescending();
void arrangeItemsInGrid() {
- TQIconView::arrangeItemsInGrid( TRUE );
+ TQIconView::arrangeItemsInGrid( true );
}
void slotRightPressed( TQIconViewItem *item );
diff --git a/examples/fonts/simple-qfont-demo/viewer.cpp b/examples/fonts/simple-qfont-demo/viewer.cpp
index 2e60808c5..dbf4f436c 100644
--- a/examples/fonts/simple-qfont-demo/viewer.cpp
+++ b/examples/fonts/simple-qfont-demo/viewer.cpp
@@ -39,7 +39,7 @@ Viewer::Viewer()
italicsButton = new TQPushButton( "Italics", this,
"pushbutton3" );
- italicsButton->setFont( TQFont( "lucida", 12, TQFont::Bold, TRUE ) );
+ italicsButton->setFont( TQFont( "lucida", 12, TQFont::Bold, true ) );
connect( italicsButton, TQ_SIGNAL( clicked() ),
this, TQ_SLOT( setItalics() ) );
@@ -52,7 +52,7 @@ void Viewer::setDefault()
font.setPointSize( 24 );
font.setWeight( TQFont::Bold );
- font.setUnderline( TRUE );
+ font.setUnderline( true );
greetings->setFont( font );
@@ -73,7 +73,7 @@ void Viewer::setItalics()
TQFont font( "Tokyo" );
font.setPointSize( 32 );
font.setWeight( TQFont::Bold );
- font.setItalic( TRUE );
+ font.setItalic( true );
greetings->setFont( font );
diff --git a/examples/forever/forever.cpp b/examples/forever/forever.cpp
index 24e5af910..ff2074e12 100644
--- a/examples/forever/forever.cpp
+++ b/examples/forever/forever.cpp
@@ -77,7 +77,7 @@ void Forever::paintEvent( TQPaintEvent * )
void Forever::timerEvent( TQTimerEvent * )
{
for ( int i=0; i<100; i++ ) {
- repaint( FALSE ); // repaint, don't erase
+ repaint( false ); // repaint, don't erase
rectangles++;
}
}
diff --git a/examples/hello/hello.cpp b/examples/hello/hello.cpp
index a1f5f9edb..d2079b2ca 100644
--- a/examples/hello/hello.cpp
+++ b/examples/hello/hello.cpp
@@ -36,7 +36,7 @@ Hello::Hello( const char *text, TQWidget *parent, const char *name )
void Hello::animate()
{
b = (b + 1) & 15;
- repaint( FALSE );
+ repaint( false );
}
diff --git a/examples/helpdemo/helpdemo.cpp b/examples/helpdemo/helpdemo.cpp
index 88ed7cb94..c0b11e434 100644
--- a/examples/helpdemo/helpdemo.cpp
+++ b/examples/helpdemo/helpdemo.cpp
@@ -33,7 +33,7 @@ HelpDemo::HelpDemo( TQWidget *parent, const char *name )
connect( assistant, TQ_SIGNAL(assistantClosed()), this, TQ_SLOT(assistantClosed()));
connect( assistant, TQ_SIGNAL(error(const TQString&)),
this, TQ_SLOT(showAssistantErrors(const TQString&)) );
- closeTQAButton->setEnabled(FALSE);
+ closeTQAButton->setEnabled(false);
}
HelpDemo::~HelpDemo()
@@ -108,12 +108,12 @@ void HelpDemo::showAssistantErrors( const TQString &err )
void HelpDemo::assistantOpened()
{
- closeTQAButton->setEnabled( TRUE );
- openTQAButton->setEnabled( FALSE );
+ closeTQAButton->setEnabled( true );
+ openTQAButton->setEnabled( false );
}
void HelpDemo::assistantClosed()
{
- closeTQAButton->setEnabled( FALSE );
- openTQAButton->setEnabled( TRUE );
+ closeTQAButton->setEnabled( false );
+ openTQAButton->setEnabled( true );
}
diff --git a/examples/helpsystem/whatsthis.cpp b/examples/helpsystem/whatsthis.cpp
index 020c59199..7c96e7e3c 100644
--- a/examples/helpsystem/whatsthis.cpp
+++ b/examples/helpsystem/whatsthis.cpp
@@ -29,7 +29,7 @@ bool WhatsThis::clicked( const TQString &link )
if ( !link.isEmpty() )
emit linkClicked( link );
- return TRUE;
+ return true;
}
HeaderWhatsThis::HeaderWhatsThis( TQHeader *h )
diff --git a/examples/helpviewer/helpwindow.cpp b/examples/helpviewer/helpwindow.cpp
index 140a9333f..2169e8ca7 100644
--- a/examples/helpviewer/helpwindow.cpp
+++ b/examples/helpviewer/helpwindow.cpp
@@ -110,8 +110,8 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
menuBar()->insertSeparator();
menuBar()->insertItem( tr("&Help"), help );
- menuBar()->setItemEnabled( forwardId, FALSE);
- menuBar()->setItemEnabled( backwardId, FALSE);
+ menuBar()->setItemEnabled( forwardId, false);
+ menuBar()->setItemEnabled( backwardId, false);
connect( browser, TQ_SIGNAL( backwardAvailable( bool ) ),
this, TQ_SLOT( setBackwardAvailable( bool ) ) );
connect( browser, TQ_SIGNAL( forwardAvailable( bool ) ),
@@ -124,21 +124,21 @@ HelpWindow::HelpWindow( const TQString& home_, const TQString& _path,
button = new TQToolButton( icon_back, tr("Backward"), "", browser, TQ_SLOT(backward()), toolbar );
connect( browser, TQ_SIGNAL( backwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) );
- button->setEnabled( FALSE );
+ button->setEnabled( false );
button = new TQToolButton( icon_forward, tr("Forward"), "", browser, TQ_SLOT(forward()), toolbar );
connect( browser, TQ_SIGNAL( forwardAvailable(bool) ), button, TQ_SLOT( setEnabled(bool) ) );
- button->setEnabled( FALSE );
+ button->setEnabled( false );
button = new TQToolButton( icon_home, tr("Home"), "", browser, TQ_SLOT(home()), toolbar );
toolbar->addSeparator();
- pathCombo = new TQComboBox( TRUE, toolbar );
+ pathCombo = new TQComboBox( true, toolbar );
connect( pathCombo, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT( pathSelected( const TQString & ) ) );
toolbar->setStretchableWidget( pathCombo );
- setRightJustification( TRUE );
- setDockEnabled( DockLeft, FALSE );
- setDockEnabled( DockRight, FALSE );
+ setRightJustification( true );
+ setDockEnabled( DockLeft, false );
+ setDockEnabled( DockRight, false );
pathCombo->insertItem( home_ );
browser->setFocus();
@@ -165,11 +165,11 @@ void HelpWindow::sourceChanged( const TQString& url )
setCaption( "TQt Example - Helpviewer - " + browser->documentTitle() ) ;
if ( !url.isEmpty() && pathCombo ) {
- bool exists = FALSE;
+ bool exists = false;
int i;
for ( i = 0; i < pathCombo->count(); ++i ) {
if ( pathCombo->text( i ) == url ) {
- exists = TRUE;
+ exists = true;
break;
}
}
@@ -234,7 +234,7 @@ void HelpWindow::print()
{
#ifndef TQT_NO_PRINTER
TQPrinter printer( TQPrinter::HighResolution );
- printer.setFullPage(TRUE);
+ printer.setFullPage(true);
if ( printer.setup( this ) ) {
TQPainter p( &printer );
if( !p.isActive() ) // starting printing failed
@@ -261,7 +261,7 @@ void HelpWindow::print()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
diff --git a/examples/i18n/main.cpp b/examples/i18n/main.cpp
index 8e8e8661a..80cf7be70 100644
--- a/examples/i18n/main.cpp
+++ b/examples/i18n/main.cpp
@@ -30,11 +30,11 @@
class TQVDialog : public TQDialog {
public:
- TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=FALSE,
+ TQVDialog(TQWidget *parent=0, const char *name=0, bool modal=false,
WFlags f=0) : TQDialog(parent,name,modal,f)
{
TQVBoxLayout* vb = new TQVBoxLayout(this,8);
- vb->setAutoAdd(TRUE);
+ vb->setAutoAdd(true);
hb = 0;
sm = new TQSignalMapper(this);
connect(sm,TQ_SIGNAL(mapped(int)),this,TQ_SLOT(done(int)));
@@ -110,7 +110,7 @@ int main( int argc, char** argv )
lang = argv[1];
if ( argc != 2 || lang == "all" ) {
- TQVDialog dlg(0,0,TRUE);
+ TQVDialog dlg(0,0,true);
TQCheckBox* qmb[sizeof(qm)/sizeof(qm[0])];
int r;
if ( lang == "all" ) {
@@ -162,7 +162,7 @@ int main( int argc, char** argv )
}
#ifdef USE_I18N_FONT
- memorymanager->savePrerenderedFont(font.handle(),FALSE);
+ memorymanager->savePrerenderedFont(font.handle(),false);
#endif
// While we run "all", kill them all
diff --git a/examples/iconview/main.cpp b/examples/iconview/main.cpp
index f7ed6eeb8..6f4c8e535 100644
--- a/examples/iconview/main.cpp
+++ b/examples/iconview/main.cpp
@@ -55,7 +55,7 @@ int main( int argc, char **argv )
for ( unsigned int i = 0; i < 3000; i++ ) {
TQIconViewItem *item = new TQIconViewItem( &qiconview, TQString( "Item %1" ).arg( i + 1 ) );
- item->setRenameEnabled( TRUE );
+ item->setRenameEnabled( true );
}
qiconview.setCaption( "TQt Example - Iconview" );
diff --git a/examples/iconview/simple_dd/main.cpp b/examples/iconview/simple_dd/main.cpp
index 16d3b53c5..e638bcdc3 100644
--- a/examples/iconview/simple_dd/main.cpp
+++ b/examples/iconview/simple_dd/main.cpp
@@ -78,8 +78,8 @@ const char* green_icon[]={
DDListBox::DDListBox( TQWidget * parent, const char * name, WFlags f ) :
TQListBox( parent, name, f )
{
- setAcceptDrops( TRUE );
- dragging = FALSE;
+ setAcceptDrops( true );
+ dragging = false;
}
@@ -102,7 +102,7 @@ void DDListBox::dropEvent( TQDropEvent *evt )
void DDListBox::mousePressEvent( TQMouseEvent *evt )
{
TQListBox::mousePressEvent( evt );
- dragging = TRUE;
+ dragging = true;
}
@@ -111,7 +111,7 @@ void DDListBox::mouseMoveEvent( TQMouseEvent * )
if ( dragging ) {
TQDragObject *d = new TQTextDrag( currentText(), this );
d->dragCopy(); // do NOT delete d.
- dragging = FALSE;
+ dragging = false;
}
}
@@ -122,8 +122,8 @@ void DDListBox::mouseMoveEvent( TQMouseEvent * )
bool DDIconViewItem::acceptDrop( const TQMimeSource *mime ) const
{
if ( mime->provides( "text/plain" ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
@@ -149,7 +149,7 @@ void DDIconView::slotNewItem( TQDropEvent *evt, const TQValueList<TQIconDragItem
if ( TQTextDrag::decode( evt, label ) ) {
DDIconViewItem *item = new DDIconViewItem( this, label );
- item->setRenameEnabled( TRUE );
+ item->setRenameEnabled( true );
}
}
@@ -175,11 +175,11 @@ int main( int argc, char *argv[] )
// Populate the TQIconView with icons
DDIconViewItem *item;
item = new DDIconViewItem( iv, "Red", TQPixmap( red_icon ) );
- item->setRenameEnabled( TRUE );
+ item->setRenameEnabled( true );
item = new DDIconViewItem( iv, "Green", TQPixmap( green_icon ) );
- item->setRenameEnabled( TRUE );
+ item->setRenameEnabled( true );
item = new DDIconViewItem( iv, "Blue", TQPixmap( blue_icon ) );
- item->setRenameEnabled( TRUE );
+ item->setRenameEnabled( true );
return app.exec();
}
diff --git a/examples/life/life.cpp b/examples/life/life.cpp
index c86340a40..a9c8b0a07 100644
--- a/examples/life/life.cpp
+++ b/examples/life/life.cpp
@@ -41,14 +41,14 @@ void LifeWidget::clear()
for ( int t = 0; t < 2; t++ )
for ( int i = 0; i < MAXSIZE + 2; i++ )
for ( int j = 0; j < MAXSIZE + 2; j++ )
- cells[t][i][j] = FALSE;
+ cells[t][i][j] = false;
repaint();
}
// We assume that the size will never be beyond the maximum size set
-// this is not in general TRUE, but in practice it's good enough for
+// this is not in general true, but in practice it's good enough for
// this program
void LifeWidget::resizeEvent( TQResizeEvent * e )
@@ -62,8 +62,8 @@ void LifeWidget::setPoint( int i, int j )
{
if ( i < 1 || i > maxi || j < 1 || j > maxi )
return;
- cells[current][i][j] = TRUE;
- repaint( index2pos(i), index2pos(j), SCALE, SCALE, FALSE );
+ cells[current][i][j] = true;
+ repaint( index2pos(i), index2pos(j), SCALE, SCALE, false );
}
@@ -106,7 +106,7 @@ void LifeWidget::nextGeneration()
}
}
current = !current;
- repaint( FALSE ); // repaint without erase
+ repaint( false ); // repaint without erase
}
diff --git a/examples/life/lifedlg.cpp b/examples/life/lifedlg.cpp
index c24f7d508..1d4142436 100644
--- a/examples/life/lifedlg.cpp
+++ b/examples/life/lifedlg.cpp
@@ -61,7 +61,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
connect( timer, TQ_SIGNAL(timeout()), life, TQ_SLOT(nextGeneration()) );
pb = new TQPushButton( "Pause", this );
- pb->setToggleButton( TRUE );
+ pb->setToggleButton( true );
connect( pb, TQ_SIGNAL(toggled(bool)), timer, TQ_SLOT(pause(bool)) );
pb->resize( pb->sizeHint().width(), 25 );
pb->move( width() - SIDEBORDER - pb->width(), SIDEBORDER );
@@ -115,7 +115,7 @@ LifeDialog::LifeDialog( int scale, TQWidget * parent, const char * name )
cb->insertItem( "Sym Puffer " );
cb->insertItem( "], Near Ship, Pi Heptomino " );
cb->insertItem( "R Pentomino " );
- cb->setAutoResize( FALSE );
+ cb->setAutoResize( false );
cb->setCurrentItem( sel );
cb->show();
connect( cb, TQ_SIGNAL(activated(int)), TQ_SLOT(getPattern(int)) );
diff --git a/examples/lineedits/lineedits.cpp b/examples/lineedits/lineedits.cpp
index 6e778c62d..404b03341 100644
--- a/examples/lineedits/lineedits.cpp
+++ b/examples/lineedits/lineedits.cpp
@@ -38,7 +38,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name )
row1->addWidget( label );
// Create a Combobox with three items...
- combo1 = new TQComboBox( FALSE, this );
+ combo1 = new TQComboBox( false, this );
row1->addWidget( combo1 );
combo1->insertItem( "Normal" );
combo1->insertItem( "Password" );
@@ -60,7 +60,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name )
row2->addWidget( label );
// A second Combobox with again three items...
- combo2 = new TQComboBox( FALSE, this );
+ combo2 = new TQComboBox( false, this );
row2->addWidget( combo2 );
combo2->insertItem( "No Validator" );
combo2->insertItem( "Integer Validator" );
@@ -81,7 +81,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name )
row3->addWidget( label );
// A combo box for setting alignment
- combo3 = new TQComboBox( FALSE, this );
+ combo3 = new TQComboBox( false, this );
row3->addWidget( combo3 );
combo3->insertItem( "Left" );
combo3->insertItem( "Centered" );
@@ -102,7 +102,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name )
row4->addWidget( label );
// A combo box for choosing an input mask
- combo4 = new TQComboBox( FALSE, this );
+ combo4 = new TQComboBox( false, this );
row4->addWidget( combo4 );
combo4->insertItem( "No mask" );
combo4->insertItem( "Phone number" );
@@ -126,7 +126,7 @@ LineEdits::LineEdits( TQWidget *parent, const char *name )
(void)new TQLabel( "Read-Only: ", row5 );
// A combo box for setting alignment
- combo5 = new TQComboBox( FALSE, row5 );
+ combo5 = new TQComboBox( false, row5 );
combo5->insertItem( "False" );
combo5->insertItem( "True" );
// ...and again the activated() TQ_SIGNAL gets connected with a TQ_SLOT
@@ -260,10 +260,10 @@ void LineEdits::slotReadOnlyChanged( int i )
{
switch ( i ) {
case 0:
- lined5->setReadOnly( FALSE );
+ lined5->setReadOnly( false );
break;
case 1:
- lined5->setReadOnly( TRUE );
+ lined5->setReadOnly( true );
break;
}
diff --git a/examples/listbox/listbox.cpp b/examples/listbox/listbox.cpp
index 6f0a018b6..32eec741d 100644
--- a/examples/listbox/listbox.cpp
+++ b/examples/listbox/listbox.cpp
@@ -42,7 +42,7 @@ ListBoxDemo::ListBoxDemo()
this );
bg->insert( b );
v->addWidget( b );
- b->setChecked( TRUE );
+ b->setChecked( true );
connect( b, TQ_SIGNAL(clicked()), this, TQ_SLOT(setNumCols()) );
TQHBoxLayout * h = new TQHBoxLayout;
v->addLayout( h );
@@ -75,7 +75,7 @@ ListBoxDemo::ListBoxDemo()
h->addSpacing( 100 );
h->addWidget( new TQLabel( "Rows:", this ) );
rows = new TQSpinBox( this );
- rows->setEnabled( FALSE );
+ rows->setEnabled( false );
h->addWidget( rows );
v->addSpacing( 12 );
@@ -90,7 +90,7 @@ ListBoxDemo::ListBoxDemo()
v->addSpacing( 12 );
TQCheckBox * cb = new TQCheckBox( "Variable-height rows", this );
- cb->setChecked( TRUE );
+ cb->setChecked( true );
connect( cb, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setVariableHeight(bool)) );
v->addWidget( cb );
v->addSpacing( 6 );
@@ -135,32 +135,32 @@ ListBoxDemo::~ListBoxDemo()
void ListBoxDemo::setNumRows()
{
- columns->setEnabled( FALSE );
- rows->setEnabled( TRUE );
+ columns->setEnabled( false );
+ rows->setEnabled( true );
l->setRowMode( rows->value() );
}
void ListBoxDemo::setNumCols()
{
- columns->setEnabled( TRUE );
- rows->setEnabled( FALSE );
+ columns->setEnabled( true );
+ rows->setEnabled( false );
l->setColumnMode( columns->value() );
}
void ListBoxDemo::setRowsByHeight()
{
- columns->setEnabled( FALSE );
- rows->setEnabled( FALSE );
+ columns->setEnabled( false );
+ rows->setEnabled( false );
l->setRowMode( TQListBox::FitToHeight );
}
void ListBoxDemo::setColsByWidth()
{
- columns->setEnabled( FALSE );
- rows->setEnabled( FALSE );
+ columns->setEnabled( false );
+ rows->setEnabled( false );
l->setColumnMode( TQListBox::FitToWidth );
}
@@ -184,10 +184,10 @@ void ListBoxDemo::setMultiSelection( bool b )
void ListBoxDemo::sortAscending()
{
- l->sort( TRUE );
+ l->sort( true );
}
void ListBoxDemo::sortDescending()
{
- l->sort( FALSE );
+ l->sort( false );
}
diff --git a/examples/listboxcombo/listboxcombo.cpp b/examples/listboxcombo/listboxcombo.cpp
index cf06c806d..651360294 100644
--- a/examples/listboxcombo/listboxcombo.cpp
+++ b/examples/listboxcombo/listboxcombo.cpp
@@ -27,7 +27,7 @@ public:
MyListBoxItem()
: TQListBoxItem()
{
- setCustomHighlighting( TRUE );
+ setCustomHighlighting( true );
}
protected:
@@ -98,7 +98,7 @@ ListBoxCombo::ListBoxCombo( TQWidget *parent, const char *name )
box1->setSpacing( 5 );
// Create a non-editable Combobox and a label below...
- TQComboBox *cb1 = new TQComboBox( FALSE, box1 );
+ TQComboBox *cb1 = new TQComboBox( false, box1 );
label1 = new TQLabel( "Current Item: Combobox Item 0", box1 );
label1->setMaximumHeight( label1->sizeHint().height() * 2 );
label1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
@@ -116,7 +116,7 @@ ListBoxCombo::ListBoxCombo( TQWidget *parent, const char *name )
box2->setSpacing( 5 );
// Create an editable Combobox and a label below...
- TQComboBox *cb2 = new TQComboBox( TRUE, box2 );
+ TQComboBox *cb2 = new TQComboBox( true, box2 );
label2 = new TQLabel( "Current Item: Combobox Item 0", box2 );
label2->setMaximumHeight( label2->sizeHint().height() * 2 );
label2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
diff --git a/examples/listviews/listviews.cpp b/examples/listviews/listviews.cpp
index 66680f852..b21b50fb9 100644
--- a/examples/listviews/listviews.cpp
+++ b/examples/listviews/listviews.cpp
@@ -40,7 +40,7 @@ MessageHeader &MessageHeader::operator=( const MessageHeader &mh )
Folder::Folder( Folder *parent, const TQString &name )
: TQObject( parent, name ), fName( name )
{
- lstMessages.setAutoDelete( TRUE );
+ lstMessages.setAutoDelete( true );
}
// -----------------------------------------------------------------
@@ -103,16 +103,16 @@ void MessageListItem::paintCell( TQPainter *p, const TQColorGroup &cg,
ListViews::ListViews( TQWidget *parent, const char *name )
: TQSplitter( TQt::Horizontal, parent, name )
{
- lstFolders.setAutoDelete( TRUE );
+ lstFolders.setAutoDelete( true );
folders = new TQListView( this );
- folders->header()->setClickEnabled( FALSE );
+ folders->header()->setClickEnabled( false );
folders->addColumn( "Folder" );
initFolders();
setupFolders();
- folders->setRootIsDecorated( TRUE );
+ folders->setRootIsDecorated( true );
setResizeMode( folders, TQSplitter::KeepSize );
TQSplitter *vsplitter = new TQSplitter( TQt::Vertical, this );
@@ -122,8 +122,8 @@ ListViews::ListViews( TQWidget *parent, const char *name )
messages->addColumn( "Subject" );
messages->addColumn( "Date" );
messages->setColumnAlignment( 1, TQt::AlignRight );
- messages->setAllColumnsShowFocus( TRUE );
- messages->setShowSortIndicator( TRUE );
+ messages->setAllColumnsShowFocus( true );
+ messages->setShowSortIndicator( true );
menu = new TQPopupMenu( messages );
for( int i = 1; i <= 10; i++ )
menu->insertItem( TQString( "Context Item %1" ).arg( i ) );
@@ -144,12 +144,12 @@ ListViews::ListViews( TQWidget *parent, const char *name )
messages->setSelectionMode( TQListView::Extended );
// some preparations
- folders->firstChild()->setOpen( TRUE );
- folders->firstChild()->firstChild()->setOpen( TRUE );
+ folders->firstChild()->setOpen( true );
+ folders->firstChild()->firstChild()->setOpen( true );
folders->setCurrentItem( folders->firstChild()->firstChild()->firstChild() );
- folders->setSelected( folders->firstChild()->firstChild()->firstChild(), TRUE );
+ folders->setSelected( folders->firstChild()->firstChild()->firstChild(), true );
- messages->setSelected( messages->firstChild(), TRUE );
+ messages->setSelected( messages->firstChild(), true );
messages->setCurrentItem( messages->firstChild() );
message->setMargin( 5 );
diff --git a/examples/mdi/application.cpp b/examples/mdi/application.cpp
index 5b91bdb58..ec9a905eb 100644
--- a/examples/mdi/application.cpp
+++ b/examples/mdi/application.cpp
@@ -57,7 +57,7 @@ ApplicationWindow::ApplicationWindow()
TQPixmap openIcon, saveIcon;
fileTools = new TQToolBar( this, "file operations" );
- addToolBar( fileTools, tr( "File Operations" ), DockTop, TRUE );
+ addToolBar( fileTools, tr( "File Operations" ), DockTop, true );
openIcon = TQPixmap( fileopen );
TQToolButton * fileOpen
@@ -110,7 +110,7 @@ ApplicationWindow::ApplicationWindow()
file->insertItem( "&Quit", tqApp, TQ_SLOT( closeAllWindows() ), CTRL+Key_Q );
windowsMenu = new TQPopupMenu( this );
- windowsMenu->setCheckable( TRUE );
+ windowsMenu->setCheckable( true );
connect( windowsMenu, TQ_SIGNAL( aboutToShow() ),
this, TQ_SLOT( windowsMenuAboutToShow() ) );
menuBar()->insertItem( "&Windows", windowsMenu );
@@ -127,7 +127,7 @@ ApplicationWindow::ApplicationWindow()
TQVBox* vb = new TQVBox( this );
vb->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
ws = new TQWorkspace( vb );
- ws->setScrollBarsEnabled( TRUE );
+ ws->setScrollBarsEnabled( true );
setCentralWidget( vb );
statusBar()->message( "Ready", 2000 );
@@ -222,9 +222,9 @@ void ApplicationWindow::windowsMenuAboutToShow()
int tileId = windowsMenu->insertItem("&Tile", ws, TQ_SLOT(tile() ) );
int horTileId = windowsMenu->insertItem("Tile &Horizontally", this, TQ_SLOT(tileHorizontal() ) );
if ( ws->windowList().isEmpty() ) {
- windowsMenu->setItemEnabled( cascadeId, FALSE );
- windowsMenu->setItemEnabled( tileId, FALSE );
- windowsMenu->setItemEnabled( horTileId, FALSE );
+ windowsMenu->setItemEnabled( cascadeId, false );
+ windowsMenu->setItemEnabled( tileId, false );
+ windowsMenu->setItemEnabled( horTileId, false );
}
windowsMenu->insertSeparator();
TQWidgetList windows = ws->windowList();
@@ -398,7 +398,7 @@ void MDIWindow::print( TQPrinter* printer)
int pageNo = 1;
if ( printer->setup(this) ) { // printer dialog
- printer->setFullPage( TRUE );
+ printer->setFullPage( true );
emit message( "Printing...", 0 );
TQPainter p;
if ( !p.begin( printer ) )
@@ -429,7 +429,7 @@ void MDIWindow::print( TQPrinter* printer)
emit message( msg, 0 );
printer->newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
diff --git a/examples/menu/menu.cpp b/examples/menu/menu.cpp
index 8997ddaae..097c25884 100644
--- a/examples/menu/menu.cpp
+++ b/examples/menu/menu.cpp
@@ -143,8 +143,8 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
TQ_CHECK_PTR( edit );
int undoID = edit->insertItem( "&Undo", this, TQ_SLOT(undo()) );
int redoID = edit->insertItem( "&Redo", this, TQ_SLOT(redo()) );
- edit->setItemEnabled( undoID, FALSE );
- edit->setItemEnabled( redoID, FALSE );
+ edit->setItemEnabled( undoID, false );
+ edit->setItemEnabled( redoID, false );
TQPopupMenu* options = new TQPopupMenu( this );
TQ_CHECK_PTR( options );
@@ -155,19 +155,19 @@ MenuExample::MenuExample( TQWidget *parent, const char *name )
options->polish(); // adjust system settings
TQFont f = options->font();
- f.setBold( TRUE );
+ f.setBold( true );
boldID = options->insertItem( new MyMenuItem( "Bold", f ) );
options->setAccel( CTRL+Key_B, boldID );
options->connectItem( boldID, this, TQ_SLOT(bold()) );
f = font();
- f.setUnderline( TRUE );
+ f.setUnderline( true );
underlineID = options->insertItem( new MyMenuItem( "Underline", f ) );
options->setAccel( CTRL+Key_U, underlineID );
options->connectItem( underlineID, this, TQ_SLOT(underline()) );
- isBold = FALSE;
- isUnderline = FALSE;
- options->setCheckable( TRUE );
+ isBold = false;
+ isUnderline = false;
+ options->setCheckable( true );
TQPopupMenu *help = new TQPopupMenu( this );
@@ -268,8 +268,8 @@ void MenuExample::redo()
void MenuExample::normal()
{
- isBold = FALSE;
- isUnderline = FALSE;
+ isBold = false;
+ isUnderline = false;
TQFont font;
label->setFont( font );
menu->setItemChecked( boldID, isBold );
diff --git a/examples/movies/main.cpp b/examples/movies/main.cpp
index 3fa2ec737..af1b9cf88 100644
--- a/examples/movies/main.cpp
+++ b/examples/movies/main.cpp
@@ -265,7 +265,7 @@ int main(int argc, char **argv)
if (argc > 1) {
// Commandline mode - show movies given on the command line
//
- bool gui=TRUE;
+ bool gui=true;
for (int arg=1; arg<argc; arg++) {
if ( TQString(argv[arg]) == "-i" )
gui = !gui;
diff --git a/examples/network/archivesearch/archivedialog.ui.h b/examples/network/archivesearch/archivedialog.ui.h
index 45c4553ee..e8580c398 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 ded8b2600..e5ab8663a 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 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;
diff --git a/examples/network/mail/composer.cpp b/examples/network/mail/composer.cpp
index 51f690126..52c23e492 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 833718ada..54cb6bb55 100644
--- a/examples/network/networkprotocol/nntp.cpp
+++ b/examples/network/networkprotocol/nntp.cpp
@@ -15,8 +15,8 @@
#include <ntqregexp.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 070b8a7cd..c16597556 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 4bd7b6423..2ccbf772e 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;
diff --git a/examples/opengl/gear/gear.cpp b/examples/opengl/gear/gear.cpp
index 0ceb2f6cb..91e086c0e 100644
--- a/examples/opengl/gear/gear.cpp
+++ b/examples/opengl/gear/gear.cpp
@@ -283,7 +283,7 @@ int main( int argc, char **argv )
}
if ( argc >= 2 ) {
- bool ok = TRUE;
+ bool ok = true;
timer_interval = TQString::fromLatin1( argv[1] ).toInt( &ok );
if ( !ok )
timer_interval = 10;
diff --git a/examples/opengl/glpixmap/globjwin.cpp b/examples/opengl/glpixmap/globjwin.cpp
index 11cb675a6..36ae04488 100644
--- a/examples/opengl/glpixmap/globjwin.cpp
+++ b/examples/opengl/glpixmap/globjwin.cpp
@@ -35,7 +35,7 @@ GLObjectWindow::GLObjectWindow( TQWidget* parent, const char* name )
{
// Create a menu
file = new TQPopupMenu( this );
- file->setCheckable( TRUE );
+ file->setCheckable( true );
file->insertItem( "Grab Frame Buffer", this, TQ_SLOT(grabFrameBuffer()) );
file->insertItem( "Render Pixmap", this, TQ_SLOT(makePixmap()) );
file->insertItem( "Render Pixmap Hidden", this, TQ_SLOT(makePixmapHidden()) );
@@ -146,7 +146,7 @@ void GLObjectWindow::makePixmapHidden()
// Make a TQGLWidget to draw the pixmap. This widget will not be shown.
GLBox* w = new GLBox( this, "temporary glwidget", c1 );
- bool success = FALSE;
+ bool success = false;
TQPixmap pm;
if ( w->isValid() ) {
@@ -160,7 +160,7 @@ void GLObjectWindow::makePixmapHidden()
pm = w->renderPixmap( sz.width(), sz.height() );
if ( !pm.isNull() )
- success = TRUE;
+ success = true;
}
if ( success ) {
@@ -197,11 +197,11 @@ void GLObjectWindow::useFixedPixmapSize()
{
if ( pmSz.isValid() ) {
pmSz = TQSize();
- file->setItemChecked( fixMenuItemId, FALSE );
+ file->setItemChecked( fixMenuItemId, false );
}
else {
pmSz = TQSize( 200, 200 );
- file->setItemChecked( fixMenuItemId, TRUE );
+ file->setItemChecked( fixMenuItemId, true );
}
}
diff --git a/examples/opengl/overlay/glteapots.cpp b/examples/opengl/overlay/glteapots.cpp
index 6d0d5b568..13996c0a6 100644
--- a/examples/opengl/overlay/glteapots.cpp
+++ b/examples/opengl/overlay/glteapots.cpp
@@ -71,7 +71,7 @@ GLTeapots::GLTeapots( TQWidget* parent, const char* name )
parent, name )
{
teapotList = 0;
- rubberOn = FALSE;
+ rubberOn = false;
}
/*!
@@ -288,7 +288,7 @@ void GLTeapots::mousePressEvent( TQMouseEvent* e )
{
rubberP1 = e->pos();
rubberP2 = rubberP1;
- rubberOn = TRUE;
+ rubberOn = true;
}
/*!
@@ -311,7 +311,7 @@ void GLTeapots::mouseMoveEvent( TQMouseEvent* e )
void GLTeapots::mouseReleaseEvent( TQMouseEvent* )
{
if ( rubberOn ) {
- rubberOn = FALSE;
+ rubberOn = false;
updateOverlayGL();
}
}
diff --git a/examples/opengl/overlay_x11/gearwidget.cpp b/examples/opengl/overlay_x11/gearwidget.cpp
index 9a1f4dd90..9ee642999 100644
--- a/examples/opengl/overlay_x11/gearwidget.cpp
+++ b/examples/opengl/overlay_x11/gearwidget.cpp
@@ -252,9 +252,9 @@ void GearWidget::paintGL()
{
tqDebug( "GearWidget: Doing GL rendering." );
#if defined (Q_GLX)
- static bool doneIt = FALSE;
+ static bool doneIt = false;
if ( !doneIt ) {
- doneIt = TRUE;
+ doneIt = true;
// Print out the Visual ID. Access to this will be made
// simpler in future versions of TQt!
XWindowAttributes a;
diff --git a/examples/opengl/overlay_x11/rubberbandwidget.cpp b/examples/opengl/overlay_x11/rubberbandwidget.cpp
index a11a81441..7f9f52165 100644
--- a/examples/opengl/overlay_x11/rubberbandwidget.cpp
+++ b/examples/opengl/overlay_x11/rubberbandwidget.cpp
@@ -19,7 +19,7 @@ RubberbandWidget::RubberbandWidget( TQColor transparentColor, TQWidget *parent,
: TQWidget( parent, name, f )
{
setBackgroundColor( transparentColor );
- on = FALSE;
+ on = false;
}
@@ -28,8 +28,8 @@ void RubberbandWidget::mousePressEvent( TQMouseEvent* e )
p1 = e->pos();
p2 = p1;
p3 = p1;
- on = TRUE;
- setMouseTracking( TRUE );
+ on = true;
+ setMouseTracking( true );
}
@@ -54,6 +54,6 @@ void RubberbandWidget::mouseReleaseEvent( TQMouseEvent* )
TQPainter p ( this );
p.eraseRect( rect() );
}
- on = FALSE;
- setMouseTracking( FALSE );
+ on = false;
+ setMouseTracking( false );
}
diff --git a/examples/opengl/texture/gltexobj.cpp b/examples/opengl/texture/gltexobj.cpp
index 78b0fcefb..fe4a382eb 100644
--- a/examples/opengl/texture/gltexobj.cpp
+++ b/examples/opengl/texture/gltexobj.cpp
@@ -33,10 +33,10 @@ GLTexobj::GLTexobj( TQWidget* parent, const char* name )
xRot = yRot = zRot = 0.0; // default object rotation
scale = 5.0; // default object scale
object = 0;
- animation = TRUE;
+ animation = true;
timer = new TQTimer( this );
connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(update()) );
- timer->start( redrawWait, TRUE );
+ timer->start( redrawWait, true );
}
@@ -74,7 +74,7 @@ void GLTexobj::paintGL()
if ( animation ) {
glFlush(); // Make sure everything is drawn before restarting timer
- timer->start( redrawWait, TRUE ); // Wait this many msecs before redraw
+ timer->start( redrawWait, true ); // Wait this many msecs before redraw
}
}
diff --git a/examples/popup/popup.cpp b/examples/popup/popup.cpp
index 25fd14b0a..a47996921 100644
--- a/examples/popup/popup.cpp
+++ b/examples/popup/popup.cpp
@@ -17,7 +17,7 @@ FancyPopup::FancyPopup( TQWidget* parent, const char* name ):
setAlignment( AlignCenter );
resize(150,100);
moves = 0;
- setMouseTracking( TRUE );
+ setMouseTracking( true );
}
void FancyPopup::mouseMoveEvent( TQMouseEvent * e){
diff --git a/examples/progress/progress.cpp b/examples/progress/progress.cpp
index 190f50de2..b951b0fc7 100644
--- a/examples/progress/progress.cpp
+++ b/examples/progress/progress.cpp
@@ -163,7 +163,7 @@ public:
cl_id = options->insertItem( "Custom label", this, TQ_SLOT(customLabel()) );
options->insertSeparator();
md_id = options->insertItem( "No minimum duration", this, TQ_SLOT(toggleMinimumDuration()) );
- options->setCheckable( TRUE );
+ options->setCheckable( true );
loopDriven();
defaultLabel();
@@ -179,34 +179,34 @@ public slots:
draw(drawItemRects(id));
}
- void stopDrawing() { got_stop = TRUE; }
+ void stopDrawing() { got_stop = true; }
void timerDriven()
{
- timer_driven = TRUE;
- options->setItemChecked( td_id, TRUE );
- options->setItemChecked( ld_id, FALSE );
+ timer_driven = true;
+ options->setItemChecked( td_id, true );
+ options->setItemChecked( ld_id, false );
}
void loopDriven()
{
- timer_driven = FALSE;
- options->setItemChecked( ld_id, TRUE );
- options->setItemChecked( td_id, FALSE );
+ timer_driven = false;
+ options->setItemChecked( ld_id, true );
+ options->setItemChecked( td_id, false );
}
void defaultLabel()
{
- default_label = TRUE;
- options->setItemChecked( dl_id, TRUE );
- options->setItemChecked( cl_id, FALSE );
+ default_label = true;
+ options->setItemChecked( dl_id, true );
+ options->setItemChecked( cl_id, false );
}
void customLabel()
{
- default_label = FALSE;
- options->setItemChecked( dl_id, FALSE );
- options->setItemChecked( cl_id, TRUE );
+ default_label = false;
+ options->setItemChecked( dl_id, false );
+ options->setItemChecked( cl_id, true );
}
void toggleMinimumDuration()
@@ -243,7 +243,7 @@ private:
pb->setProgress( pb->totalSteps() );
TQPainter p(this);
p.fillRect(0, 0, width(), height(), backgroundColor());
- enableDrawingItems(TRUE);
+ enableDrawingItems(true);
killTimers();
delete pb;
pb = 0;
@@ -277,15 +277,15 @@ private:
}
rects = n;
pb = newProgressDialog("Drawing rectangles.\n"
- "Using timer event.", n, FALSE);
+ "Using timer event.", n, false);
pb->setCaption("Please Wait");
connect(pb, TQ_SIGNAL(cancelled()), this, TQ_SLOT(stopDrawing()));
- enableDrawingItems(FALSE);
+ enableDrawingItems(false);
startTimer(0);
- got_stop = FALSE;
+ got_stop = false;
} else {
TQProgressDialog* lpb = newProgressDialog(
- "Drawing rectangles.\nUsing loop.", n, TRUE);
+ "Drawing rectangles.\nUsing loop.", n, true);
lpb->setCaption("Please Wait");
TQPainter p(this);
diff --git a/examples/progressbar/progressbar.cpp b/examples/progressbar/progressbar.cpp
index dfe2d70a7..c6178510b 100644
--- a/examples/progressbar/progressbar.cpp
+++ b/examples/progressbar/progressbar.cpp
@@ -29,7 +29,7 @@ ProgressBar::ProgressBar( TQWidget *parent, const char *name )
TQGridLayout* toplayout = new TQGridLayout( layout(), 2, 2, 5);
- setRadioButtonExclusive( TRUE );
+ setRadioButtonExclusive( true );
// insert three radiobuttons which the user can use
// to set the speed of the progress and two pushbuttons
@@ -64,7 +64,7 @@ ProgressBar::ProgressBar( TQWidget *parent, const char *name )
connect( &timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( slotTimeout() ) );
// Let's start with normal speed...
- normal->setChecked( TRUE );
+ normal->setChecked( true );
// some contraints
@@ -93,9 +93,9 @@ void ProgressBar::slotStart()
progress->setTotalSteps( 50 );
// disable the speed-radiobuttons
- slow->setEnabled( FALSE );
- normal->setEnabled( FALSE );
- fast->setEnabled( FALSE );
+ slow->setEnabled( false );
+ normal->setEnabled( false );
+ fast->setEnabled( false );
}
// If the progress is not running...
@@ -126,12 +126,12 @@ void ProgressBar::slotReset()
// rename the start/pause/continue button to Start...
start->setText( "&Start" );
// ...and enable this button
- start->setEnabled( TRUE );
+ start->setEnabled( true );
// enable the speed-radiobuttons
- slow->setEnabled( TRUE );
- normal->setEnabled( TRUE );
- fast->setEnabled( TRUE );
+ slow->setEnabled( true );
+ normal->setEnabled( true );
+ fast->setEnabled( true );
// reset the progressbar
progress->reset();
@@ -154,7 +154,7 @@ void ProgressBar::slotTimeout()
// ...rename the start/pause/continue button to Start...
start->setText( "&Start" );
// ...and disable it...
- start->setEnabled( FALSE );
+ start->setEnabled( false );
// ...and return
return;
}
diff --git a/examples/qdir/qdir.cpp b/examples/qdir/qdir.cpp
index b2cf108b0..251ef024e 100644
--- a/examples/qdir/qdir.cpp
+++ b/examples/qdir/qdir.cpp
@@ -94,7 +94,7 @@ void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
}
void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
@@ -109,7 +109,7 @@ Preview::Preview( TQWidget *parent )
: TQWidgetStack( parent )
{
normalText = new TQMultiLineEdit( this );
- normalText->setReadOnly( TRUE );
+ normalText->setReadOnly( true );
html = new TQTextView( this );
pixmap = new PixmapView( this );
raiseWidget( normalText );
@@ -183,15 +183,15 @@ void PreviewWidget::previewUrl( const TQUrl &u )
// ****************************************************************************************************
CustomFileDialog::CustomFileDialog()
- : TQFileDialog( 0, 0, TRUE )
+ : TQFileDialog( 0, 0, true )
{
setDir( "/" );
- dirView = new DirectoryView( this, 0, TRUE );
+ dirView = new DirectoryView( this, 0, true );
dirView->addColumn( "" );
dirView->header()->hide();
::Directory *root = new ::Directory( dirView, "/" );
- root->setOpen( TRUE );
+ root->setOpen( true );
dirView->setFixedWidth( 150 );
addLeftWidget( dirView );
@@ -220,7 +220,7 @@ CustomFileDialog::CustomFileDialog()
p->setPopup( bookmarkMenu );
- addToolButton( p, TRUE );
+ addToolButton( p, true );
connect( dirView, TQ_SIGNAL( folderSelected( const TQString & ) ),
this, TQ_SLOT( setDir2( const TQString & ) ) );
@@ -252,9 +252,9 @@ CustomFileDialog::~CustomFileDialog()
void CustomFileDialog::setDir2( const TQString &s )
{
- blockSignals( TRUE );
+ blockSignals( true );
setDir( s );
- blockSignals( FALSE );
+ blockSignals( false );
}
void CustomFileDialog::showEvent( TQShowEvent *e )
@@ -289,8 +289,8 @@ int main( int argc, char ** argv )
TQString start;
TQString filter;
TQString caption;
- bool preview = FALSE;
- bool custom = FALSE;
+ bool preview = false;
+ bool custom = false;
TQApplication a( argc, argv );
for (int i=1; i<argc; i++) {
TQString arg = argv[i];
@@ -303,9 +303,9 @@ int main( int argc, char ** argv )
else if ( arg == "-filter" )
filter = argv[++i];
else if ( arg == "-preview" )
- preview = TRUE;
+ preview = true;
else if ( arg == "-custom" )
- custom = TRUE;
+ custom = true;
else if ( arg[0] == '-' ) {
tqDebug("Usage: qdir [-any | -dir | -custom] [-preview] [-default f] {-filter f} [caption ...]\n"
" -any Get any filename, need not exist.\n"
@@ -333,10 +333,10 @@ int main( int argc, char ** argv )
? "Choose directory..." : "Choose file...";
if ( !custom ) {
- TQFileDialog fd( TQString::null, filter, 0, 0, TRUE );
+ TQFileDialog fd( TQString::null, filter, 0, 0, true );
fd.setMode( mode );
if ( preview ) {
- fd.setContentsPreviewEnabled( TRUE );
+ fd.setContentsPreviewEnabled( true );
PreviewWidget *pw = new PreviewWidget( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
diff --git a/examples/qmag/qmag.cpp b/examples/qmag/qmag.cpp
index b5705df6a..c89d686fb 100644
--- a/examples/qmag/qmag.cpp
+++ b/examples/qmag/qmag.cpp
@@ -57,7 +57,7 @@ private:
int yoffset; // pixels in addition to the actual picture
int z; // magnification factor
int r; // autorefresh rate (index into refreshrates)
- bool grabbing; // TRUE if qmag is currently grabbing
+ bool grabbing; // true if qmag is currently grabbing
int grabx, graby;
TQString multifn; // filename for multisave
};
@@ -87,12 +87,12 @@ MagWidget::MagWidget( TQWidget *parent, const char *name )
#ifdef COMPLEX_GUI
int w=0, x=0, n;
- zoom = new TQComboBox( FALSE, this );
+ zoom = new TQComboBox( false, this );
TQ_CHECK_PTR(zoom);
zoom->insertStrList( zoomfactors, 9 );
connect( zoom, TQ_SIGNAL(activated(int)), TQ_SLOT(setZoom(int)) );
- refresh = new TQComboBox( FALSE, this );
+ refresh = new TQComboBox( false, this );
TQ_CHECK_PTR(refresh);
refresh->insertStrList( refreshrates, 9 );
connect( refresh, TQ_SIGNAL(activated(int)), TQ_SLOT(setRefresh(int)) );
@@ -119,7 +119,7 @@ MagWidget::MagWidget( TQWidget *parent, const char *name )
10+saveButton->fontMetrics().width("Save"), 20 );
multiSaveButton = new TQPushButton( this );
- multiSaveButton->setToggleButton(TRUE);
+ multiSaveButton->setToggleButton(true);
TQ_CHECK_PTR(multiSaveButton);
connect( multiSaveButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(multiSave()) );
multiSaveButton->setText( "MultiSave" );
@@ -158,9 +158,9 @@ MagWidget::MagWidget( TQWidget *parent, const char *name )
#endif
grabx = graby = -1;
- grabbing = FALSE;
+ grabbing = false;
- setMouseTracking( TRUE ); // and do let me know what pixel I'm at, eh?
+ setMouseTracking( true ); // and do let me know what pixel I'm at, eh?
grabAround( TQPoint(grabx=tqApp->desktop()->width()/2, graby=tqApp->desktop()->height()/2) );
}
@@ -203,11 +203,11 @@ void MagWidget::multiSave()
multifn = ""; // stops saving
multifn = TQFileDialog::getSaveFileName();
if ( multifn.isEmpty() )
- multiSaveButton->setOn(FALSE);
+ multiSaveButton->setOn(false);
if ( !r )
p.save( multifn, "BMP" );
} else {
- multiSaveButton->setOn(FALSE);
+ multiSaveButton->setOn(false);
}
}
@@ -245,7 +245,7 @@ void MagWidget::grab()
pm = p.xForm( m );
if ( !multiSaveButton || !multiSaveButton->isOn() )
- repaint( FALSE ); // and finally repaint, flicker-free
+ repaint( false ); // and finally repaint, flicker-free
}
@@ -262,7 +262,7 @@ void MagWidget::paintEvent( TQPaintEvent * )
void MagWidget::mousePressEvent( TQMouseEvent *e )
{
if ( !grabbing ) { // prepare to grab...
- grabbing = TRUE;
+ grabbing = true;
killTimers();
grabMouse( crossCursor );
grabx = -1;
@@ -278,7 +278,7 @@ void MagWidget::mousePressEvent( TQMouseEvent *e )
void MagWidget::mouseReleaseEvent( TQMouseEvent * e )
{
if ( grabbing && grabx >= 0 && graby >= 0 ) {
- grabbing = FALSE;
+ grabbing = false;
grabAround(e->pos());
releaseMouse();
}
diff --git a/examples/qwerty/qwerty.cpp b/examples/qwerty/qwerty.cpp
index 28dbc48a9..61184447e 100644
--- a/examples/qwerty/qwerty.cpp
+++ b/examples/qwerty/qwerty.cpp
@@ -21,7 +21,7 @@
#include <ntqtextcodec.h>
-const bool no_writing = FALSE;
+const bool no_writing = false;
static TQPtrList<TQTextCodec> *codecList = 0;
@@ -68,7 +68,7 @@ Editor::Editor( TQWidget * parent , const char * name )
edit->insertSeparator();
edit->insertItem( "&Select Font" , this, TQ_SLOT(font()), ALT+Key_T );
#endif
- changed = FALSE;
+ changed = false;
e = new TQMultiLineEdit( this, "editor" );
connect( e, TQ_SIGNAL( textChanged() ), this, TQ_SLOT( textChanged() ) );
@@ -155,7 +155,7 @@ void Editor::load( const TQString& fileName, int code )
if ( !f.open( IO_ReadOnly ) )
return;
- e->setAutoUpdate( FALSE );
+ e->setAutoUpdate( false );
TQTextStream t(&f);
if ( code >= Codec )
@@ -181,11 +181,11 @@ void Editor::load( const TQString& fileName, int code )
e->setText( t.read() );
f.close();
- e->setAutoUpdate( TRUE );
+ e->setAutoUpdate( true );
e->repaint();
setCaption( fileName );
- changed = FALSE;
+ changed = false;
}
void Editor::openAsEncoding( int code )
@@ -205,7 +205,7 @@ bool Editor::save()
TQString fn = TQFileDialog::getSaveFileName( TQString::null, TQString::null, this );
if ( !fn.isEmpty() )
return saveAs( fn );
- return FALSE;
+ return false;
#endif
}
@@ -255,7 +255,7 @@ bool Editor::saveAs( const TQString& fileName, int code )
TQMessageBox::warning(this,"I/O Error",
TQString("The file could not be opened.\n\n")
+fileName);
- return FALSE;
+ return false;
}
TQTextStream t(&f);
if ( code >= Codec )
@@ -269,15 +269,15 @@ bool Editor::saveAs( const TQString& fileName, int code )
t << e->text();
f.close();
setCaption( fileName );
- changed = FALSE;
- return TRUE;
+ changed = false;
+ return true;
}
void Editor::print()
{
#ifndef TQT_NO_PRINTER
if ( printer.setup(this) ) { // opens printer dialog
- printer.setFullPage(TRUE); // we'll set our own margins
+ printer.setFullPage(true); // we'll set our own margins
TQPainter p;
p.begin( &printer ); // paint on printer
p.setFont( e->font() );
@@ -350,5 +350,5 @@ void Editor::toLower()
void Editor::textChanged()
{
- changed = TRUE;
+ changed = true;
}
diff --git a/examples/richtext/richtext.cpp b/examples/richtext/richtext.cpp
index b166017aa..0dddfdfd4 100644
--- a/examples/richtext/richtext.cpp
+++ b/examples/richtext/richtext.cpp
@@ -98,7 +98,7 @@ MyRichText::MyRichText( TQWidget *parent, const char *name )
bPrev = new TQPushButton( "<< &Prev", buttons );
bNext = new TQPushButton( "&Next >>", buttons );
- bPrev->setEnabled( FALSE );
+ bPrev->setEnabled( false );
connect( bClose, TQ_SIGNAL( clicked() ), tqApp, TQ_SLOT( quit() ) );
connect( bPrev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prev() ) );
@@ -117,9 +117,9 @@ void MyRichText::prev()
view->setText( sayings[num] );
if ( num == 0 )
- bPrev->setEnabled( FALSE );
+ bPrev->setEnabled( false );
- bNext->setEnabled( TRUE );
+ bNext->setEnabled( true );
}
void MyRichText::next()
@@ -130,9 +130,9 @@ void MyRichText::next()
view->setText( sayings[num] );
if ( !sayings[num + 1] )
- bNext->setEnabled( FALSE );
+ bNext->setEnabled( false );
- bPrev->setEnabled( TRUE );
+ bPrev->setEnabled( true );
}
diff --git a/examples/rot13/rot13.cpp b/examples/rot13/rot13.cpp
index dfcc5d684..e66ddc58e 100644
--- a/examples/rot13/rot13.cpp
+++ b/examples/rot13/rot13.cpp
@@ -36,17 +36,17 @@ Rot13::Rot13()
void Rot13::changeLeft()
{
- left->blockSignals( TRUE );
+ left->blockSignals( true );
left->setText( rot13( right->text() ) );
- left->blockSignals( FALSE );
+ left->blockSignals( false );
}
void Rot13::changeRight()
{
- right->blockSignals( TRUE );
+ right->blockSignals( true );
right->setText( rot13( left->text() ) );
- right->blockSignals( FALSE );
+ right->blockSignals( false );
}
diff --git a/examples/scribble/scribble.cpp b/examples/scribble/scribble.cpp
index 3f80d8881..f8b3d5dcb 100644
--- a/examples/scribble/scribble.cpp
+++ b/examples/scribble/scribble.cpp
@@ -26,11 +26,11 @@
#include <ntqpopupmenu.h>
#include <ntqintdict.h>
-const bool no_writing = FALSE;
+const bool no_writing = false;
Canvas::Canvas( TQWidget *parent, const char *name )
: TQWidget( parent, name, WStaticContents ), pen( TQt::red, 3 ), polyline(3),
- mousePressed( FALSE ), buffer( width(), height() )
+ mousePressed( false ), buffer( width(), height() )
{
if ((tqApp->argc() > 0) && !buffer.load(tqApp->argv()[1]))
@@ -50,18 +50,18 @@ void Canvas::save( const TQString &filename, const TQString &format )
void Canvas::clearScreen()
{
buffer.fill( colorGroup().base() );
- repaint( FALSE );
+ repaint( false );
}
void Canvas::mousePressEvent( TQMouseEvent *e )
{
- mousePressed = TRUE;
+ mousePressed = true;
polyline[2] = polyline[1] = polyline[0] = e->pos();
}
void Canvas::mouseReleaseEvent( TQMouseEvent * )
{
- mousePressed = FALSE;
+ mousePressed = false;
}
void Canvas::mouseMoveEvent( TQMouseEvent *e )
@@ -148,14 +148,14 @@ void Scribble::slotSave()
{
TQPopupMenu *menu = new TQPopupMenu( 0 );
TQIntDict<TQString> formats;
- formats.setAutoDelete( TRUE );
+ formats.setAutoDelete( true );
for ( unsigned int i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
TQString str = TQString( TQImageIO::outputFormats().at( i ) );
formats.insert( menu->insertItem( TQString( "%1..." ).arg( str ) ), new TQString( str ) );
}
- menu->setMouseTracking( TRUE );
+ menu->setMouseTracking( true );
int id = menu->exec( bSave->mapToGlobal( TQPoint( 0, bSave->height() + 1 ) ) );
if ( id != -1 ) {
diff --git a/examples/scrollview/scrollview.cpp b/examples/scrollview/scrollview.cpp
index 29d6e1b5a..4e76e584e 100644
--- a/examples/scrollview/scrollview.cpp
+++ b/examples/scrollview/scrollview.cpp
@@ -211,7 +211,7 @@ public:
vp_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( vp_options );
- vp_options->setCheckable( TRUE );
+ vp_options->setCheckable( true );
menubar->insertItem( "&ScrollView", vp_options );
connect( vp_options, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(doVPMenuItem(int)) );
@@ -230,13 +230,13 @@ public:
vp = new TQScrollView(this);
BigShrinker *bs = new BigShrinker(0);//(vp->viewport());
vp->addChild(bs);
- bs->setAcceptDrops(TRUE);
+ bs->setAcceptDrops(true);
TQObject::connect(bs, TQ_SIGNAL(clicked(int,int)),
vp, TQ_SLOT(center(int,int)));
} else {
vp = new BigMatrix(this);
if ( technique == 3 )
- vp->enableClipper(TRUE);
+ vp->enableClipper(true);
srand(1);
for (int i=0; i<30; i++) {
TQMultiLineEdit *l = new TQMultiLineEdit(vp->viewport(),"First");
@@ -249,7 +249,7 @@ public:
f_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( f_options );
- f_options->setCheckable( TRUE );
+ f_options->setCheckable( true );
menubar->insertItem( "F&rame", f_options );
connect( f_options, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(doFMenuItem(int)) );
@@ -266,7 +266,7 @@ public:
f_options->insertSeparator();
lw_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( lw_options );
- lw_options->setCheckable( TRUE );
+ lw_options->setCheckable( true );
for (int lw = 1; lw <= max_lw; lw++) {
TQString str;
str.sprintf("%d Pixels", lw);
@@ -277,7 +277,7 @@ public:
this, TQ_SLOT(doFMenuItem(int)) );
mlw_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( mlw_options );
- mlw_options->setCheckable( TRUE );
+ mlw_options->setCheckable( true );
for (int mlw = 0; mlw <= max_mlw; mlw++) {
TQString str;
str.sprintf("%d Pixels", mlw);
@@ -288,7 +288,7 @@ public:
this, TQ_SLOT(doFMenuItem(int)) );
mw_options = new TQPopupMenu( menubar );
TQ_CHECK_PTR( mw_options );
- mw_options->setCheckable( TRUE );
+ mw_options->setCheckable( true );
for (int mw = 0; mw <= max_mw; mw++) {
TQString str;
str.sprintf("%d Pixels", mw);
diff --git a/examples/showimg/imagetexteditor.cpp b/examples/showimg/imagetexteditor.cpp
index 2abdabfb7..6bfd0d002 100644
--- a/examples/showimg/imagetexteditor.cpp
+++ b/examples/showimg/imagetexteditor.cpp
@@ -22,11 +22,11 @@
ImageTextEditor::ImageTextEditor( TQImage& i, TQWidget *parent, const char *name, WFlags f ) :
- TQDialog(parent,name,TRUE,f),
+ TQDialog(parent,name,true,f),
image(i)
{
TQVBoxLayout* vbox = new TQVBoxLayout(this,8);
- vbox->setAutoAdd(TRUE);
+ vbox->setAutoAdd(true);
TQGrid* controls = new TQGrid(3,TQGrid::Horizontal,this);
controls->setSpacing(8);
diff --git a/examples/showimg/showimg.cpp b/examples/showimg/showimg.cpp
index 4ef1a1d97..66aff58b1 100644
--- a/examples/showimg/showimg.cpp
+++ b/examples/showimg/showimg.cpp
@@ -94,8 +94,8 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags )
ss = options->insertItem( "Smooth scaling" );
cc = options->insertItem( "Use color context" );
if ( TQApplication::colorSpec() == TQApplication::ManyColor )
- options->setItemEnabled( cc, FALSE );
- options->setCheckable( TRUE );
+ options->setItemEnabled( cc, false );
+ options->setCheckable( true );
setMenuItemFlags();
menubar->insertSeparator();
@@ -110,7 +110,7 @@ ImageViewer::ImageViewer( TQWidget *parent, const char *name, int wFlags )
status->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
status->setFixedHeight( fontMetrics().height() + 4 );
- setMouseTracking( TRUE );
+ setMouseTracking( true );
}
ImageViewer::~ImageViewer()
@@ -262,12 +262,12 @@ void ImageViewer::updateStatus()
int nalpha=0;
for (i=0; i<256; i++)
- alpha[i] = FALSE;
+ alpha[i] = false;
for (i=0; i<image.numColors(); i++) {
int alevel = image.color(i) >> 24;
if (!alpha[alevel]) {
- alpha[alevel] = TRUE;
+ alpha[alevel] = true;
nalpha++;
}
}
@@ -336,13 +336,13 @@ void ImageViewer::openFile()
format was unknown it will resize the widget to fit the errorText
message (see above) displayed in the current font.
- Returns TRUE if the image was successfully loaded.
+ Returns true if the image was successfully loaded.
*/
bool ImageViewer::loadImage( const TQString& fileName )
{
filename = fileName;
- bool ok = FALSE;
+ bool ok = false;
if ( !filename.isEmpty() ) {
TQApplication::setOverrideCursor( waitCursor ); // this might take time
ok = image.load(filename, 0);
@@ -378,9 +378,9 @@ bool ImageViewer::loadImage( const TQString& fileName )
bool ImageViewer::reconvertImage()
{
- bool success = FALSE;
+ bool success = false;
- if ( image.isNull() ) return FALSE;
+ if ( image.isNull() ) return false;
if ( alloc_context ) {
TQColor::destroyAllocContext( alloc_context );
@@ -399,7 +399,7 @@ bool ImageViewer::reconvertImage()
pmScaled = TQPixmap();
scale();
resize( width(), height() );
- success = TRUE; // load successful
+ success = true; // load successful
} else {
pm.resize(0,0); // couldn't load image
}
@@ -410,7 +410,7 @@ bool ImageViewer::reconvertImage()
if ( useColorContext() )
TQColor::leaveAllocContext();
- return success; // TRUE if loaded OK
+ return success; // true if loaded OK
}
bool ImageViewer::smooth() const
@@ -485,10 +485,10 @@ bool ImageViewer::convertEvent( TQMouseEvent* e, int& x, int& y)
x = nx;
y = ny;
updateStatus();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void ImageViewer::mousePressEvent( TQMouseEvent *e )
@@ -510,7 +510,7 @@ void ImageViewer::mouseMoveEvent( TQMouseEvent *e )
if (convertEvent(e,pickx,picky)) {
updateStatus();
if ((e->state()&LeftButton)) {
- may_be_other = FALSE;
+ may_be_other = false;
if ( clickx >= 0 && other) {
copyFrom(other);
}
@@ -550,7 +550,7 @@ void ImageViewer::giveHelp()
helptext += "</blockquote>";
helpmsg = new TQMessageBox( "Help", helptext,
- TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, FALSE );
+ TQMessageBox::Information, TQMessageBox::Ok, 0, 0, 0, 0, false );
}
helpmsg->show();
helpmsg->raise();
@@ -582,17 +582,17 @@ ImageViewer* ImageViewer::other = 0;
void ImageViewer::hFlip()
{
- setImage(image.mirror(TRUE,FALSE));
+ setImage(image.mirror(true,false));
}
void ImageViewer::vFlip()
{
- setImage(image.mirror(FALSE,TRUE));
+ setImage(image.mirror(false,true));
}
void ImageViewer::rot180()
{
- setImage(image.mirror(TRUE,TRUE));
+ setImage(image.mirror(true,true));
}
void ImageViewer::copy()
diff --git a/examples/splitter/splitter.cpp b/examples/splitter/splitter.cpp
index 7439800c8..ab29fda89 100644
--- a/examples/splitter/splitter.cpp
+++ b/examples/splitter/splitter.cpp
@@ -85,10 +85,10 @@ int main( int argc, char ** argv )
#ifdef TQ_WS_QWS
// TQt/Embedded XOR drawing not yet implemented.
- s1->setOpaqueResize( TRUE );
+ s1->setOpaqueResize( true );
#endif
- s2->setOpaqueResize( TRUE );
- s3->setOpaqueResize( TRUE );
+ s2->setOpaqueResize( true );
+ s3->setOpaqueResize( true );
a.setMainWidget( s1 );
s1->setCaption("TQt Example - Splitters");
diff --git a/examples/sql/blob/main.cpp b/examples/sql/blob/main.cpp
index 9bb9ea0c4..09f3a4c7a 100644
--- a/examples/sql/blob/main.cpp
+++ b/examples/sql/blob/main.cpp
@@ -22,7 +22,7 @@
int main( int argc, char ** argv )
{
- TQApplication a( argc, argv, FALSE );
+ TQApplication a( argc, argv, false );
TQSqlDatabase * db = TQSqlDatabase::addDatabase( DRIVER );
db->setDatabaseName( DATABASE );
db->setUserName( USER );
diff --git a/examples/sql/overview/basicbrowsing/main.cpp b/examples/sql/overview/basicbrowsing/main.cpp
index 9244d2a93..d0dce2017 100644
--- a/examples/sql/overview/basicbrowsing/main.cpp
+++ b/examples/sql/overview/basicbrowsing/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
diff --git a/examples/sql/overview/basicbrowsing2/main.cpp b/examples/sql/overview/basicbrowsing2/main.cpp
index 79b2b17db..0e4b60374 100644
--- a/examples/sql/overview/basicbrowsing2/main.cpp
+++ b/examples/sql/overview/basicbrowsing2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlDatabase *oracledb = TQSqlDatabase::database( "ORACLE" );
diff --git a/examples/sql/overview/basicdatamanip/main.cpp b/examples/sql/overview/basicdatamanip/main.cpp
index ed422afa7..7aabc4735 100644
--- a/examples/sql/overview/basicdatamanip/main.cpp
+++ b/examples/sql/overview/basicdatamanip/main.cpp
@@ -17,7 +17,7 @@ bool createConnections();
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
int rows = 0;
diff --git a/examples/sql/overview/connect1/main.cpp b/examples/sql/overview/connect1/main.cpp
index ea958e3ae..1177171ae 100644
--- a/examples/sql/overview/connect1/main.cpp
+++ b/examples/sql/overview/connect1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
TQSqlDatabase *defaultDB = TQSqlDatabase::addDatabase( DB_SALES_DRIVER );
defaultDB->setDatabaseName( DB_SALES_DBNAME );
diff --git a/examples/sql/overview/connection.cpp b/examples/sql/overview/connection.cpp
index bb8654df1..7fc124956 100644
--- a/examples/sql/overview/connection.cpp
+++ b/examples/sql/overview/connection.cpp
@@ -19,7 +19,7 @@ bool createConnections()
defaultDB->setHostName( DB_SALES_HOST );
if ( ! defaultDB->open() ) {
tqWarning( "Failed to open sales database: " + defaultDB->lastError().text() );
- return FALSE;
+ return false;
}
TQSqlDatabase *oracle = TQSqlDatabase::addDatabase( DB_ORDERS_DRIVER, "ORACLE" );
@@ -29,7 +29,7 @@ bool createConnections()
oracle->setHostName( DB_ORDERS_HOST );
if ( ! oracle->open() ) {
tqWarning( "Failed to open orders database: " + oracle->lastError().text() );
- return FALSE;
+ return false;
}
TQSqlQuery q(TQString::null, defaultDB);
@@ -46,5 +46,5 @@ bool createConnections()
TQSqlQuery q2(TQString::null, oracle);
q2.exec("create table people (id integer primary key, name char(40))");
- return TRUE;
+ return true;
}
diff --git a/examples/sql/overview/create_connections/main.cpp b/examples/sql/overview/create_connections/main.cpp
index dc1042b7b..a85e1e915 100644
--- a/examples/sql/overview/create_connections/main.cpp
+++ b/examples/sql/overview/create_connections/main.cpp
@@ -13,7 +13,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
// Databases successfully opened; get pointers to them:
diff --git a/examples/sql/overview/custom1/main.cpp b/examples/sql/overview/custom1/main.cpp
index adde6e2e3..48c9fcbc0 100644
--- a/examples/sql/overview/custom1/main.cpp
+++ b/examples/sql/overview/custom1/main.cpp
@@ -60,8 +60,8 @@ FormDialog::FormDialog()
grid->activate();
staffCursor = new TQSqlCursor( "staff" );
- staffCursor->setTrimmed( "forename", TRUE );
- staffCursor->setTrimmed( "surname", TRUE );
+ staffCursor->setTrimmed( "forename", true );
+ staffCursor->setTrimmed( "surname", true );
idIndex = staffCursor->index( "id" );
staffCursor->select( idIndex );
staffCursor->first();
diff --git a/examples/sql/overview/delete/main.cpp b/examples/sql/overview/delete/main.cpp
index 9ade50bab..1bed71be8 100644
--- a/examples/sql/overview/delete/main.cpp
+++ b/examples/sql/overview/delete/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/overview/extract/main.cpp b/examples/sql/overview/extract/main.cpp
index 0c47911ce..51c7e2e80 100644
--- a/examples/sql/overview/extract/main.cpp
+++ b/examples/sql/overview/extract/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "creditors" );
diff --git a/examples/sql/overview/form2/main.cpp b/examples/sql/overview/form2/main.cpp
index 115a27420..151cfbafe 100644
--- a/examples/sql/overview/form2/main.cpp
+++ b/examples/sql/overview/form2/main.cpp
@@ -12,8 +12,8 @@
FormDialog::FormDialog()
: staffCursor( "staff" )
{
- staffCursor.setTrimmed( "forename", TRUE );
- staffCursor.setTrimmed( "surname", TRUE );
+ staffCursor.setTrimmed( "forename", true );
+ staffCursor.setTrimmed( "surname", true );
TQLabel *forenameLabel = new TQLabel( "Forename:", this );
TQLineEdit *forenameEdit = new TQLineEdit( this );
diff --git a/examples/sql/overview/insert/main.cpp b/examples/sql/overview/insert/main.cpp
index 0f2c7b866..b43e4d9fa 100644
--- a/examples/sql/overview/insert/main.cpp
+++ b/examples/sql/overview/insert/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
int count = 0;
diff --git a/examples/sql/overview/insert2/main.cpp b/examples/sql/overview/insert2/main.cpp
index 5f5ee6620..2a40dd7ee 100644
--- a/examples/sql/overview/insert2/main.cpp
+++ b/examples/sql/overview/insert2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/overview/navigating/main.cpp b/examples/sql/overview/navigating/main.cpp
index a2e773c1b..7885592e8 100644
--- a/examples/sql/overview/navigating/main.cpp
+++ b/examples/sql/overview/navigating/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlQuery query( "SELECT id, name FROM people ORDER BY name" );
diff --git a/examples/sql/overview/order1/main.cpp b/examples/sql/overview/order1/main.cpp
index 8c2c48df3..409888db6 100644
--- a/examples/sql/overview/order1/main.cpp
+++ b/examples/sql/overview/order1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "staff" );
diff --git a/examples/sql/overview/order2/main.cpp b/examples/sql/overview/order2/main.cpp
index 09c36151b..166b79a38 100644
--- a/examples/sql/overview/order2/main.cpp
+++ b/examples/sql/overview/order2/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "staff" );
diff --git a/examples/sql/overview/retrieve1/main.cpp b/examples/sql/overview/retrieve1/main.cpp
index 768f870de..8693730ec 100644
--- a/examples/sql/overview/retrieve1/main.cpp
+++ b/examples/sql/overview/retrieve1/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlQuery query( "SELECT id, surname FROM staff" );
diff --git a/examples/sql/overview/subclass3/main.cpp b/examples/sql/overview/subclass3/main.cpp
index 7f6f7f567..170f2267f 100644
--- a/examples/sql/overview/subclass3/main.cpp
+++ b/examples/sql/overview/subclass3/main.cpp
@@ -15,7 +15,7 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
}
diff --git a/examples/sql/overview/subclass4/main.cpp b/examples/sql/overview/subclass4/main.cpp
index 0ea60afcb..4e4a6ba08 100644
--- a/examples/sql/overview/subclass4/main.cpp
+++ b/examples/sql/overview/subclass4/main.cpp
@@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
TQSqlFieldInfo productPrice( "price", TQVariant::Double );
append( productPrice );
- setCalculated( productPrice.name(), TRUE );
+ setCalculated( productPrice.name(), true );
TQSqlFieldInfo productCost( "cost", TQVariant::Double );
append( productCost );
- setCalculated( productCost.name(), TRUE );
+ setCalculated( productCost.name(), true );
}
diff --git a/examples/sql/overview/subclass5/main.cpp b/examples/sql/overview/subclass5/main.cpp
index afb616f67..b4f3f743b 100644
--- a/examples/sql/overview/subclass5/main.cpp
+++ b/examples/sql/overview/subclass5/main.cpp
@@ -15,15 +15,15 @@ InvoiceItemCursor::InvoiceItemCursor() :
{
TQSqlFieldInfo productName( "productname", TQVariant::String );
append( productName );
- setCalculated( productName.name(), TRUE );
+ setCalculated( productName.name(), true );
TQSqlFieldInfo productPrice( "price", TQVariant::Double );
append( productPrice );
- setCalculated( productPrice.name(), TRUE );
+ setCalculated( productPrice.name(), true );
TQSqlFieldInfo productCost( "cost", TQVariant::Double );
append( productCost );
- setCalculated( productCost.name(), TRUE );
+ setCalculated( productCost.name(), true );
}
diff --git a/examples/sql/overview/table1/main.cpp b/examples/sql/overview/table1/main.cpp
index 118e73f6d..164e6500c 100644
--- a/examples/sql/overview/table1/main.cpp
+++ b/examples/sql/overview/table1/main.cpp
@@ -19,7 +19,7 @@ int main( int argc, char *argv[] )
if ( createConnections() ) {
TQSqlCursor staffCursor( "staff" );
- TQDataTable *staffTable = new TQDataTable( &staffCursor, TRUE );
+ TQDataTable *staffTable = new TQDataTable( &staffCursor, true );
app.setMainWidget( staffTable );
staffTable->refresh();
staffTable->show();
diff --git a/examples/sql/overview/table4/main.h b/examples/sql/overview/table4/main.h
index 394d34738..3be652963 100644
--- a/examples/sql/overview/table4/main.h
+++ b/examples/sql/overview/table4/main.h
@@ -36,7 +36,7 @@ class CustomTable : public TQDataTable
TQ_OBJECT
public:
CustomTable(
- TQSqlCursor *cursor, bool autoPopulate = FALSE,
+ TQSqlCursor *cursor, bool autoPopulate = false,
TQWidget * parent = 0, const char * name = 0 ) :
TQDataTable( cursor, autoPopulate, parent, name ) {}
void paintField(
diff --git a/examples/sql/overview/update/main.cpp b/examples/sql/overview/update/main.cpp
index 905e98107..8e199a7c0 100644
--- a/examples/sql/overview/update/main.cpp
+++ b/examples/sql/overview/update/main.cpp
@@ -14,7 +14,7 @@
int main( int argc, char *argv[] )
{
- TQApplication app( argc, argv, FALSE );
+ TQApplication app( argc, argv, false );
if ( createConnections() ) {
TQSqlCursor cur( "prices" );
diff --git a/examples/sql/sqltable/main.cpp b/examples/sql/sqltable/main.cpp
index 5af04d6c5..8de808b8d 100644
--- a/examples/sql/sqltable/main.cpp
+++ b/examples/sql/sqltable/main.cpp
@@ -61,7 +61,7 @@ int main( int argc, char ** argv )
TQDataTable table( &cursor ); /* data table uses our cursor */
table.addColumn( "name", "Name" );
table.addColumn( "address", "Address" );
- table.setSorting( TRUE );
+ table.setSorting( true );
a.setMainWidget( &table );
table.refresh(); /* load data */
diff --git a/examples/tabdialog/tabdialog.cpp b/examples/tabdialog/tabdialog.cpp
index e3cfece57..d4823d612 100644
--- a/examples/tabdialog/tabdialog.cpp
+++ b/examples/tabdialog/tabdialog.cpp
@@ -38,7 +38,7 @@ void TabDialog::setupTab1()
fname->setFocus();
(void)new TQLabel( "Path:", tab1 );
- TQLabel *path = new TQLabel( fileinfo.dirPath( TRUE ), tab1 );
+ TQLabel *path = new TQLabel( fileinfo.dirPath( true ), tab1 );
path->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
(void)new TQLabel( "Size:", tab1 );
@@ -66,15 +66,15 @@ void TabDialog::setupTab2()
TQCheckBox *readable = new TQCheckBox( "Readable", bg );
if ( fileinfo.isReadable() )
- readable->setChecked( TRUE );
+ readable->setChecked( true );
TQCheckBox *writable = new TQCheckBox( "Writeable", bg );
if ( fileinfo.isWritable() )
- writable->setChecked( TRUE );
+ writable->setChecked( true );
TQCheckBox *executable = new TQCheckBox( "Executable", bg );
if ( fileinfo.isExecutable() )
- executable->setChecked( TRUE );
+ executable->setChecked( true );
TQButtonGroup *bg2 = new TQButtonGroup( 2, TQGroupBox::Horizontal, "Owner", tab2 );
diff --git a/examples/table/bigtable/main.cpp b/examples/table/bigtable/main.cpp
index a1226a594..642549604 100644
--- a/examples/table/bigtable/main.cpp
+++ b/examples/table/bigtable/main.cpp
@@ -19,8 +19,8 @@ class MyTable : public TQTable
{
public:
MyTable( int r, int c ) : TQTable( r, c ) {
- items.setAutoDelete( TRUE );
- widgets.setAutoDelete( TRUE );
+ items.setAutoDelete( true );
+ widgets.setAutoDelete( true );
setCaption( tr( "A 1 Million x 1 Million Cell Table" ) );
setLeftMargin( fontMetrics().width( "W999999W" ) );
}
@@ -31,9 +31,9 @@ public:
void clearCell( int r, int c ) { items.remove( indexOf( r, c ) ); }
void takeItem( TQTableItem *item )
{
- items.setAutoDelete( FALSE );
+ items.setAutoDelete( false );
items.remove( indexOf( item->row(), item->col() ) );
- items.setAutoDelete( TRUE );
+ items.setAutoDelete( true );
}
void insertWidget( int r, int c, TQWidget *w ) { widgets.replace( indexOf( r, c ), w ); }
TQWidget *cellWidget( int r, int c ) const { return widgets.find( indexOf( r, c ) ); }
diff --git a/examples/table/small-table-demo/main.cpp b/examples/table/small-table-demo/main.cpp
index 359654507..fa1ec295e 100644
--- a/examples/table/small-table-demo/main.cpp
+++ b/examples/table/small-table-demo/main.cpp
@@ -33,7 +33,7 @@ int main( int argc, char **argv )
header->setLabel( 0, TQObject::tr( "Tiny" ), 40 );
header->setLabel( 1, TQObject::tr( "Checkboxes" ) );
header->setLabel( 5, TQObject::tr( "Combos" ) );
- table.setColumnMovingEnabled(TRUE);
+ table.setColumnMovingEnabled(true);
TQImage img( qtlogo_xpm );
TQPixmap pix = img.scaleHeight( table.rowHeight(3) );
@@ -44,7 +44,7 @@ int main( int argc, char **argv )
comboEntries << "one" << "two" << "three" << "four";
for ( int i = 0; i < numRows; ++i ){
- TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, FALSE );
+ TQComboTableItem * item = new TQComboTableItem( &table, comboEntries, false );
item->setCurrentItem( i % 4 );
table.setItem( i, 5, item );
}
diff --git a/examples/table/statistics/statistics.cpp b/examples/table/statistics/statistics.cpp
index 7726ba4cb..ab4be3b13 100644
--- a/examples/table/statistics/statistics.cpp
+++ b/examples/table/statistics/statistics.cpp
@@ -31,7 +31,7 @@ const char* dirs[] = {
Table::Table()
: TQTable( 10, 100, 0, "table" )
{
- setSorting( TRUE );
+ setSorting( true );
horizontalHeader()->setLabel( 0, tr( "File" ) );
horizontalHeader()->setLabel( 1, tr( "Size (bytes)" ) );
horizontalHeader()->setLabel( 2, tr( "Use in Sum" ) );
@@ -109,7 +109,7 @@ void Table::sortColumn( int col, bool ascending, bool /*wholeRows*/ )
clearCell( numRows() - 1, 0 );
clearCell( numRows() - 1, 1 );
// do sort
- TQTable::sortColumn( col, ascending, TRUE );
+ TQTable::sortColumn( col, ascending, true );
// re-insert sum row
recalcSum( 0, 1 );
}
@@ -133,7 +133,7 @@ ComboItem::ComboItem( TQTable *t, EditType et )
: TQTableItem( t, et, "Yes" ), cb( 0 )
{
// we do not want this item to be replaced
- setReplaceable( FALSE );
+ setReplaceable( false );
}
TQWidget *ComboItem::createEditor() const
diff --git a/examples/tablet/canvas.cpp b/examples/tablet/canvas.cpp
index cd5da7d81..4d07c214c 100644
--- a/examples/tablet/canvas.cpp
+++ b/examples/tablet/canvas.cpp
@@ -14,12 +14,12 @@
#include <ntqevent.h>
#include <ntqrect.h>
-const bool no_writing = FALSE;
+const bool no_writing = false;
Canvas::Canvas( TQWidget *parent, const char *name, WFlags fl )
: TQWidget( parent, name, WStaticContents | fl ),
pen( TQt::red, 3 ), polyline(3),
- mousePressed( FALSE ), oldPressure( 0 ), saveColor( red ),
+ mousePressed( false ), oldPressure( 0 ), saveColor( red ),
buffer( width(), height() )
{
@@ -40,18 +40,18 @@ void Canvas::save( const TQString &filename, const TQString &format )
void Canvas::clearScreen()
{
buffer.fill( colorGroup().base() );
- repaint( FALSE );
+ repaint( false );
}
void Canvas::mousePressEvent( TQMouseEvent *e )
{
- mousePressed = TRUE;
+ mousePressed = true;
polyline[2] = polyline[1] = polyline[0] = e->pos();
}
void Canvas::mouseReleaseEvent( TQMouseEvent * )
{
- mousePressed = FALSE;
+ mousePressed = false;
}
void Canvas::mouseMoveEvent( TQMouseEvent *e )
@@ -118,11 +118,11 @@ void Canvas::tabletEvent( TQTabletEvent *e )
switch ( e->type() ) {
case TQEvent::TabletPress:
- mousePressed = TRUE;
+ mousePressed = true;
polyline[2] = polyline[1] = polyline[0] = e->pos();
break;
case TQEvent::TabletRelease:
- mousePressed = FALSE;
+ mousePressed = false;
break;
case TQEvent::TabletMove:
if ( mousePressed ) {
diff --git a/examples/tablet/scribble.cpp b/examples/tablet/scribble.cpp
index 457425073..383c38d52 100644
--- a/examples/tablet/scribble.cpp
+++ b/examples/tablet/scribble.cpp
@@ -96,14 +96,14 @@ void Scribble::slotSave()
{
TQPopupMenu *menu = new TQPopupMenu( 0 );
TQIntDict<TQString> formats;
- formats.setAutoDelete( TRUE );
+ formats.setAutoDelete( true );
for ( unsigned int i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
TQString str = TQString( TQImageIO::outputFormats().at( i ) );
formats.insert( menu->insertItem( TQString( "%1..." ).arg( str ) ), new TQString( str ) );
}
- menu->setMouseTracking( TRUE );
+ menu->setMouseTracking( true );
int id = menu->exec( bSave->mapToGlobal( TQPoint( 0, bSave->height() + 1 ) ) );
if ( id != -1 ) {
diff --git a/examples/tablet/tabletstats.cpp b/examples/tablet/tabletstats.cpp
index 07bf2d447..79bd2c43d 100644
--- a/examples/tablet/tabletstats.cpp
+++ b/examples/tablet/tabletstats.cpp
@@ -90,11 +90,11 @@ void StatsCanvas::tabletEvent( TQTabletEvent *e )
switch( e->type() ) {
case TQEvent::TabletPress:
tqDebug( "Tablet Press" );
- mousePressed = TRUE;
+ mousePressed = true;
break;
case TQEvent::TabletRelease:
tqDebug( "Tablet Release" );
- mousePressed = FALSE;
+ mousePressed = false;
clearScreen();
break;
default:
diff --git a/examples/tetrix/gtetrix.cpp b/examples/tetrix/gtetrix.cpp
index 92b946b44..325b98dfb 100644
--- a/examples/tetrix/gtetrix.cpp
+++ b/examples/tetrix/gtetrix.cpp
@@ -24,7 +24,7 @@ GenericTetrix::GenericTetrix(int boardWidth,int boardHeight)
board(j,i) = 0;
currentLine = -1; // -1 if no falling piece.
currentPos = 0;
- showNext = 0; // FALSE
+ showNext = 0; // false
nLinesRemoved = 0;
nPiecesDropped = 0;
score = 0;
diff --git a/examples/tetrix/qdragapp.cpp b/examples/tetrix/qdragapp.cpp
index 19fc9fec6..ad20d10c6 100644
--- a/examples/tetrix/qdragapp.cpp
+++ b/examples/tetrix/qdragapp.cpp
@@ -110,7 +110,7 @@ bool TQDragApplication::notify( TQObject *o, TQEvent *e )
if ( dragger && !dragger->notify( o, e ) )
return TQApplication::notify( o, e );
else
- return FALSE;
+ return false;
}
void DropWindow::paintEvent( TQPaintEvent * )
@@ -131,10 +131,10 @@ void DropWindow::closeEvent( TQCloseEvent *e )
TQDragger::TQDragger()
{
dragInfo.w = 0;
- killingDrop = FALSE;
- sendingChild = FALSE;
- draggedDict.setAutoDelete( TRUE );
- dropDict .setAutoDelete( TRUE );
+ killingDrop = false;
+ sendingChild = false;
+ draggedDict.setAutoDelete( true );
+ dropDict .setAutoDelete( true );
menu = new TQPopupMenu;
menu->insertItem( "Open drop window", 1 );
@@ -160,7 +160,7 @@ TQDragger::~TQDragger()
bool TQDragger::notify( TQObject *o, TQEvent *e )
{
if ( !o->isWidgetType() || o == menu )
- return FALSE;
+ return false;
switch( e->type() ) {
case TQEvent::MouseMove:
{
@@ -189,7 +189,7 @@ bool TQDragger::notify( TQObject *o, TQEvent *e )
default:
break;
}
- return FALSE;
+ return false;
}
bool TQDragger::isParentToDragged( TQWidget *w )
@@ -200,24 +200,24 @@ bool TQDragger::isParentToDragged( TQWidget *w )
while( (tmp = iter.current()) ) {
++iter;
if ( tmp->mother == w )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool TQDragger::noWidgets( TQWidget *w )
{
const TQObjectList *l = w->children();
if ( !l )
- return TRUE;
+ return true;
TQObjectListIt iter( *l );
TQObject *tmp;
while( (tmp = iter.current()) ) {
++iter;
if ( tmp->isWidgetType() )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void TQDragger::sendAllChildrenHome( TQWidget *w )
@@ -248,7 +248,7 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
w->parentWidget() == 0 ) { // is top level window
hostWidget = w;
menu->popup( w->mapToGlobal( e->pos() ) );
- return TRUE;
+ return true;
}
if ( !draggedDict.find( (long) w ) ) {
DraggedInfo *tmp = new DraggedInfo;
@@ -265,9 +265,9 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
clickOffset = e->pos();
dragInfo.w = w;
TQPoint p = w->mapToGlobal(TQPoint(0,0));
- w->reparent( 0, WType_Popup, p, TRUE );
+ w->reparent( 0, WType_Popup, p, true );
- return TRUE;
+ return true;
}
case TQEvent::MouseButtonRelease:
case TQEvent::MouseMove: {
@@ -275,12 +275,12 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
TQPoint p = TQCursor::pos() - clickOffset;
dragInfo.w->move( p );
if ( e->type() == TQEvent::MouseMove )
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
if ( !dragInfo.w )
- return FALSE;
+ return false;
if ( w != dragInfo.w )
w = dragInfo.w;
dragInfo.w = 0;
@@ -291,12 +291,12 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
TQPoint p;
if ( !target ) {
target = openDropWindow( TQRect( pos, w->size() ),
- FALSE);
+ false);
p = TQPoint( 0, 0 );
}
else
p = target->mapFromGlobal( pos );
- w->reparent( target, 0, p, TRUE );
+ w->reparent( target, 0, p, true );
DropInfo *tmp = dropDict.find( (long) dragInfo.mother );
if ( tmp ) {
if ( !tmp->userOpened && noWidgets( tmp->w ) )
@@ -305,9 +305,9 @@ bool TQDragger::dragEvent( TQWidget *w, TQMouseEvent *e )
if ( !target->isVisible() )
target->show();
}
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -317,7 +317,7 @@ bool TQDragger::killDropEvent( TQMouseEvent *e )
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseButtonPress:
clickedWidget = cursorWidget();
- return TRUE;
+ return true;
case TQEvent::MouseButtonRelease:
hostWidget->releaseMouse();
if ( clickedWidget ) {
@@ -328,13 +328,13 @@ bool TQDragger::killDropEvent( TQMouseEvent *e )
}
}
grabFinished();
- return TRUE;
+ return true;
case TQEvent::MouseMove:
- return TRUE;
+ return true;
default:
break;
}
- return FALSE;
+ return false;
}
bool TQDragger::sendChildEvent( TQMouseEvent *e )
@@ -343,7 +343,7 @@ bool TQDragger::sendChildEvent( TQMouseEvent *e )
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseButtonPress:
clickedWidget = cursorWidget();
- return TRUE;
+ return true;
case TQEvent::MouseButtonRelease:
hostWidget->releaseMouse();
if ( clickedWidget ) {
@@ -359,30 +359,30 @@ bool TQDragger::sendChildEvent( TQMouseEvent *e )
}
grabFinished();
}
- return TRUE;
+ return true;
case TQEvent::MouseMove:
- return TRUE;
+ return true;
default:
break;
}
- return FALSE;
+ return false;
}
bool TQDragger::startGrab()
{
if ( !hostWidget )
- return FALSE;
+ return false;
clickedWidget = 0;
cursor = hostWidget->cursor();
hostWidget->grabMouse();
hostWidget->setCursor( TQCursor( CrossCursor ) );
- return TRUE;
+ return true;
}
void TQDragger::grabFinished()
{
- killingDrop = FALSE;
- sendingChild = FALSE;
+ killingDrop = false;
+ sendingChild = false;
if(hostWidget)
hostWidget->setCursor( cursor );
}
@@ -396,7 +396,7 @@ void TQDragger::closeDropWindow( DropWindow *w )
void TQDragger::openDropWindow()
{
- TQWidget *tmp = openDropWindow( TQRect(100, 100, 300, 200), TRUE );
+ TQWidget *tmp = openDropWindow( TQRect(100, 100, 300, 200), true );
tmp->show();
}
@@ -405,10 +405,10 @@ TQWidget *TQDragger::openDropWindow( const TQRect &r, bool user )
DropInfo *tmp = new DropInfo;
DropWindow *w = new DropWindow;
if ( user ) {
- tmp->userOpened = TRUE;
+ tmp->userOpened = true;
w->setCaption( "Drop window" );
} else {
- tmp->userOpened = FALSE;
+ tmp->userOpened = false;
w->setCaption( "Auto drop window" );
}
tmp->w = w;
@@ -422,7 +422,7 @@ TQWidget *TQDragger::openDropWindow( const TQRect &r, bool user )
void TQDragger::killDropWindow()
{
if ( startGrab() )
- killingDrop = TRUE;
+ killingDrop = true;
}
void TQDragger::killDropWindow( DropInfo *di )
@@ -447,7 +447,7 @@ void TQDragger::killDropWindow( DropInfo *di )
void TQDragger::killAllDropWindows()
{
- killAllDropWindows( FALSE );
+ killAllDropWindows( false );
}
void TQDragger::killAllDropWindows( bool autoOnly )
@@ -466,13 +466,13 @@ void TQDragger::killAllDropWindows( bool autoOnly )
void TQDragger::sendChildHome( DraggedInfo *i )
{
- i->w->reparent( i->mother, 0, i->pos, TRUE );
+ i->w->reparent( i->mother, 0, i->pos, true );
}
void TQDragger::sendChildHome()
{
if ( startGrab() )
- sendingChild = TRUE;
+ sendingChild = true;
}
void TQDragger::sendAllChildrenHome()
@@ -485,7 +485,7 @@ void TQDragger::sendAllChildrenHome()
sendChildHome( tmp );
draggedDict.remove( (long) tmp->w );
}
- killAllDropWindows( TRUE );
+ killAllDropWindows( true );
draggedDict.clear();
}
diff --git a/examples/tetrix/qtetrix.cpp b/examples/tetrix/qtetrix.cpp
index 84941cbec..1db902399 100644
--- a/examples/tetrix/qtetrix.cpp
+++ b/examples/tetrix/qtetrix.cpp
@@ -160,7 +160,7 @@ TQTetrix::TQTetrix( TQWidget *parent, const char *name )
startButton->setGeometry( 46, 288, 90, 30 );
quitButton->setGeometry( 370, 265, 90, 30 );
pauseButton->setGeometry( 370, 310, 90, 30 );
- board->revealNextPiece(TRUE);
+ board->revealNextPiece(true);
resize( 550, 370 );
}
diff --git a/examples/tetrix/qtetrixb.cpp b/examples/tetrix/qtetrixb.cpp
index e3df48d70..7d99393ad 100644
--- a/examples/tetrix/qtetrixb.cpp
+++ b/examples/tetrix/qtetrixb.cpp
@@ -35,9 +35,9 @@ TQTetrixBoard::TQTetrixBoard( TQWidget *p, const char *name )
blockWidth = 20;
yOffset = 30;
blockHeight = 20;
- noGame = TRUE;
- isPaused = FALSE;
- waitingAfterLine = FALSE;
+ noGame = true;
+ isPaused = false;
+ waitingAfterLine = false;
updateTimeoutTime(); // Sets timeoutTime
}
@@ -45,7 +45,7 @@ void TQTetrixBoard::startGame(int gameType,int fillRandomLines)
{
if ( isPaused )
return; // ignore if game is paused
- noGame = FALSE;
+ noGame = false;
GenericTetrix::startGame( gameType, fillRandomLines );
// Note that the timer is started by updateLevel!
}
@@ -92,7 +92,7 @@ void TQTetrixBoard::drawSquare(int x,int y,int value)
tc = colors[value-1].light();
bc = colors[value-1].dark();
p->drawShadePanel( X, Y, blockWidth, blockHeight,
- tc, bc, 1, colors[value-1], TRUE );
+ tc, bc, 1, colors[value-1], true );
}
else
p->fillRect( X, Y, blockWidth, blockHeight, backgroundColor() );
@@ -114,7 +114,7 @@ void TQTetrixBoard::updateRemoved( int noOfLines )
if ( noOfLines > 0 ) {
timer->stop();
timer->start( waitAfterLineTime );
- waitingAfterLine = TRUE;
+ waitingAfterLine = true;
}
emit updateRemovedSignal( noOfLines );
}
@@ -142,7 +142,7 @@ void TQTetrixBoard::pieceDropped(int)
void TQTetrixBoard::gameOver()
{
timer->stop();
- noGame = TRUE;
+ noGame = true;
emit gameOverSignal();
}
@@ -150,7 +150,7 @@ void TQTetrixBoard::timeout()
{
if ( waitingAfterLine ) {
timer->stop();
- waitingAfterLine = FALSE;
+ waitingAfterLine = false;
newPiece();
timer->start( timeoutTime );
} else {
@@ -192,7 +192,7 @@ void TQTetrixBoard::drawContents( TQPainter *p )
if (y2 >= boardHeight())
y2 = boardHeight() - 1;
- updateBoard( x1, y1, x2, y2, TRUE );
+ updateBoard( x1, y1, x2, y2, true );
paint = 0; // reset widget painter
return;
}
diff --git a/examples/textedit/textedit.cpp b/examples/textedit/textedit.cpp
index fdc6402f6..6ba56ca13 100644
--- a/examples/textedit/textedit.cpp
+++ b/examples/textedit/textedit.cpp
@@ -123,14 +123,14 @@ void TextEdit::setupTextActions()
TQPopupMenu *menu = new TQPopupMenu( this );
menuBar()->insertItem( tr( "F&ormat" ), menu );
- comboFont = new TQComboBox( TRUE, tb );
+ comboFont = new TQComboBox( true, tb );
TQFontDatabase db;
comboFont->insertStringList( db.families() );
connect( comboFont, TQ_SIGNAL( activated( const TQString & ) ),
this, TQ_SLOT( textFamily( const TQString & ) ) );
comboFont->lineEdit()->setText( TQApplication::font().family() );
- comboSize = new TQComboBox( TRUE, tb );
+ comboSize = new TQComboBox( true, tb );
TQValueList<int> sizes = db.standardSizes();
TQValueList<int>::Iterator it = sizes.begin();
for ( ; it != sizes.end(); ++it )
@@ -143,30 +143,30 @@ void TextEdit::setupTextActions()
connect( actionTextBold, TQ_SIGNAL( activated() ), this, TQ_SLOT( textBold() ) );
actionTextBold->addTo( tb );
actionTextBold->addTo( menu );
- actionTextBold->setToggleAction( TRUE );
+ actionTextBold->setToggleAction( true );
actionTextItalic = new TQAction( TQPixmap::fromMimeSource( "textitalic.xpm" ), tr( "&Italic" ), CTRL + Key_I, this, "textItalic" );
connect( actionTextItalic, TQ_SIGNAL( activated() ), this, TQ_SLOT( textItalic() ) );
actionTextItalic->addTo( tb );
actionTextItalic->addTo( menu );
- actionTextItalic->setToggleAction( TRUE );
+ actionTextItalic->setToggleAction( true );
actionTextUnderline = new TQAction( TQPixmap::fromMimeSource( "textunder.xpm" ), tr( "&Underline" ), CTRL + Key_U, this, "textUnderline" );
connect( actionTextUnderline, TQ_SIGNAL( activated() ), this, TQ_SLOT( textUnderline() ) );
actionTextUnderline->addTo( tb );
actionTextUnderline->addTo( menu );
- actionTextUnderline->setToggleAction( TRUE );
+ actionTextUnderline->setToggleAction( true );
menu->insertSeparator();
TQActionGroup *grp = new TQActionGroup( this );
connect( grp, TQ_SIGNAL( selected( TQAction* ) ), this, TQ_SLOT( textAlign( TQAction* ) ) );
actionAlignLeft = new TQAction( TQPixmap::fromMimeSource( "textleft.xpm" ), tr( "&Left" ), CTRL + Key_L, grp, "textLeft" );
- actionAlignLeft->setToggleAction( TRUE );
+ actionAlignLeft->setToggleAction( true );
actionAlignCenter = new TQAction( TQPixmap::fromMimeSource( "textcenter.xpm" ), tr( "C&enter" ), CTRL + Key_E, grp, "textCenter" );
- actionAlignCenter->setToggleAction( TRUE );
+ actionAlignCenter->setToggleAction( true );
actionAlignRight = new TQAction( TQPixmap::fromMimeSource( "textright.xpm" ), tr( "&Right" ), CTRL + Key_R, grp, "textRight" );
- actionAlignRight->setToggleAction( TRUE );
+ actionAlignRight->setToggleAction( true );
actionAlignJustify = new TQAction( TQPixmap::fromMimeSource( "textjustify.xpm" ), tr( "&Justify" ), CTRL + Key_J, grp, "textjustify" );
- actionAlignJustify->setToggleAction( TRUE );
+ actionAlignJustify->setToggleAction( true );
grp->addTo( tb );
grp->addTo( menu );
@@ -271,7 +271,7 @@ void TextEdit::filePrint()
return;
#ifndef TQT_NO_PRINTER
TQPrinter printer( TQPrinter::HighResolution );
- printer.setFullPage(TRUE);
+ printer.setFullPage(true);
if ( printer.setup( this ) ) {
TQPainter p( &printer );
// Check that there is a valid device to print to.
@@ -301,7 +301,7 @@ void TextEdit::filePrint()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
}
#endif
}
@@ -436,13 +436,13 @@ void TextEdit::colorChanged( const TQColor &c )
void TextEdit::alignmentChanged( int a )
{
if ( ( a == AlignAuto ) || ( a & AlignLeft ))
- actionAlignLeft->setOn( TRUE );
+ actionAlignLeft->setOn( true );
else if ( ( a & AlignHCenter ) )
- actionAlignCenter->setOn( TRUE );
+ actionAlignCenter->setOn( true );
else if ( ( a & AlignRight ) )
- actionAlignRight->setOn( TRUE );
+ actionAlignRight->setOn( true );
else if ( ( a & AlignJustify ) )
- actionAlignJustify->setOn( TRUE );
+ actionAlignJustify->setOn( true );
}
void TextEdit::editorChanged( TQWidget * )
diff --git a/examples/themes/metal.cpp b/examples/themes/metal.cpp
index ee3b57d12..26b1bded0 100644
--- a/examples/themes/metal.cpp
+++ b/examples/themes/metal.cpp
@@ -49,10 +49,10 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con
// pixmaps here and apply to it all widgets
TQFont f("times", ceData.font.pointSize() );
- f.setBold( TRUE );
- f.setItalic( TRUE );
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQMenuBar"));
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, TRUE, "TQPopupMenu"));
+ f.setBold( true );
+ f.setItalic( true );
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQMenuBar"));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(f, true, "TQPopupMenu"));
// TQPixmap button( stonedark_xpm );
@@ -93,7 +93,7 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con
);
TQPalette newPalette( active, disabled, active );
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, TRUE));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(newPalette, true));
}
/*!
@@ -101,8 +101,8 @@ void MetalStyle::applicationPolish( const TQStyleControlElementData &ceData, Con
*/
void MetalStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE));
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, TRUE));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetFont, TQStyleApplicationActionRequestData(ceData.font, true));
}
/*!
@@ -160,7 +160,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe,
case PE_ButtonCommand:
drawMetalButton( p, r.x(), r.y(), r.width(), r.height(),
(flags & (Style_Sunken|Style_On|Style_Down)),
- TRUE, !(flags & Style_Raised) );
+ true, !(flags & Style_Raised) );
break;
case PE_PanelMenuBar:
drawMetalFrame( p, r.x(), r.y(), r.width(), r.height() );
@@ -180,7 +180,7 @@ void MetalStyle::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarSlider:
- drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), FALSE,
+ drawMetalButton( p, r.x(), r.y(), r.width(), r.height(), false,
flags & Style_Horizontal );
break;
default:
@@ -312,17 +312,17 @@ void MetalStyle::drawComplexControl( ComplexControl cc,
SC_SliderGroove, subActive, opt, widget );
if ( (sub & SC_SliderHandle) && handle.isValid() )
drawMetalButton( p, handle.x(), handle.y(), handle.width(),
- handle.height(), FALSE,
+ handle.height(), false,
ceData.orientation == TQSlider::Horizontal);
break;
}
case CC_ComboBox:
{
- qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, TRUE,
+ qDrawWinPanel( p, r.x(), r.y(), r.width(), r.height(), cg, true,
(elementFlags & CEF_IsEnabled) ? &cg.brush( TQColorGroup::Base ) :
&cg.brush( TQColorGroup::Background ) );
drawMetalButton( p, r.x() + r.width() - 2 - 16, r.y() + 2, 16, r.height() - 4,
- how & Style_Sunken, TRUE );
+ how & Style_Sunken, true );
drawPrimitive( PE_ArrowDown, p, ceData, elementFlags,
TQRect( r.x() + r.width() - 2 - 16 + 2,
r.y() + 2 + 2, 16 - 4, r.height() - 4 -4 ),
@@ -340,8 +340,8 @@ void MetalStyle::drawComplexControl( ComplexControl cc,
/*!
- Draw a metallic button, sunken if \a sunken is TRUE, horizontal if
- /a horz is TRUE.
+ Draw a metallic button, sunken if \a sunken is true, horizontal if
+ /a horz is true.
*/
void MetalStyle::drawMetalButton( TQPainter *p, int x, int y, int w, int h,
diff --git a/examples/themes/metal.h b/examples/themes/metal.h
index 7838bd1c5..fb6fc943e 100644
--- a/examples/themes/metal.h
+++ b/examples/themes/metal.h
@@ -67,9 +67,9 @@ public:
private:
void drawMetalFrame( TQPainter *p, int x, int y, int w, int h ) const;
void drawMetalGradient( TQPainter *p, int x, int y, int w, int h,
- bool sunken, bool horz, bool flat=FALSE ) const;
+ bool sunken, bool horz, bool flat=false ) const;
void drawMetalButton( TQPainter *p, int x, int y, int w, int h,
- bool sunken, bool horz, bool flat=FALSE ) const;
+ bool sunken, bool horz, bool flat=false ) const;
TQPalette oldPalette;
};
diff --git a/examples/themes/themes.cpp b/examples/themes/themes.cpp
index 7eee9c990..82f6322d9 100644
--- a/examples/themes/themes.cpp
+++ b/examples/themes/themes.cpp
@@ -50,12 +50,12 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
setCentralWidget( tabwidget );
TQPopupMenu *style = new TQPopupMenu( this );
- style->setCheckable( TRUE );
+ style->setCheckable( true );
menuBar()->insertItem( "&Style" , style );
- style->setCheckable( TRUE );
+ style->setCheckable( true );
TQActionGroup *ag = new TQActionGroup( this, 0 );
- ag->setExclusive( TRUE );
+ ag->setExclusive( true );
TQSignalMapper *styleMapper = new TQSignalMapper( this );
connect( styleMapper, TQ_SIGNAL( mapped( const TQString& ) ), this, TQ_SLOT( makeStyle( const TQString& ) ) );
TQStringList list = TQStyleFactory::keys();
@@ -64,7 +64,7 @@ Themes::Themes( TQWidget *parent, const char *name, WFlags f )
list.insert(list.begin(), "Norwegian Wood");
list.insert(list.begin(), "Metal");
#endif
- TQDict<int> stylesDict( 17, FALSE );
+ TQDict<int> stylesDict( 17, false );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
TQString styleStr = *it;
TQString styleAccel = styleStr;
@@ -113,10 +113,10 @@ void Themes::makeStyle(const TQString &style)
tqApp->setStyle(style);
if(style == "Platinum") {
TQPalette p( TQColor( 239, 239, 239 ) );
- tqApp->setPalette( p, TRUE );
- tqApp->setFont( appFont, TRUE );
+ tqApp->setPalette( p, true );
+ tqApp->setFont( appFont, true );
} else if(style == "Windows") {
- tqApp->setFont( appFont, TRUE );
+ tqApp->setFont( appFont, true );
} else if(style == "CDE") {
TQPalette p( TQColor( 75, 123, 130 ) );
p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) );
@@ -137,12 +137,12 @@ void Themes::makeStyle(const TQString &style)
p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray );
p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray );
p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray );
- tqApp->setPalette( p, TRUE );
- tqApp->setFont( TQFont( "times", appFont.pointSize() ), TRUE );
+ tqApp->setPalette( p, true );
+ tqApp->setFont( TQFont( "times", appFont.pointSize() ), true );
} else if(style == "Motif" || style == "MotifPlus") {
TQPalette p( TQColor( 192, 192, 192 ) );
- tqApp->setPalette( p, TRUE );
- tqApp->setFont( appFont, TRUE );
+ tqApp->setPalette( p, true );
+ tqApp->setFont( appFont, true );
}
}
}
diff --git a/examples/themes/wood.cpp b/examples/themes/wood.cpp
index b9cf6cda3..d5135b8ab 100644
--- a/examples/themes/wood.cpp
+++ b/examples/themes/wood.cpp
@@ -868,12 +868,12 @@ void NorwegianWoodStyle::applicationPolish( const TQStyleControlElementData &ceD
TQBrush(op.disabled().background(), background)
);
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), TRUE));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(TQPalette(active, disabled, active), true));
}
void NorwegianWoodStyle::applicationUnPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr )
{
- applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, TRUE));
+ applicationActionRequest(ceData, elementFlags, ptr, AAR_SetPalette, TQStyleApplicationActionRequestData(oldPalette, true));
}
/*!
@@ -960,7 +960,7 @@ void NorwegianWoodStyle::drawPrimitive( PrimitiveElement pe,
p->fillRect( r, (flags & Style_Sunken ? TQBrush( cg.light(), *sunkenLight) : cg.brush( TQColorGroup::Dark ) ) );
}
p->setClipRegion( internR );
- p->setClipping( FALSE );
+ p->setClipping( false );
p->setPen( cg.foreground() );
drawroundrect( p, x, y, w, h, d );
p->setPen( oldPen );
@@ -1155,7 +1155,7 @@ void NorwegianWoodStyle::drawComplexControl( ComplexControl cc,
if ( elementFlags & CEF_IsEditable ) {
TQRect r( querySubControlMetrics(CC_ComboBox, ceData, elementFlags,
SC_ComboBoxEditField, opt, widget) );
- qDrawShadePanel( p, r, cg, TRUE, 1,
+ qDrawShadePanel( p, r, cg, true, 1,
&cg.brush(TQColorGroup::Button) );
}
diff --git a/examples/thread/prodcons/prodcons.cpp b/examples/thread/prodcons/prodcons.cpp
index 23004dfd6..a018da751 100644
--- a/examples/thread/prodcons/prodcons.cpp
+++ b/examples/thread/prodcons/prodcons.cpp
@@ -58,7 +58,7 @@ private:
ProdThread::ProdThread(TQObject *r, TQMutex *m, TQWaitCondition *c)
- : receiver(r), mutex(m), condition(c), done(FALSE)
+ : receiver(r), mutex(m), condition(c), done(false)
{
}
@@ -66,15 +66,15 @@ ProdThread::ProdThread(TQObject *r, TQMutex *m, TQWaitCondition *c)
void ProdThread::stop()
{
mutex->lock();
- done = TRUE;
+ done = true;
mutex->unlock();
}
void ProdThread::run()
{
- bool stop = FALSE;
- done = FALSE;
+ bool stop = false;
+ done = false;
uchar *buffer = new uchar[BUFSIZE];
int pos = 0, oldpos = 0;
@@ -94,7 +94,7 @@ void ProdThread::run()
mutex->lock();
if (pos == BUFSIZE) {
- done = TRUE;
+ done = true;
}
while (! bytearray.isNull() && ! stop) {
@@ -159,7 +159,7 @@ private:
ConsThread::ConsThread(TQObject *r, TQMutex *m, TQWaitCondition *c)
- : receiver(r), mutex(m), condition(c), done(FALSE)
+ : receiver(r), mutex(m), condition(c), done(false)
{
}
@@ -167,15 +167,15 @@ ConsThread::ConsThread(TQObject *r, TQMutex *m, TQWaitCondition *c)
void ConsThread::stop()
{
mutex->lock();
- done = TRUE;
+ done = true;
mutex->unlock();
}
void ConsThread::run()
{
- bool stop = FALSE;
- done = FALSE;
+ bool stop = false;
+ done = false;
TQFile file("prodcons.out");
file.open(IO_WriteOnly);
@@ -251,17 +251,17 @@ private:
ProdCons::ProdCons()
: TQWidget(0, "producer consumer widget"),
- prod(0), cons(0), stopped(FALSE), redraw(TRUE)
+ prod(0), cons(0), stopped(false), redraw(true)
{
startbutton = new TQPushButton("&Start", this);
connect(startbutton, TQ_SIGNAL(clicked()), TQ_SLOT(go()));
stopbutton = new TQPushButton("S&top", this);
connect(stopbutton, TQ_SIGNAL(clicked()), TQ_SLOT(stop()));
- stopbutton->setEnabled(FALSE);
+ stopbutton->setEnabled(false);
loopcheckbox = new TQCheckBox("Loop", this);
- loopcheckbox->setChecked(FALSE);
+ loopcheckbox->setChecked(false);
prodbar = new TQProgressBar(BUFSIZE, this);
consbar = new TQProgressBar(BUFSIZE, this);
@@ -297,13 +297,13 @@ ProdCons::~ProdCons()
void ProdCons::go()
{
- stopped = FALSE;
+ stopped = false;
mutex.lock();
if ( redraw ) {
- startbutton->setEnabled(FALSE);
- stopbutton->setEnabled(TRUE);
+ startbutton->setEnabled(false);
+ stopbutton->setEnabled(true);
}
// start the consumer first
@@ -337,11 +337,11 @@ void ProdCons::stop()
if ( redraw ) {
// no point in repainting these buttons so many times is we are looping...
- startbutton->setEnabled(TRUE);
- stopbutton->setEnabled(FALSE);
+ startbutton->setEnabled(true);
+ stopbutton->setEnabled(false);
}
- stopped = TRUE;
+ stopped = true;
}
diff --git a/examples/thread/semaphores/main.cpp b/examples/thread/semaphores/main.cpp
index 913b75dc0..a56dce146 100644
--- a/examples/thread/semaphores/main.cpp
+++ b/examples/thread/semaphores/main.cpp
@@ -29,7 +29,7 @@ class YellowThread : public TQThread
{
public:
YellowThread(TQWidget *o)
- : receiver(o), stopped(FALSE)
+ : receiver(o), stopped(false)
{ ; }
void run();
@@ -57,7 +57,7 @@ void YellowThread::run()
mutex.lock();
if (stopped) {
- stopped = FALSE;
+ stopped = false;
mutex.unlock();
break;
}
@@ -76,7 +76,7 @@ void YellowThread::run()
void YellowThread::stop()
{
mutex.lock();
- stopped = TRUE;
+ stopped = true;
mutex.unlock();
}
@@ -85,7 +85,7 @@ class GreenThread: public TQThread
{
public:
GreenThread(TQWidget *o)
- : receiver(o), stopped( FALSE )
+ : receiver(o), stopped( false )
{ ; }
void run();
@@ -113,7 +113,7 @@ void GreenThread::run()
mutex.lock();
if (stopped) {
- stopped = FALSE;
+ stopped = false;
mutex.unlock();
break;
}
@@ -133,7 +133,7 @@ void GreenThread::run()
void GreenThread::stop()
{
mutex.lock();
- stopped = TRUE;
+ stopped = true;
mutex.unlock();
}
diff --git a/examples/tictac/tictac.cpp b/examples/tictac/tictac.cpp
index 988df2385..2cc14a28f 100644
--- a/examples/tictac/tictac.cpp
+++ b/examples/tictac/tictac.cpp
@@ -64,7 +64,7 @@ TicTacGameBoard::TicTacGameBoard( int n, TQWidget *parent, const char *name )
st = Init; // initial state
nBoard = n;
n *= n; // make square
- comp_starts = FALSE; // human starts
+ comp_starts = false; // human starts
buttons = new TicTacButtons(n); // create real buttons
btArray = new TicTacArray(n); // create button model
TQGridLayout * grid = new TQGridLayout( this, nBoard, nBoard, 4 );
@@ -72,7 +72,7 @@ TicTacGameBoard::TicTacGameBoard( int n, TQWidget *parent, const char *name )
for ( int i=0; i<n; i++ ) { // create and connect buttons
TicTacButton *ttb = new TicTacButton( this );
ttb->setPalette( p );
- ttb->setEnabled( FALSE );
+ ttb->setEnabled( false );
connect( ttb, TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) );
grid->addWidget( ttb, i%nBoard, i/nBoard );
buttons->insert( i, ttb );
@@ -92,7 +92,7 @@ TicTacGameBoard::~TicTacGameBoard()
// --------------------------------------------------------------------------
// TicTacGameBoard::computerStarts( bool v )
//
-// Computer starts if v=TRUE. The human starts by default.
+// Computer starts if v=true. The human starts by default.
//
void TicTacGameBoard::computerStarts( bool v )
@@ -178,7 +178,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a )
{
int t = 0;
int row, col;
- bool won = FALSE;
+ bool won = false;
for ( row=0; row<nBoard && !won; row++ ) { // check horizontal
t = a->at(row*nBoard);
if ( t == TicTacButton::Blank )
@@ -187,7 +187,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a )
while ( col<nBoard && a->at(row*nBoard+col) == t )
col++;
if ( col == nBoard )
- won = TRUE;
+ won = true;
}
for ( col=0; col<nBoard && !won; col++ ) { // check vertical
t = a->at(col);
@@ -197,7 +197,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a )
while ( row<nBoard && a->at(row*nBoard+col) == t )
row++;
if ( row == nBoard )
- won = TRUE;
+ won = true;
}
if ( !won ) { // check diagonal top left
t = a->at(0); // to bottom right
@@ -206,7 +206,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a )
while ( i<nBoard && a->at(i*nBoard+i) == t )
i++;
if ( i == nBoard )
- won = TRUE;
+ won = true;
}
}
if ( !won ) { // check diagonal bottom left
@@ -219,7 +219,7 @@ int TicTacGameBoard::checkBoard( TicTacArray *a )
i++; j--;
}
if ( i == nBoard )
- won = TRUE;
+ won = true;
}
}
if ( !won ) // no winner
diff --git a/examples/toplevel/options.ui.h b/examples/toplevel/options.ui.h
index 5e68c55e3..225b3ca25 100644
--- a/examples/toplevel/options.ui.h
+++ b/examples/toplevel/options.ui.h
@@ -81,7 +81,7 @@ void OptionsDialog::apply()
connect( okButton, TQ_SIGNAL(clicked()), widget, TQ_SLOT(close()) );
widget->move( pos() );
} else {
- widget->reparent( parent, f, widget->geometry().topLeft(), FALSE);
+ widget->reparent( parent, f, widget->geometry().topLeft(), false);
}
widget->setCaption( leCaption->text() );
diff --git a/examples/widgets/main.cpp b/examples/widgets/main.cpp
index 6d7c217d6..ea9e7a06a 100644
--- a/examples/widgets/main.cpp
+++ b/examples/widgets/main.cpp
@@ -18,7 +18,7 @@ public:
MyWidgetView( TQWidget *parent=0, const char *name=0 )
:WidgetView(parent, name), s(0)
{
- setToolBarsMovable( TRUE );
+ setToolBarsMovable( true );
}
void button1Clicked()
diff --git a/examples/widgets/widgets.cpp b/examples/widgets/widgets.cpp
index 860e6dd45..0f7822958 100644
--- a/examples/widgets/widgets.cpp
+++ b/examples/widgets/widgets.cpp
@@ -177,7 +177,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
menuBar()->insertItem( "&File", popup );
int id;
id = popup->insertItem( "&New" );
- popup->setItemEnabled( id, FALSE );
+ popup->setItemEnabled( id, false );
id = popup->insertItem( openIcon, "&Open...", this, TQ_SLOT( open() ) );
popup->insertSeparator();
@@ -191,27 +191,27 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
popup->insertSeparator();
TQFont f = font();
- f.setBold( TRUE );
+ f.setBold( true );
id = popup->insertItem( new MyMenuItem( "&Bold", f ) );
popup->setAccel( CTRL+Key_B, id );
f = font();
- f.setItalic( TRUE );
+ f.setItalic( true );
id = popup->insertItem( new MyMenuItem( "&Italic", f ) );
- popup->setItemChecked( id, TRUE );
+ popup->setItemChecked( id, true );
popup->setAccel( CTRL+Key_I, id );
f = font();
- f.setUnderline( TRUE );
+ f.setUnderline( true );
id = popup->insertItem( new MyMenuItem( "&Underline", f ) );
popup->setAccel( CTRL+Key_U, id );
f = font();
- f.setStrikeOut( TRUE );
+ f.setStrikeOut( true );
id = popup->insertItem( new MyMenuItem( "&Strike", f ) );
connect( textStylePopup, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(popupSelected(int)) );
// Create an analog and a digital clock
AnalogClock *aclock = new AnalogClock( central );
- aclock->setAutoMask( TRUE );
+ aclock->setAutoMask( true );
DigitalClock *dclock = new DigitalClock( central );
dclock->setMaximumWidth(200);
grid->addWidget( aclock, 0, 2 );
@@ -298,7 +298,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
vbox->addSpacing( bg->fontMetrics().height() );
rb = new TQRadioButton( bg );
rb->setText( "&AM" );
- rb->setChecked( TRUE );
+ rb->setChecked( true );
vbox->addWidget(rb);
TQToolTip::add( rb, "radio button 1" );
rb = new TQRadioButton( bg );
@@ -344,7 +344,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
"The tick marks are optional."
" This slider controls the speed of the movie." );
// Create a combo box
- TQComboBox *combo = new TQComboBox( FALSE, central, "comboBox" );
+ TQComboBox *combo = new TQComboBox( false, central, "comboBox" );
combo->insertItem( "darkBlue" );
combo->insertItem( "darkRed" );
combo->insertItem( "darkGreen" );
@@ -356,7 +356,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
TQToolTip::add( combo, "read-only combo box" );
// Create an editable combo box
- TQComboBox *edCombo = new TQComboBox( TRUE, central, "edComboBox" );
+ TQComboBox *edCombo = new TQComboBox( true, central, "edComboBox" );
TQListBox *edComboLst = new TQListBox(this);
edCombo->setListBox(edComboLst);
edComboLst->insertItem( "Permutable" );
@@ -369,7 +369,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
this, TQ_SLOT(edComboBoxItemActivated(const TQString&)) );
TQToolTip::add( edCombo, "editable combo box" );
- edCombo->setAutoCompletion( TRUE );
+ edCombo->setAutoCompletion( true );
vbox = new TQVBoxLayout(8);
grid->addLayout( vbox, 2, 2 );
@@ -450,7 +450,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
TQSplitter *split = new TQSplitter( Vertical, central, "splitter" );
- split->setOpaqueResize( TRUE );
+ split->setOpaqueResize( true );
topLayout->addWidget( split, 1 );
TQListView *lv = new MyListView( split );
connect(lv, TQ_SIGNAL(selectionChanged() ),
@@ -463,13 +463,13 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
this, TQ_SLOT( mySelectionChanged(TQListViewItem*) ) );
lv->addColumn( "One" );
lv->addColumn( "Two" );
- lv->setAllColumnsShowFocus( TRUE );
+ lv->setAllColumnsShowFocus( true );
TQListViewItem *lvi= new TQListViewItem( lv, "Text", "Text" );
lvi= new TQListViewItem( lv, "Text", "Other Text" );
lvi= new TQListViewItem( lv, "Text", "More Text" );
lvi= new TQListViewItem( lv, "Text", "Extra Text" );
- lvi->setOpen(TRUE);
+ lvi->setOpen(true);
(void)new TQListViewItem( lvi, "SubText", "Additional Text" );
lvi= new TQListViewItem( lvi, "SubText", "Side Text" );
lvi= new TQListViewItem( lvi, "SubSubText", "Complimentary Text" );
@@ -491,7 +491,7 @@ WidgetView::WidgetView( TQWidget *parent, const char *name )
TQCheckListItem *lit = new TQCheckListItem( lv, "Cheese" );
- lit->setOpen( TRUE );
+ lit->setOpen( true );
(void) new TQCheckListItem( lit, "Cheddar", TQCheckListItem::RadioButton );
(void) new TQCheckListItem( lit, "Mozarella", TQCheckListItem::RadioButton );
(void) new TQCheckListItem( lit, "Jarlsberg", TQCheckListItem::RadioButton );
@@ -576,10 +576,10 @@ void WidgetView::popupSelected( int selectedId )
if ( selectedId == plainStyleID ) {
for ( int i = 0; i < int(textStylePopup->count()); i++ ) {
int id = textStylePopup->idAt( i );
- textStylePopup->setItemChecked( id, FALSE);
+ textStylePopup->setItemChecked( id, false);
}
} else {
- textStylePopup->setItemChecked( selectedId, TRUE );
+ textStylePopup->setItemChecked( selectedId, true );
}
}
@@ -679,7 +679,7 @@ void WidgetView::spinBoxValueChanged( const TQString& valueText )
bool WidgetView::eventFilter( TQObject *obj, TQEvent *event )
{
- static bool identify_now = TRUE;
+ static bool identify_now = true;
if ( event->type() == TQEvent::MouseButtonPress && identify_now ) {
TQMouseEvent *e = (TQMouseEvent*)event;
if ( e->button() == TQMouseEvent::RightButton &&
@@ -691,9 +691,9 @@ bool WidgetView::eventFilter( TQObject *obj, TQEvent *event )
str += obj->name();
else
str += "<no name>";
- identify_now = FALSE; // don't do it in message box
+ identify_now = false; // don't do it in message box
TQMessageBox::information( (TQWidget*)obj, "Identify Widget", str );
- identify_now = TRUE; // allow it again
+ identify_now = true; // allow it again
}
}
return TQMainWindow::eventFilter( obj, event ); // don't eat event
@@ -739,9 +739,9 @@ void WidgetView::showProperties()
output.sprintf( "Properties for class '%s'",
tqApp->focusWidget()->className() );
int i = 0;
- while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( TRUE ) ) {
+ while( i < (int) tqApp->focusWidget()->metaObject()->numProperties( true ) ) {
const TQMetaProperty* p
- = tqApp->focusWidget()->metaObject()->property( i, TRUE );
+ = tqApp->focusWidget()->metaObject()->property( i, true );
TQCString tmp;
tmp.sprintf( "\n %2d: %s (read-%s, %s)", ++i, p->name(),
p->writable() ? "write" : "only", p->type() );
diff --git a/examples/wizard/wizard.cpp b/examples/wizard/wizard.cpp
index 40cb686a8..47c338850 100644
--- a/examples/wizard/wizard.cpp
+++ b/examples/wizard/wizard.cpp
@@ -19,7 +19,7 @@
#include <ntqapplication.h>
Wizard::Wizard( TQWidget *parent, const char *name )
- : TQWizard( parent, name, TRUE )
+ : TQWizard( parent, name, true )
{
setupPage1();
setupPage2();
@@ -57,8 +57,8 @@ void Wizard::setupPage1()
addPage( page1, "Personal Key" );
- setNextEnabled( page1, FALSE );
- setHelpEnabled( page1, FALSE );
+ setNextEnabled( page1, false );
+ setHelpEnabled( page1, false );
}
void Wizard::setupPage2()
@@ -117,7 +117,7 @@ void Wizard::setupPage2()
addPage( page2, "Personal Data" );
- setHelpEnabled( page2, FALSE );
+ setHelpEnabled( page2, false );
}
void Wizard::setupPage3()
@@ -176,8 +176,8 @@ void Wizard::setupPage3()
addPage( page3, "Finish" );
- setFinishEnabled( page3, TRUE );
- setHelpEnabled( page3, FALSE );
+ setFinishEnabled( page3, true );
+ setHelpEnabled( page3, false );
}
void Wizard::showPage( TQWidget* page )
@@ -202,7 +202,7 @@ void Wizard::showPage( TQWidget* page )
dataChanged( firstName->text() );
firstName->setFocus();
} else if ( page == page3 ) {
- finishButton()->setEnabled( TRUE );
+ finishButton()->setEnabled( true );
finishButton()->setFocus();
}
}
@@ -220,7 +220,7 @@ void Wizard::dataChanged( const TQString & )
if ( !firstName->text().isEmpty() &&
!lastName->text().isEmpty() &&
!email->text().isEmpty() )
- nextButton()->setEnabled( TRUE );
+ nextButton()->setEnabled( true );
else
- nextButton()->setEnabled( FALSE );
+ nextButton()->setEnabled( false );
}
diff --git a/examples/xform/xform.cpp b/examples/xform/xform.cpp
index 60f73402b..8133e8980 100644
--- a/examples/xform/xform.cpp
+++ b/examples/xform/xform.cpp
@@ -162,7 +162,7 @@ XFormControl::XFormControl( const TQFont &initialFont,
bg->insert(rb_pic,2);
rb_txt->setText( tr("Text") );
rb_img->setText( tr("Image") );
- rb_img->setChecked(TRUE);
+ rb_img->setChecked(true);
rb_pic->setText( tr("Picture") );
connect( bg, TQ_SIGNAL(clicked(int)), TQ_SLOT(changeMode(int)) );
@@ -279,13 +279,13 @@ void XFormControl::changeMode(int m)
newMtx();
if ( mode == Text ) {
optionals->raiseWidget(0);
- rb_txt->setChecked(TRUE);
+ rb_txt->setChecked(true);
} else {
optionals->raiseWidget(1);
if ( mode == Image )
- rb_img->setChecked(TRUE);
+ rb_img->setChecked(true);
else
- rb_pic->setChecked(TRUE);
+ rb_pic->setChecked(true);
}
tqApp->flushX();
}
@@ -447,20 +447,20 @@ private:
void XFormCenter::newMode( int m )
{
- static bool first_i = TRUE;
- static bool first_p = TRUE;
+ static bool first_i = true;
+ static bool first_p = true;
if ( sx->mode() == m )
return;
if ( m == Image && first_i ) {
- first_i = FALSE;
+ first_i = false;
TQPixmap pm;
if ( pm.load( "image.any" ) )
sx->setPixmap( pm );
return;
}
if ( m == Picture && first_p ) {
- first_p = FALSE;
+ first_p = false;
TQPicture p;
if (p.load( "picture.any" ))
sx->setPicture( p );
diff --git a/examples/xml/outliner/outlinetree.cpp b/examples/xml/outliner/outlinetree.cpp
index ba89585b2..c380309eb 100644
--- a/examples/xml/outliner/outlinetree.cpp
+++ b/examples/xml/outliner/outlinetree.cpp
@@ -17,7 +17,7 @@ OutlineTree::OutlineTree( const TQString fileName, TQWidget *parent, const char
// div. configuration of the list view
addColumn( "Outlines" );
setSorting( -1 );
- setRootIsDecorated( TRUE );
+ setRootIsDecorated( true );
// read the XML file and create DOM tree
TQFile opmlFile( fileName );
diff --git a/examples/xml/tagreader-with-features/structureparser.cpp b/examples/xml/tagreader-with-features/structureparser.cpp
index cc5e210a1..d63207e97 100644
--- a/examples/xml/tagreader-with-features/structureparser.cpp
+++ b/examples/xml/tagreader-with-features/structureparser.cpp
@@ -38,19 +38,19 @@ bool StructureParser::startElement( const TQString& namespaceURI,
element = new TQListViewItem( table, qName, namespaceURI );
}
stack.push( element );
- element->setOpen( TRUE );
+ element->setOpen( true );
if ( attributes.length() > 0 ) {
for ( int i = 0 ; i < attributes.length(); i++ ) {
new TQListViewItem( element, attributes.qName(i), attributes.uri(i) );
}
}
- return TRUE;
+ return true;
}
bool StructureParser::endElement( const TQString&, const TQString&,
const TQString& )
{
stack.pop();
- return TRUE;
+ return true;
}
diff --git a/examples/xml/tagreader-with-features/tagreader.cpp b/examples/xml/tagreader-with-features/tagreader.cpp
index cce97d58d..6116d0b95 100644
--- a/examples/xml/tagreader-with-features/tagreader.cpp
+++ b/examples/xml/tagreader-with-features/tagreader.cpp
@@ -36,35 +36,35 @@ int main( int argc, char **argv )
"table_namespace_prefix" );
handler->setListView( namespacePrefix );
reader.setFeature( "http://xml.org/sax/features/namespace-prefixes",
- TRUE );
+ true );
source.reset();
reader.parse( source );
TQListView * prefix = new TQListView( container, "table_prefix");
handler->setListView( prefix );
- reader.setFeature( "http://xml.org/sax/features/namespaces", FALSE );
+ reader.setFeature( "http://xml.org/sax/features/namespaces", false );
source.reset();
reader.parse( source );
// namespace label
(void) new TQLabel(
"Default:\n"
- "http://xml.org/sax/features/namespaces: TRUE\n"
- "http://xml.org/sax/features/namespace-prefixes: FALSE\n",
+ "http://xml.org/sax/features/namespaces: true\n"
+ "http://xml.org/sax/features/namespace-prefixes: false\n",
container );
// namespace prefix label
(void) new TQLabel(
"\n"
- "http://xml.org/sax/features/namespaces: TRUE\n"
- "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+ "http://xml.org/sax/features/namespaces: true\n"
+ "http://xml.org/sax/features/namespace-prefixes: true\n",
container );
// prefix label
(void) new TQLabel(
"\n"
- "http://xml.org/sax/features/namespaces: FALSE\n"
- "http://xml.org/sax/features/namespace-prefixes: TRUE\n",
+ "http://xml.org/sax/features/namespaces: false\n"
+ "http://xml.org/sax/features/namespace-prefixes: true\n",
container );
diff --git a/examples/xml/tagreader/structureparser.cpp b/examples/xml/tagreader/structureparser.cpp
index a4798dc49..801d8c68c 100644
--- a/examples/xml/tagreader/structureparser.cpp
+++ b/examples/xml/tagreader/structureparser.cpp
@@ -15,7 +15,7 @@
bool StructureParser::startDocument()
{
indent = "";
- return TRUE;
+ return true;
}
bool StructureParser::startElement( const TQString&, const TQString&,
@@ -24,11 +24,11 @@ bool StructureParser::startElement( const TQString&, const TQString&,
{
printf( "%s%s\n", (const char*)indent, (const char*)qName );
indent += " ";
- return TRUE;
+ return true;
}
bool StructureParser::endElement( const TQString&, const TQString&, const TQString& )
{
indent.remove( (uint)0, 4 );
- return TRUE;
+ return true;
}
diff --git a/plugins/src/accessible/widgets/main.cpp b/plugins/src/accessible/widgets/main.cpp
index 67bd7b96e..241a70c1a 100644
--- a/plugins/src/accessible/widgets/main.cpp
+++ b/plugins/src/accessible/widgets/main.cpp
@@ -208,7 +208,7 @@ TQRESULT AccessibleFactory::createAccessibleInterface( const TQString &classname
bool AccessibleFactory::init()
{
- return TRUE;
+ return true;
}
void AccessibleFactory::cleanup()
diff --git a/plugins/src/accessible/widgets/qaccessiblemenu.cpp b/plugins/src/accessible/widgets/qaccessiblemenu.cpp
index 6a61fa558..3ff0613aa 100644
--- a/plugins/src/accessible/widgets/qaccessiblemenu.cpp
+++ b/plugins/src/accessible/widgets/qaccessiblemenu.cpp
@@ -46,7 +46,7 @@ int TQAccessiblePopup::controlAt( int x, int y ) const
{
TQPoint p = popupMenu()->mapFromGlobal( TQPoint( x,y ) );
MyPopupMenu *mp = (MyPopupMenu*)popupMenu();
- return mp->itemAtPos( p, FALSE ) + 1;
+ return mp->itemAtPos( p, false ) + 1;
}
int TQAccessiblePopup::navigate( NavDirection direction, int startControl ) const
@@ -142,29 +142,29 @@ TQAccessible::State TQAccessiblePopup::state( int control ) const
bool TQAccessiblePopup::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = popupMenu()->idAt( control -1 );
TQMenuItem *item = popupMenu()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
popupMenu()->activateItemAt( control - 1);
- return TRUE;
+ return true;
}
bool TQAccessiblePopup::setFocus( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = popupMenu()->idAt( control -1 );
TQMenuItem *item = popupMenu()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
popupMenu()->setActiveItem( control - 1 );
- return TRUE;
+ return true;
}
@@ -298,26 +298,26 @@ TQAccessible::State TQAccessibleMenuBar::state( int control ) const
bool TQAccessibleMenuBar::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = menuBar()->idAt( control -1 );
TQMenuItem *item = menuBar()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
menuBar()->activateItemAt( control - 1);
- return TRUE;
+ return true;
}
bool TQAccessibleMenuBar::setFocus( int control )
{
if ( !control )
- return FALSE;
+ return false;
int id = menuBar()->idAt( control -1 );
TQMenuItem *item = menuBar()->findItem( id );
if ( !item || !item->isEnabled() )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
diff --git a/plugins/src/accessible/widgets/qaccessiblewidget.cpp b/plugins/src/accessible/widgets/qaccessiblewidget.cpp
index 319995655..58bfb83b6 100644
--- a/plugins/src/accessible/widgets/qaccessiblewidget.cpp
+++ b/plugins/src/accessible/widgets/qaccessiblewidget.cpp
@@ -33,7 +33,7 @@
TQString buddyString( TQWidget *widget )
{
TQWidget *parent = widget->parentWidget();
- TQObjectList *ol = parent->queryList( "TQLabel", 0, FALSE, FALSE );
+ TQObjectList *ol = parent->queryList( "TQLabel", 0, false, false );
if ( !ol || !ol->count() ) {
delete ol;
return TQString::null;
@@ -80,10 +80,10 @@ TQString hotKey( const TQString &text )
TQString n = text;
int fa = 0;
- bool ac = FALSE;
+ bool ac = false;
while ( ( fa = n.find( "&", fa ) ) != -1 ) {
if ( n.at(fa+1) != '&' ) {
- ac = TRUE;
+ ac = true;
break;
}
}
@@ -139,7 +139,7 @@ int TQAccessibleWidget::controlAt( int x, int y ) const
TQPoint rp = w->mapFromGlobal( TQPoint( x, y ) );
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
if ( !list || list->isEmpty() )
return 0;
@@ -187,14 +187,14 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
switch ( dir ) {
case NavFirstChild:
{
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
bool has = !list->isEmpty();
delete list;
return has ? 1 : -1;
}
case NavLastChild:
{
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
bool has = !list->isEmpty();
delete list;
return has ? childCount() : -1;
@@ -203,7 +203,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
case NavPrevious:
{
TQWidget *parent = w->parentWidget();
- TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, FALSE, FALSE ) : 0;
+ TQObjectList *sl = parent ? parent->queryList( "TQWidget", 0, false, false ) : 0;
if ( !sl )
return -1;
TQObject *sib;
@@ -243,7 +243,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
if ( !w2 )
return -1;
- TQObjectList *list = w->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *list = w->queryList( "TQWidget", 0, false, false );
int index = list->findRef( w2 );
delete list;
return ( index != -1 ) ? index+1 : -1;
@@ -258,7 +258,7 @@ int TQAccessibleWidget::navigate( NavDirection dir, int startControl ) const
/*! \reimp */
int TQAccessibleWidget::childCount() const
{
- TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
if ( !cl )
return 0;
@@ -271,7 +271,7 @@ int TQAccessibleWidget::childCount() const
TQRESULT TQAccessibleWidget::queryChild( int control, TQAccessibleInterface **iface ) const
{
*iface = 0;
- TQObjectList *cl = widget()->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *cl = widget()->queryList( "TQWidget", 0, false, false );
if ( !cl )
return TQS_FALSE;
@@ -301,7 +301,7 @@ bool TQAccessibleWidget::doDefaultAction( int control )
#else
Q_UNUSED(control)
#endif
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -413,9 +413,9 @@ bool TQAccessibleWidget::setFocus( int control )
#endif
if ( widget()->focusPolicy() != TQWidget::NoFocus ) {
widget()->setFocus();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -424,7 +424,7 @@ bool TQAccessibleWidget::setSelected( int, bool, bool )
#if defined(QT_DEBUG)
tqWarning( "TQAccessibleWidget::setSelected: This function not supported for simple widgets." );
#endif
- return FALSE;
+ return false;
}
/*! \reimp */
@@ -503,7 +503,7 @@ TQAccessibleButton::TQAccessibleButton( TQObject *o, Role role, TQString descrip
bool TQAccessibleButton::doDefaultAction( int control )
{
if ( !widget()->isEnabled() )
- return FALSE;
+ return false;
Role r = role(control);
if ( r == PushButton || r == CheckBox || r == RadioButton ) {
@@ -513,7 +513,7 @@ bool TQAccessibleButton::doDefaultAction( int control )
tb->openPopup();
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -791,14 +791,14 @@ bool TQAccessibleSpinWidget::doDefaultAction( int control )
switch( control ) {
case 1:
if ( !((TQSpinWidget*)widget())->isUpEnabled() )
- return FALSE;
+ return false;
((TQSpinWidget*)widget())->stepUp();
- return TRUE;
+ return true;
case 2:
if ( !((TQSpinWidget*)widget())->isDownEnabled() )
- return FALSE;
+ return false;
((TQSpinWidget*)widget())->stepDown();
- return TRUE;
+ return true;
default:
break;
}
@@ -987,18 +987,18 @@ bool TQAccessibleScrollBar::doDefaultAction( int control )
switch ( control ) {
case 1:
scrollBar()->subtractLine();
- return TRUE;
+ return true;
case 2:
scrollBar()->subtractPage();
- return TRUE;
+ return true;
case 4:
scrollBar()->addPage();
- return TRUE;
+ return true;
case 5:
scrollBar()->addLine();
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1164,12 +1164,12 @@ bool TQAccessibleSlider::doDefaultAction( int control )
switch ( control ) {
case 1:
slider()->subtractLine();
- return TRUE;
+ return true;
case 3:
slider()->addLine();
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1605,33 +1605,33 @@ TQAccessible::State TQAccessibleTabBar::state( int control ) const
bool TQAccessibleTabBar::doDefaultAction( int control )
{
if ( !control )
- return FALSE;
+ return false;
if ( control > tabBar()->count() ) {
TQAccessibleInterface *iface;
TQAccessibleWidget::queryChild( control - tabBar()->count(), &iface );
if ( !iface )
- return FALSE;
+ return false;
return iface->doDefaultAction( 0 );
}
TQTab *tab = tabBar()->tabAt( control - 1 );
if ( !tab || !tab->isEnabled() )
- return FALSE;
+ return false;
tabBar()->setCurrentTab( tab );
- return TRUE;
+ return true;
}
/*! \reimp */
bool TQAccessibleTabBar::setSelected( int control, bool on, bool extend )
{
if ( !control || !on || extend || control > tabBar()->count() )
- return FALSE;
+ return false;
TQTab *tab = tabBar()->tabAt( control - 1 );
if ( !tab || !tab->isEnabled() )
- return FALSE;
+ return false;
tabBar()->setCurrentTab( tab );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -1808,9 +1808,9 @@ TQAccessible::State TQAccessibleComboBox::state( int /*control*/ ) const
bool TQAccessibleComboBox::doDefaultAction( int control )
{
if ( control != 2 )
- return FALSE;
+ return false;
comboBox()->popup();
- return TRUE;
+ return true;
}
/*!
@@ -2014,20 +2014,20 @@ bool TQAccessibleTitleBar::doDefaultAction( int control )
titleBar()->window()->showNormal();
else
titleBar()->window()->showMinimized();
- return TRUE;
+ return true;
case 4:
if ( titleBar()->window()->isMaximized() )
titleBar()->window()->showNormal();
else
titleBar()->window()->showMaximized();
- return TRUE;
+ return true;
case 5:
titleBar()->window()->close();
- return TRUE;
+ return true;
default:
break;
}
- return FALSE;
+ return false;
}
@@ -2295,9 +2295,9 @@ bool TQAccessibleListBox::setFocus( int control )
TQListBoxItem *item = listBox()->item( control -1 );
if ( !item )
- return FALSE;
+ return false;
listBox()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2306,11 +2306,11 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
listBox()->selectionMode() != TQListBox::Extended &&
listBox()->selectionMode() != TQListBox::Multi ) )
- return FALSE;
+ return false;
TQListBoxItem *item = listBox()->item( control -1 );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
listBox()->setSelected( item, on );
} else {
@@ -2322,7 +2322,7 @@ bool TQAccessibleListBox::setSelected( int control, bool on, bool extend )
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2509,9 +2509,9 @@ bool TQAccessibleListView::setFocus( int control )
TQListViewItem *item = findLVItem( listView(), control );
if ( !item )
- return FALSE;
+ return false;
listView()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2520,17 +2520,17 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
listView()->selectionMode() != TQListView::Extended &&
listView()->selectionMode() != TQListView::Multi ) )
- return FALSE;
+ return false;
TQListViewItem *item = findLVItem( listView(), control );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
listView()->setSelected( item, on );
} else {
TQListViewItem *current = listView()->currentItem();
if ( !current )
- return FALSE;
+ return false;
bool down = item->itemPos() > current->itemPos();
TQListViewItemIterator it( current );
while ( it.current() ) {
@@ -2543,7 +2543,7 @@ bool TQAccessibleListView::setSelected( int control, bool on, bool extend )
--it;
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2697,9 +2697,9 @@ bool TQAccessibleIconView::setFocus( int control )
TQIconViewItem *item = findIVItem( iconView(), control );
if ( !item )
- return FALSE;
+ return false;
iconView()->setCurrentItem( item );
- return TRUE;
+ return true;
}
/*! \reimp */
@@ -2708,41 +2708,41 @@ bool TQAccessibleIconView::setSelected( int control, bool on, bool extend )
if ( !control || ( extend &&
iconView()->selectionMode() != TQIconView::Extended &&
iconView()->selectionMode() != TQIconView::Multi ) )
- return FALSE;
+ return false;
TQIconViewItem *item = findIVItem( iconView(), control );
if ( !item )
- return FALSE;
+ return false;
if ( !extend ) {
- iconView()->setSelected( item, on, TRUE );
+ iconView()->setSelected( item, on, true );
} else {
TQIconViewItem *current = iconView()->currentItem();
if ( !current )
- return FALSE;
- bool down = FALSE;
+ return false;
+ bool down = false;
TQIconViewItem *temp = current;
while ( ( temp = temp->nextItem() ) ) {
if ( temp == item ) {
- down = TRUE;
+ down = true;
break;
}
}
temp = current;
if ( down ) {
while ( ( temp = temp->nextItem() ) ) {
- iconView()->setSelected( temp, on, TRUE );
+ iconView()->setSelected( temp, on, true );
if ( temp == item )
break;
}
} else {
while ( ( temp = temp->prevItem() ) ) {
- iconView()->setSelected( temp, on, TRUE );
+ iconView()->setSelected( temp, on, true );
if ( temp == item )
break;
}
}
}
- return TRUE;
+ return true;
}
/*! \reimp */
diff --git a/plugins/src/imageformats/jpeg/main.cpp b/plugins/src/imageformats/jpeg/main.cpp
index d4f66b064..b847660e2 100644
--- a/plugins/src/imageformats/jpeg/main.cpp
+++ b/plugins/src/imageformats/jpeg/main.cpp
@@ -34,7 +34,7 @@ TQStringList JPEGFormat::keys() const
bool JPEGFormat::loadImage( const TQString &format, const TQString &filename, TQImage *image )
{
if ( format != "JPEG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -42,13 +42,13 @@ bool JPEGFormat::loadImage( const TQString &format, const TQString &filename, TQ
read_jpeg_image( &io );
- return TRUE;
+ return true;
}
bool JPEGFormat::saveImage( const TQString &format, const TQString &filename, const TQImage &image )
{
if ( format != "JPEG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -56,16 +56,16 @@ bool JPEGFormat::saveImage( const TQString &format, const TQString &filename, co
write_jpeg_image( &io );
- return TRUE;
+ return true;
}
bool JPEGFormat::installIOHandler( const TQString &name )
{
if ( name.upper() != "JPEG" )
- return FALSE;
+ return false;
qInitJpegIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( JPEGFormat )
diff --git a/plugins/src/imageformats/mng/main.cpp b/plugins/src/imageformats/mng/main.cpp
index f08dc3166..98df5f92e 100644
--- a/plugins/src/imageformats/mng/main.cpp
+++ b/plugins/src/imageformats/mng/main.cpp
@@ -33,21 +33,21 @@ TQStringList MNGFormat::keys() const
bool MNGFormat::loadImage( const TQString &, const TQString &, TQImage * )
{
- return FALSE;
+ return false;
}
bool MNGFormat::saveImage( const TQString &, const TQString &, const TQImage& )
{
- return FALSE;
+ return false;
}
bool MNGFormat::installIOHandler( const TQString &name )
{
if ( name != "MNG" )
- return FALSE;
+ return false;
qInitMngIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( MNGFormat )
diff --git a/plugins/src/imageformats/png/main.cpp b/plugins/src/imageformats/png/main.cpp
index 7724c9112..c48500995 100644
--- a/plugins/src/imageformats/png/main.cpp
+++ b/plugins/src/imageformats/png/main.cpp
@@ -34,7 +34,7 @@ TQStringList PNGFormat::keys() const
bool PNGFormat::loadImage( const TQString &format, const TQString &filename, TQImage *image )
{
if ( format != "PNG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -42,13 +42,13 @@ bool PNGFormat::loadImage( const TQString &format, const TQString &filename, TQI
read_png_image( &io );
- return TRUE;
+ return true;
}
bool PNGFormat::saveImage( const TQString &format, const TQString &filename, const TQImage &image )
{
if ( format != "PNG" )
- return FALSE;
+ return false;
TQImageIO io;
io.setFileName( filename );
@@ -56,16 +56,16 @@ bool PNGFormat::saveImage( const TQString &format, const TQString &filename, con
write_png_image( &io );
- return TRUE;
+ return true;
}
bool PNGFormat::installIOHandler( const TQString &name )
{
if ( name != "PNG" )
- return FALSE;
+ return false;
qInitPngIO();
- return TRUE;
+ return true;
}
TQ_EXPORT_PLUGIN( PNGFormat )
diff --git a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
index 13ecf8112..e35f88b6b 100644
--- a/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
+++ b/plugins/src/inputmethods/imsw-multi/qmultiinputcontext.cpp
@@ -54,9 +54,9 @@
#define TQT_NO_IM_QMULTIINPUTCONTEXT_IMINDEX
TQMultiInputContext::TQMultiInputContext()
- : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( FALSE ),
+ : TQInputContext(), _slave( 0 ), imIndex( 0 ), cachedFocus( false ),
cachedFocusWidget( 0 ), cachedHolderWidget( 0 ),
- beIndirectlyConnected( FALSE ), popup( NULL ), currentIMKey( TQString::null )
+ beIndirectlyConnected( false ), popup( NULL ), currentIMKey( TQString::null )
{
keyDict.setAutoDelete( true );
keyDict.clear();
@@ -93,7 +93,7 @@ TQString TQMultiInputContext::language()
#if defined(TQ_WS_X11)
bool TQMultiInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
{
- return ( slave() ) ? slave()->x11FilterEvent( keywidget, event ) : FALSE;
+ return ( slave() ) ? slave()->x11FilterEvent( keywidget, event ) : false;
}
#endif // TQ_WS_X11
@@ -111,16 +111,16 @@ bool TQMultiInputContext::filterEvent( const TQEvent *event )
( keyevent->state() & TQt::AltButton ) ) {
if ( keyevent->key() == TQt::Key_Up ) {
changeInputMethod( --imIndex );
- return TRUE;
+ return true;
} else if ( keyevent->key() == TQt::Key_Down ) {
changeInputMethod( ++imIndex );
- return TRUE;
+ return true;
}
}
}
#endif
- return ( slave() ) ? slave()->filterEvent( event ) : FALSE;
+ return ( slave() ) ? slave()->filterEvent( event ) : false;
}
void TQMultiInputContext::reset()
@@ -132,14 +132,14 @@ void TQMultiInputContext::reset()
void TQMultiInputContext::setFocus()
{
- cachedFocus = TRUE;
+ cachedFocus = true;
if ( slave() )
slave()->setFocus();
}
void TQMultiInputContext::unsetFocus()
{
- cachedFocus = FALSE;
+ cachedFocus = false;
if ( slave() )
slave()->unsetFocus();
}
@@ -180,7 +180,7 @@ void TQMultiInputContext::destroyInputContext()
/*!
This function is a placeholder for future experiment or extension
- such as commit string snooping. set beIndirectlyConnected = TRUE
+ such as commit string snooping. set beIndirectlyConnected = true
to activate this virtual function.
*/
void TQMultiInputContext::postIMEvent( TQObject *receiver, TQIMEvent *event )
@@ -225,12 +225,12 @@ void TQMultiInputContext::releaseComposingWidget( TQWidget *w )
bool TQMultiInputContext::isComposing() const
{
- return ( slave() ) ? slave()->isComposing() : FALSE;
+ return ( slave() ) ? slave()->isComposing() : false;
}
bool TQMultiInputContext::isPreeditRelocationEnabled()
{
- return ( slave() ) ? slave()->isPreeditRelocationEnabled() : FALSE;
+ return ( slave() ) ? slave()->isPreeditRelocationEnabled() : false;
}
TQInputContext *TQMultiInputContext::slave()
diff --git a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp
index 907ed1ade..2673d138c 100644
--- a/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp
+++ b/plugins/src/inputmethods/simple/qsimpleinputcontext.cpp
@@ -88,20 +88,20 @@ class Cmp
public:
bool operator () (const TQComposeTableElement &lhs, const TQComposeTableElement &rhs) const {
for ( size_t i=0; i < QT_KEYSEQUENCE_MAX_LEN; i++ ) {
- if ( lhs.keys[i] < rhs.keys[i] ) return TRUE;
+ if ( lhs.keys[i] < rhs.keys[i] ) return true;
else
- if ( lhs.keys[i] > rhs.keys[i] ) return FALSE;
+ if ( lhs.keys[i] > rhs.keys[i] ) return false;
}
- return FALSE;
+ return false;
}
bool operator () (const TQComposeTableElement &lhs, const uint rhs[QT_KEYSEQUENCE_MAX_LEN]) const {
for ( size_t i=0; i < QT_KEYSEQUENCE_MAX_LEN; i++ ) {
- if ( lhs.keys[i] < rhs[i] ) return TRUE;
+ if ( lhs.keys[i] < rhs[i] ) return true;
else
- if ( lhs.keys[i] > rhs[i] ) return FALSE;
+ if ( lhs.keys[i] > rhs[i] ) return false;
}
- return FALSE;
+ return false;
}
};
@@ -119,14 +119,14 @@ TQSimpleInputContext::~TQSimpleInputContext()
bool TQSimpleInputContext::filterEvent( const TQEvent *event )
{
if ( event->type() != TQEvent::KeyPress )
- return FALSE;
+ return false;
TQKeyEvent *keyevent = (TQKeyEvent *)event;
int keyval = keyevent->key();
int val = 0;
if ( isIgnoreKeys( keyval ) )
- return FALSE;
+ return false;
if ( isComposingKeys( keyval ) ) {
// If composing keys are pressed, use keyval directly
@@ -134,7 +134,7 @@ bool TQSimpleInputContext::filterEvent( const TQEvent *event )
} else {
TQString text = keyevent->text();
if ( text.isEmpty() )
- return FALSE;
+ return false;
// If not composing keys are pressed, use the character's unicode value
// NOTE : The contents of TQKeyEvent::text() is restricted to
@@ -158,9 +158,9 @@ bool TQSimpleInputContext::filterEvent( const TQEvent *event )
// check sequence
if( checkComposeTable( composeBuffer, &defaultComposeTable ) )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void TQSimpleInputContext::setFocus()
@@ -218,18 +218,18 @@ bool TQSimpleInputContext::isIgnoreKeys( int keyval )
{
for ( uint i = 0; i < (sizeof(ignoreKeys)/sizeof(ignoreKeys[0])); i++ )
if ( keyval == ignoreKeys[i] )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
bool TQSimpleInputContext::isComposingKeys( int keyval )
{
for ( uint i = 0; i < (sizeof(composingKeys)/sizeof(composingKeys[0])); i++ )
if ( keyval == composingKeys[i] )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQComposeTable *composeTable )
@@ -243,7 +243,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo
if ( p == composeTable->data + composeTable->size ) {
// tqDebug( "no match" );
clearComposeBuffer();
- return FALSE;
+ return false;
}
// check if compose buffer is matched
@@ -252,7 +252,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo
// check if partial match
if ( composeBuffer[i] == 0 && p->keys[i] ) {
// tqDebug("partial match");
- return TRUE;
+ return true;
}
if ( composeBuffer[i] != p->keys[i] ) {
@@ -268,7 +268,7 @@ bool TQSimpleInputContext::checkComposeTable( uint* composeBuffer, const TQCompo
commitChar( p->value );
clearComposeBuffer();
- return TRUE;
+ return true;
}
void TQSimpleInputContext::commitChar( uint c )
diff --git a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
index e56df9d99..3ffc4c886 100644
--- a/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
+++ b/plugins/src/inputmethods/xim/qximinputcontext_x11.cpp
@@ -68,7 +68,7 @@ static XIM qt_xim = 0;
extern XIMStyle qt_xim_style;
extern XIMStyle qt_xim_preferred_style;
extern char *qt_ximServer;
-static bool isInitXIM = FALSE;
+static bool isInitXIM = false;
static TQPtrList<TQXIMInputContext> *ximContextList = 0;
#endif
extern int qt_ximComposingKeycode;
@@ -196,10 +196,10 @@ extern "C" {
return 0;
}
- bool send_imstart = FALSE;
+ bool send_imstart = false;
if( ! qic->isComposing() && qic->hasFocus() ) {
qic->resetClientState();
- send_imstart = TRUE;
+ send_imstart = true;
} else if ( ! qic->isComposing() || ! qic->hasFocus() ) {
#ifdef QT_XIM_DEBUG
tqDebug( "compose event: invalid compose event composing=%d hasFocus=%d",
@@ -274,7 +274,7 @@ extern "C" {
// figure out where the selection starts, and how long it is
p = qic->selectedChars.data();
- bool started = FALSE;
+ bool started = false;
for ( x = 0; x < TQMIN(qic->composingText.length(), qic->selectedChars.size()); ++x ) {
if ( started ) {
if ( *p ) ++sellen;
@@ -282,7 +282,7 @@ extern "C" {
} else {
if ( *p ) {
cursor = x;
- started = TRUE;
+ started = true;
sellen = 1;
}
}
@@ -460,7 +460,7 @@ TQXIMInputContext::~TQXIMInputContext()
// We prefer a less serious memory leak
if( qt_xim ) {
qt_xim = 0;
- isInitXIM = FALSE;
+ isInitXIM = false;
}
delete ximContextList;
@@ -476,7 +476,7 @@ void TQXIMInputContext::init_xim()
{
#ifndef TQT_NO_XIM
if(!isInitXIM)
- isInitXIM = TRUE;
+ isInitXIM = true;
qt_xim = 0;
TQString ximServerName(qt_ximServer);
@@ -615,7 +615,7 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
// follwing codes don't exist
#if 0
if ( event->type != XKeyPress || ! (qt_xim_style & XIMPreeditCallbacks) )
- return TRUE;
+ return true;
/*
* The Solaris htt input method will transform a ClientMessage
@@ -626,7 +626,7 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
if ( ! keywidget ) {
keywidget = (TQETWidget*)TQWidget::keyboardGrabber();
if ( keywidget ) {
- grabbed = TRUE;
+ grabbed = true;
} else {
if ( focus_widget )
keywidget = (TQETWidget*)focus_widget;
@@ -653,12 +653,12 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
*/
if ( composing && focusWidget && qt_compose_emptied ) {
XEvent event2;
- bool found = FALSE;
+ bool found = false;
if ( XCheckTypedEvent( TQPaintDevice::x11AppDisplay(),
XKeyPress, &event2 ) ) {
if ( event2.xkey.keycode == 0 ) {
// found a key event with the 'commit' string
- found = TRUE;
+ found = true;
XPutBackEvent( TQPaintDevice::x11AppDisplay(), &event2 );
}
}
@@ -671,10 +671,10 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
focusWidget = 0;
}
- qt_compose_emptied = FALSE;
+ qt_compose_emptied = false;
}
#endif
- return TRUE;
+ return true;
} else if ( focusWidget() ) {
if ( event->type == XKeyPress && event->xkey.keycode == 0 ) {
// input method has sent us a commit string
@@ -694,12 +694,12 @@ bool TQXIMInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
sendIMEvent( TQEvent::IMEnd, inputText );
resetClientState();
- return TRUE;
+ return true;
}
}
#endif // !TQT_NO_XIM
- return FALSE;
+ return false;
}
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index 329b79967..efb20d6cd 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -64,7 +64,7 @@ ProjectBuilderMakefileGenerator::writeMakefile(TQTextStream &t)
/* for now just dump, I need to generated an empty xml or something.. */
fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
var("QMAKE_FAILED_REQUIREMENTS").latin1());
- return TRUE;
+ return true;
}
project->variables()["MAKEFILE"].clear();
@@ -72,8 +72,8 @@ ProjectBuilderMakefileGenerator::writeMakefile(TQTextStream &t)
if(project->first("TEMPLATE") == "app" || project->first("TEMPLATE") == "lib")
return writeMakeParts(t);
else if(project->first("TEMPLATE") == "subdirs")
- return writeSubdirs(t, FALSE);
- return FALSE;
+ return writeSubdirs(t, false);
+ return false;
}
bool
@@ -102,7 +102,7 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct)
TQString oldpwd = TQDir::currentDirPath();
TQMap<TQString, TQStringList> groups;
for(TQStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) {
- TQFileInfo fi(Option::fixPathToLocalOS((*it), TRUE));
+ TQFileInfo fi(Option::fixPathToLocalOS((*it), true));
if(fi.exists()) {
if(fi.isDir()) {
TQString profile = (*it);
@@ -138,17 +138,17 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct)
project->variables()["QMAKE_PBX_SUBDIRS"] += pbxproj;
//PROJECTREF
{
- bool in_root = TRUE;
+ bool in_root = true;
TQString name = TQDir::currentDirPath();
TQString project_key = keyFor(pbxproj + "_PROJECTREF");
if(project->isActiveConfig("flat")) {
- TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE);
+ TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, true);
if(flat_file.find(Option::dir_sep) != -1) {
TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file);
name = dirs.back();
}
} else {
- TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, TRUE);
+ TQString flat_file = fileFixify(name, oldpwd, Option::output_dir, true);
if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) {
TQString last_grp("QMAKE_PBX_HEIR_GROUP");
TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file);
@@ -165,7 +165,7 @@ ProjectBuilderMakefileGenerator::writeSubdirs(TQTextStream &t, bool direct)
last_grp = new_grp;
}
groups[last_grp] += project_key;
- in_root = FALSE;
+ in_root = false;
}
}
if(in_root)
@@ -328,7 +328,7 @@ nextfile:
<< "\t" << "rootObject = " << keyFor("QMAKE_PBX_ROOT") << ";" << "\n"
<< "}" << endl;
- return TRUE;
+ return true;
}
bool
@@ -336,7 +336,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
{
int i;
TQStringList tmp;
- bool did_preprocess = FALSE;
+ bool did_preprocess = false;
//HEADER
const int pbVersion = pbuilderVersion();
@@ -411,14 +411,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
for(TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
TQStringList files = (*it);
- bool buildable = TRUE;
+ bool buildable = true;
if(srcs[i] == "FORMS") {
TQString form_dot_h = (*it) + Option::h_ext.first();
if(TQFile::exists(form_dot_h))
files += form_dot_h;
- buildable = FALSE;
+ buildable = false;
} else if(srcs[i] == "HEADERS" || srcs[i] == "QMAKE_INTERNAL_INCLUDED_FILES") {
- buildable = FALSE;
+ buildable = false;
}
files = fileFixify(files);
@@ -428,16 +428,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
file = file.mid(1, file.length()-2);
if(file.endsWith(Option::cpp_moc_ext) || file.endsWith(Option::prl_ext))
continue;
- bool in_root = TRUE;
+ bool in_root = true;
TQString src_key = keyFor(file), name = file;
if(project->isActiveConfig("flat")) {
- TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, TRUE);
+ TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, true);
if(flat_file.find(Option::dir_sep) != -1) {
TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file);
name = dirs.back();
}
} else {
- TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, TRUE);
+ TQString flat_file = fileFixify(file, TQDir::currentDirPath(), Option::output_dir, true);
if(TQDir::isRelativePath(flat_file) && flat_file.find(Option::dir_sep) != -1) {
TQString last_grp("QMAKE_PBX_" + src_group + "_HEIR_GROUP");
TQStringList dirs = TQStringList::split(Option::dir_sep, flat_file);
@@ -455,7 +455,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
last_grp = new_grp;
}
groups[last_grp] += src_key;
- in_root = FALSE;
+ in_root = false;
}
}
if(in_root)
@@ -540,7 +540,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
TQString mkfile = pbx_dir + Option::dir_sep + "qt_preprocess.mak";
TQFile mkf(mkfile);
if(mkf.open(IO_WriteOnly | IO_Translate)) {
- did_preprocess = TRUE;
+ did_preprocess = true;
debug_msg(1, "pbuilder: Creating file: %s", mkfile.latin1());
TQTextStream mkt(&mkf);
writeHeader(mkt);
@@ -560,7 +560,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
TQStringList &yaccs = project->variables()["YACCSOURCES"];
for(TQStringList::Iterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) {
TQFileInfo fi((*yit));
- mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE)
+ mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(true)
<< Option::yacc_mod << Option::cpp_ext.first();
}
}
@@ -568,7 +568,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
TQStringList &lexs = project->variables()["LEXSOURCES"];
for(TQStringList::Iterator lit = lexs.begin(); lit != lexs.end(); ++lit) {
TQFileInfo fi((*lit));
- mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(TRUE)
+ mkt << " " << fi.dirPath() << Option::dir_sep << fi.baseName(true)
<< Option::lex_mod << Option::cpp_ext.first();
}
}
@@ -637,7 +637,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
for(i = 0; !libs[i].isNull(); i++) {
tmp = project->variables()[libs[i]];
for(TQStringList::Iterator it = tmp.begin(); it != tmp.end();) {
- bool remove = FALSE;
+ bool remove = false;
TQString library, name, opt = (*it).stripWhiteSpace();
if(opt.length() >= 2 && (opt[0] == '"' || opt[0] == '\'') && opt[(int) opt.length()-1] == opt[0])
opt = opt.mid(1, opt.length()-2);
@@ -647,7 +647,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
libdirs.append(r);
} else if(opt == "-prebind") {
project->variables()["QMAKE_DO_PREBINDING"].append("TRUE");
- remove = TRUE;
+ remove = true;
} else if(opt.startsWith("-l")) {
name = opt.right(opt.length() - 2);
TQString lib("lib" + name);
@@ -668,7 +668,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
library = (*lit) + Option::dir_sep + libinfo.first("QMAKE_PRL_TARGET");
debug_msg(1, "pbuilder: Found library (%s) via PRL %s (%s)",
opt.latin1(), lib_file.latin1(), library.latin1());
- remove = TRUE;
+ remove = true;
}
}
}
@@ -681,7 +681,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
library = tmp;
debug_msg(1, "pbuilder: Found library (%s) via %s",
opt.latin1(), library.latin1());
- remove = TRUE;
+ remove = true;
}
}
}
@@ -697,14 +697,14 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
if(TQFile::exists((*fit) + TQDir::separator() + (*it) + ".framework")) {
--it;
it = tmp.remove(it);
- remove = TRUE;
+ remove = true;
library = (*fit) + Option::dir_sep + (*it) + ".framework";
break;
}
}
} else if(opt.left(1) != "-") {
if(TQFile::exists(opt)) {
- remove = TRUE;
+ remove = true;
library = opt;
}
}
@@ -1248,7 +1248,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(TQTextStream &t)
<< pbx_dir << Option::dir_sep << "qt_preprocess.mak $@" << endl;
}
}
- return TRUE;
+ return true;
}
TQString
diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h
index a3f43eb8e..60c0be8b1 100644
--- a/qmake/generators/mac/pbuilder_pbx.h
+++ b/qmake/generators/mac/pbuilder_pbx.h
@@ -64,8 +64,8 @@ public:
virtual bool openOutput(TQFile &) const;
protected:
- bool doPrecompiledHeaders() const { return FALSE; }
- virtual bool doDepends() const { return FALSE; } //never necesary
+ bool doPrecompiledHeaders() const { return false; }
+ virtual bool doDepends() const { return false; } //never necesary
};
inline ProjectBuilderMakefileGenerator::~ProjectBuilderMakefileGenerator()
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 9c49b2b15..f9b179f44 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -76,16 +76,16 @@ TQString mkdir_p_asstring(const TQString &dir)
static bool createDir(const TQString& fullPath)
{
if(TQFile::exists(fullPath))
- return FALSE;
+ return false;
TQDir dirTmp;
- bool ret = TRUE;
+ bool ret = true;
TQString pathComponent, tmpPath;
- TQStringList hierarchy = TQStringList::split(TQString(Option::dir_sep), fullPath, TRUE);
+ TQStringList hierarchy = TQStringList::split(TQString(Option::dir_sep), fullPath, true);
for(TQStringList::Iterator it = hierarchy.begin(); it != hierarchy.end(); ++it) {
pathComponent = *it + TQDir::separator();
tmpPath += pathComponent;
if(!dirTmp.mkdir(tmpPath)) {
- ret = FALSE;
+ ret = false;
// break;
}
}
@@ -93,9 +93,9 @@ static bool createDir(const TQString& fullPath)
}
-MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(FALSE),
- init_already(FALSE), moc_aware(FALSE),
- no_io(FALSE), project(p)
+MakefileGenerator::MakefileGenerator(TQMakeProject *p) : init_opath_already(false),
+ init_already(false), moc_aware(false),
+ no_io(false), project(p)
{
}
@@ -112,17 +112,17 @@ bool
MakefileGenerator::generateMocList(const TQString &fn_target)
{
if(!findMocDestination(fn_target).isEmpty())
- return TRUE;
+ return true;
TQString fn_local = Option::fixPathToLocalOS(fileFixify(fn_target, TQDir::currentDirPath(), Option::output_dir));
int file = open(fn_local.latin1(), O_RDONLY);
if(file == -1)
- return FALSE;
+ return false;
struct stat fst;
if(fstat(file, &fst) || S_ISDIR(fst.st_mode))
- return FALSE; //shouldn't happen
+ return false; //shouldn't happen
char *big_buffer = gimme_buffer(fst.st_size);
int total_size_read;
@@ -132,7 +132,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target)
total_size_read += have_read);
close(file);
- bool ignore_qobject = FALSE;
+ bool ignore_qobject = false;
int line_count = 1;
/* qmake ignore TQ_OBJECT */
#define COMP_LEN 9 //strlen("TQ_OBJECT")
@@ -154,7 +154,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target)
debug_msg(2, "Mocgen: %s:%d Found \"qmake ignore TQ_OBJECT\"",
fn_target.latin1(), line_count);
x += 20;
- ignore_qobject = TRUE;
+ ignore_qobject = true;
}
}
} else if(*(big_buffer + x) == '*') {
@@ -179,14 +179,14 @@ MakefileGenerator::generateMocList(const TQString &fn_target)
if(!strncmp(big_buffer+x, "TQ_OBJECT", OBJ_LEN)) {
if(ignore_qobject) {
debug_msg(2, "Mocgen: %s:%d Ignoring TQ_OBJECT", fn_target.latin1(), line_count);
- interesting = FALSE;
+ interesting = false;
}
len=OBJ_LEN;
} else if(!strncmp(big_buffer+x, "Q_DISPATCH", DIS_LEN)) {
len=DIS_LEN;
}
if(SYMBOL_CHAR(*(big_buffer+x+len)))
- interesting = FALSE;
+ interesting = false;
if(interesting) {
*(big_buffer+x+len) = '\0';
debug_msg(2, "Mocgen: %s:%d Found MOC symbol %s", fn_target.latin1(),
@@ -201,7 +201,7 @@ MakefileGenerator::generateMocList(const TQString &fn_target)
else if(dir_pos != -1)
mocFile = fn_target.left(dir_pos+1);
- bool cpp_ext = FALSE;
+ bool cpp_ext = false;
for(TQStringList::Iterator cppit = Option::cpp_ext.begin();
cppit != Option::cpp_ext.end(); ++cppit) {
if((cpp_ext = (fn_target.right(ext_len) == (*cppit))))
@@ -239,26 +239,26 @@ MakefileGenerator::generateMocList(const TQString &fn_target)
}
#undef OBJ_LEN
#undef DIS_LEN
- return TRUE;
+ return true;
}
bool
MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, const TQString &f, bool recurse)
{
if(processedDependencies(f))
- return TRUE;
- setProcessedDependencies(f, TRUE);
+ return true;
+ setProcessedDependencies(f, true);
TQStringList &fndeps = findDependencies(f);
TQString fn = fileFixify(f, TQDir::currentDirPath(), Option::output_dir);
- fn = Option::fixPathToLocalOS(fn, FALSE);
+ fn = Option::fixPathToLocalOS(fn, false);
TQString fix_env_fn = Option::fixPathToLocalOS(fn);
int file = open(fix_env_fn.latin1(), O_RDONLY);
if(file == -1)
- return FALSE;
+ return false;
struct stat fst;
if(fstat(file, &fst) || S_ISDIR(fst.st_mode))
- return FALSE; //shouldn't happen
+ return false; //shouldn't happen
TQString fndir, fix_env_fndir;
int dl = fn.findRev(Option::dir_sep);
@@ -394,7 +394,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
x++;
}
int val_len;
- for(val_len = 0; TRUE; val_len++) {
+ for(val_len = 0; true; val_len++) {
if(quote) {
if(*(big_buffer+x+val_len) == quote)
break;
@@ -423,17 +423,17 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
}
if(!inc.isEmpty()) {
- bool from_source_dir = TRUE;
+ bool from_source_dir = true;
debug_msg(5, "%s:%d Found dependency to %s", fix_env_fn.latin1(),
line_count, inc.latin1());
if(!project->isEmpty("SKIP_DEPENDS")) {
- bool found = FALSE;
+ bool found = false;
TQStringList &nodeplist = project->values("SKIP_DEPENDS");
for(TQStringList::Iterator it = nodeplist.begin();
it != nodeplist.end(); ++it) {
TQRegExp regx((*it));
if(regx.search(inc) != -1) {
- found = TRUE;
+ found = true;
break;
}
}
@@ -472,7 +472,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
//and see if they go away..
if(depHeuristics.contains(inc)) {
fqn = depHeuristics[inc];
- from_source_dir = FALSE;
+ from_source_dir = false;
} else if(Option::mkfile::do_dep_heuristics) { //some heuristics..
//is it a file from a .ui?
TQString inc_file = inc.section(Option::dir_sep, -1);
@@ -493,7 +493,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
if(!fqn.isEmpty() && !fqn.endsWith(Option::dir_sep))
fqn += Option::dir_sep;
fqn += inc_file;
- from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
+ from_source_dir = false; //uics go in the output_dir (so don't fix them)
fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir);
goto cache_fqn;
}
@@ -515,7 +515,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH");
if(s == lhs) {
fqn = d + inc;
- from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
+ from_source_dir = false; //uics go in the output_dir (so don't fix them)
fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir);
goto cache_fqn;
}
@@ -538,7 +538,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
d = project->first("QMAKE_ABSOLUTE_SOURCE_PATH");
if(s == lhs) {
fqn = d + inc;
- from_source_dir = FALSE; //uics go in the output_dir (so don't fix them)
+ from_source_dir = false; //uics go in the output_dir (so don't fix them)
fqn = fileFixify(fqn, TQDir::currentDirPath(), Option::output_dir);
goto cache_fqn;
}
@@ -567,7 +567,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
"Found potential multiple MOC include %s (%s) in '%s'",
inc.latin1(), fqn.latin1(), fix_env_fn.latin1());
}
- from_source_dir = FALSE; //mocs go in the output_dir (so don't fix them)
+ from_source_dir = false; //mocs go in the output_dir (so don't fix them)
goto cache_fqn;
}
}
@@ -577,7 +577,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
cache_fqn:
if(from_source_dir) {
fqn = fileFixify(fqn);
- from_source_dir = FALSE;
+ from_source_dir = false;
}
depHeuristics.insert(inc, fqn);
}
@@ -585,7 +585,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
handle_fqn:
if(fqn.isEmpty()) //I give up
continue;
- fqn = Option::fixPathToTargetOS(fqn, FALSE);
+ fqn = Option::fixPathToTargetOS(fqn, false);
if(from_source_dir)
fqn = fileFixify(fqn);
debug_msg(4, "Resolved dependency of %s to %s", inc.latin1(), fqn.latin1());
@@ -607,7 +607,7 @@ MakefileGenerator::generateDependencies(TQPtrList<MakefileDependDir> &dirs, cons
}
}
debug_msg(2, "Dependencies: %s -> %s", fn.latin1(), fndeps.join(" :: ").latin1());
- return TRUE;
+ return true;
}
void
@@ -615,7 +615,7 @@ MakefileGenerator::initOutPaths()
{
if(init_opath_already)
return;
- init_opath_already = TRUE;
+ init_opath_already = true;
TQMap<TQString, TQStringList> &v = project->variables();
if(!v.contains("QMAKE_ABSOLUTE_SOURCE_PATH")) {
if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty() &&
@@ -672,7 +672,7 @@ MakefileGenerator::initOutPaths()
path = path.right(path.length() - 1);
}
#ifdef TQ_WS_WIN
- bool driveExists = TRUE;
+ bool driveExists = true;
if ( !TQDir::isRelativePath( path ) ) {
if ( TQFile::exists( path.left( 3 ) ) ) {
d.cd( path.left( 3 ) );
@@ -680,7 +680,7 @@ MakefileGenerator::initOutPaths()
} else {
warn_msg(WarnLogic, "%s: Cannot access drive '%s' (%s)", dirs[x].latin1(),
path.left( 3 ).latin1(), path.latin1() );
- driveExists = FALSE;
+ driveExists = false;
}
}
if ( driveExists ) {
@@ -717,7 +717,7 @@ MakefileGenerator::init()
initOutPaths();
if(init_already)
return;
- init_already = TRUE;
+ init_already = true;
TQMap<TQString, TQStringList> &v = project->variables();
TQString paths[] = { TQString("SOURCES"), TQString("FORMS"), TQString("YACCSOURCES"), TQString("INCLUDEPATH"),
@@ -744,7 +744,7 @@ MakefileGenerator::init()
if((Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT ||
Option::mkfile::do_deps || Option::mkfile::do_mocs) && !noIO()) {
TQPtrList<MakefileDependDir> deplist;
- deplist.setAutoDelete(TRUE);
+ deplist.setAutoDelete(true);
if((Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT || Option::mkfile::do_deps) &&
doDepends()) {
TQStringList incDirs = v["DEPENDPATH"] + v["QMAKE_ABSOLUTE_SOURCE_PATH"];
@@ -792,7 +792,7 @@ MakefileGenerator::init()
TQFileInfo fi(fileFixify(file, TQDir::currentDirPath(), Option::output_dir));
if(fi.exists() && fi.lastModified() < cachefi.lastModified()) {
cache_found_files.insert(file, (void *)1);
- found = TRUE;
+ found = true;
}
}
if(found) {
@@ -804,7 +804,7 @@ MakefileGenerator::init()
fi.lastModified() < cachefi.lastModified()) {
cache_found_files.insert((*dep_it), (void *)1);
} else {
- found = FALSE;
+ found = false;
break;
}
}
@@ -813,7 +813,7 @@ MakefileGenerator::init()
debug_msg(2, "Dependencies (cached): %s -> %s", file.latin1(),
files.join(" :: ").latin1());
findDependencies(file) = files;
- setProcessedDependencies(file, TRUE);
+ setProcessedDependencies(file, true);
}
}
} else {
@@ -831,7 +831,7 @@ MakefileGenerator::init()
}
if(found && line != "*qmake_ignore*") {
int ext_len = file.length() - file.findRev('.');
- bool cpp_ext = FALSE;
+ bool cpp_ext = false;
for(TQStringList::Iterator cppit = Option::cpp_ext.begin();
cppit != Option::cpp_ext.end(); ++cppit) {
if((cpp_ext = (file.right(ext_len) == (*cppit))))
@@ -865,7 +865,7 @@ MakefileGenerator::init()
TQString("HEADERS"), TQString("SOURCES"), TQString("FORMS"),
TQString("PRECOMPILED_HEADER"), TQString::null };
depHeuristics.clear();
- bool write_cache = FALSE, read_cache = TQFile::exists(cache_file);
+ bool write_cache = false, read_cache = TQFile::exists(cache_file);
int x;
for(x = 0; sources[x] != TQString::null; x++) {
TQStringList vpath, &l = v[sources[x]];
@@ -873,7 +873,7 @@ MakefileGenerator::init()
if(!(*val_it).isEmpty()) {
TQString file = fileFixify((*val_it), TQDir::currentDirPath(), Option::output_dir);
if(!TQFile::exists(file)) {
- bool found = FALSE;
+ bool found = false;
if(TQDir::isRelativePath((*val_it))) {
if(vpath.isEmpty())
vpath = v["VPATH_" + sources[x]] + v["VPATH"] +
@@ -887,7 +887,7 @@ MakefileGenerator::init()
if(dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
(*val_it) = fileFixify(dir + (*val_it));
- found = TRUE;
+ found = true;
debug_msg(1, "Found file through vpath %s -> %s",
file.latin1(), (*val_it).latin1());
break;
@@ -934,15 +934,15 @@ MakefileGenerator::init()
for(x = 0; sources[x] != TQString::null; x++) {
TQStringList &l = v[sources[x]];
for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
- bool found_cache_moc = FALSE, found_cache_dep = FALSE;
+ bool found_cache_moc = false, found_cache_dep = false;
if(read_cache && Option::output.name() != "-" &&
project->isActiveConfig("qmake_cache")) {
if(processedDependencies((*val_it)))
- found_cache_dep = TRUE;
+ found_cache_dep = true;
if(cache_found_files[(*val_it)] == (void *)2)
- found_cache_moc = TRUE;
+ found_cache_moc = true;
if(!found_cache_moc || !found_cache_dep)
- write_cache = TRUE;
+ write_cache = true;
}
/* Do moc before dependency checking since some includes can come from
moc_*.cpp files */
@@ -1020,7 +1020,7 @@ MakefileGenerator::init()
dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir);
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- TQString impl = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first();
+ TQString impl = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first();
logicWarn(impl, "SOURCES");
logicWarn(impl, "SOURCES");
impls.append(impl);
@@ -1051,9 +1051,9 @@ MakefileGenerator::init()
dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir);
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- TQString impl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first();
+ TQString impl = dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first();
logicWarn(impl, "SOURCES");
- TQString decl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first();
+ TQString decl = dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first();
logicWarn(decl, "HEADERS");
decls.append(decl);
@@ -1069,11 +1069,11 @@ MakefileGenerator::init()
}
if( project->isActiveConfig("lex_included")) {
// is there a matching lex file ? Transfer its dependencies.
- TQString lexsrc = fi.baseName(TRUE) + Option::lex_ext;
+ TQString lexsrc = fi.baseName(true) + Option::lex_ext;
if(fi.dirPath() != ".")
lexsrc.prepend(fi.dirPath() + Option::dir_sep);
if(v["LEXSOURCES"].findIndex(lexsrc) != -1) {
- TQString trg = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first();
+ TQString trg = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first();
impldeps.append(trg);
impldeps += findDependencies(lexsrc);
depends[lexsrc].clear();
@@ -1128,7 +1128,7 @@ MakefileGenerator::init()
impl = fileFixify(impl, TQDir::currentDirPath(), Option::output_dir);
if(!impl.isEmpty() && !impl.endsWith(Option::dir_sep))
impl += Option::dir_sep;
- impl += fi.baseName(TRUE) + Option::cpp_ext.first();
+ impl += fi.baseName(true) + Option::cpp_ext.first();
if(Option::output_dir != TQDir::currentDirPath() &&
project->isEmpty("UI_DIR") && project->isEmpty("UI_HEADERS_DIR")) {
TQString decl_fixed = fileFixify(decl, TQDir::currentDirPath(), Option::output_dir);
@@ -1140,14 +1140,14 @@ MakefileGenerator::init()
decl = fileFixify(decl, TQDir::currentDirPath(), Option::output_dir);
if(!decl.isEmpty() && !decl.endsWith(Option::dir_sep))
decl += Option::dir_sep;
- decl += fi.baseName(TRUE) + Option::h_ext.first();
+ decl += fi.baseName(true) + Option::h_ext.first();
logicWarn(impl, "SOURCES");
logicWarn(decl, "HEADERS");
decls.append(decl);
impls.append(impl);
findDependencies(impl).append(decl);
- TQString mocable = Option::h_moc_mod + fi.baseName(TRUE) + Option::h_moc_ext;
+ TQString mocable = Option::h_moc_mod + fi.baseName(true) + Option::h_moc_ext;
if(!v["MOC_DIR"].isEmpty())
mocable.prepend(v["MOC_DIR"].first());
else if(fi.dirPath() != ".")
@@ -1209,7 +1209,7 @@ MakefileGenerator::init()
l = v["_HDRMOC"] + v["_UIMOC"] + v["_SRCMOC"];
for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
if(!(*val_it).isEmpty())
- (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE);
+ (*val_it) = Option::fixPathToTargetOS((*val_it), false);
}
}
@@ -1218,7 +1218,7 @@ MakefileGenerator::init()
TQStringList &l = v[fixpaths[path]];
for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
if(!(*val_it).isEmpty())
- (*val_it) = Option::fixPathToTargetOS((*val_it), FALSE);
+ (*val_it) = Option::fixPathToTargetOS((*val_it), false);
}
}
@@ -1235,10 +1235,10 @@ MakefileGenerator::init()
bool
MakefileGenerator::processPrlFile(TQString &file)
{
- bool ret = FALSE, try_replace_file=FALSE;
+ bool ret = false, try_replace_file=false;
TQString meta_file, orig_file = file;
if(TQMakeMetaInfo::libExists(file)) {
- try_replace_file = TRUE;
+ try_replace_file = true;
meta_file = file;
file = "";
} else {
@@ -1275,12 +1275,12 @@ MakefileGenerator::processPrlFile(TQString &file)
if(hadlib)
meta_file += "lib";
meta_file += stem + extn;
- try_replace_file = TRUE;
+ try_replace_file = true;
}
}
TQString real_meta_file = Option::fixPathToLocalOS(meta_file);
if(project->variables()["QMAKE_PRL_INTERNAL_FILES"].findIndex(TQMakeMetaInfo::findLib(meta_file)) != -1) {
- ret = TRUE;
+ ret = true;
} else if(!meta_file.isEmpty()) {
TQString f = fileFixify(real_meta_file, TQDir::currentDirPath(), Option::output_dir);
if(TQMakeMetaInfo::libExists(f)) {
@@ -1291,7 +1291,7 @@ MakefileGenerator::processPrlFile(TQString &file)
} else if(project->isActiveConfig("no_read_prl_" + libinfo.type().lower())) {
debug_msg(2, "Ignored meta file %s [%s]", real_meta_file.latin1(), libinfo.type().latin1());
} else {
- ret = TRUE;
+ ret = true;
TQMap<TQString, TQStringList> &vars = libinfo.variables();
for( TQMap<TQString, TQStringList>::Iterator it = vars.begin(); it != vars.end(); ++it)
processPrlVariable(it.key(), it.data());
@@ -1348,7 +1348,7 @@ void
MakefileGenerator::processPrlFiles()
{
TQDict<void> processed;
- for(bool ret = FALSE; TRUE; ret = FALSE) {
+ for(bool ret = false; true; ret = false) {
//read in any prl files included..
TQStringList l_out;
TQString where = "QMAKE_LIBS";
@@ -1359,7 +1359,7 @@ MakefileGenerator::processPrlFiles()
TQString file = (*it);
if(!processed[file] && processPrlFile(file)) {
processed.insert(file, (void*)1);
- ret = TRUE;
+ ret = true;
}
if(!file.isEmpty())
l_out.append(file);
@@ -1452,7 +1452,7 @@ MakefileGenerator::write()
TQTextStream t(&Option::output);
writeMakefile(t);
}
- return TRUE;
+ return true;
}
// Manipulate directories, so it's possible to build
@@ -1554,11 +1554,11 @@ MakefileGenerator::writeObj(TQTextStream &t, const TQString &obj, const TQString
bool use_implicit_rule = !project->isEmpty(cimp);
if(use_implicit_rule) {
if(!project->isEmpty("OBJECTS_DIR")) {
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
} else {
int dot = (*sit).findRev('.');
if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit)))
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
}
}
if (!use_implicit_rule && !project->isEmpty(comp)) {
@@ -1646,11 +1646,11 @@ MakefileGenerator::writeMocObj(TQTextStream &t, const TQString &obj, const TQStr
bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP");
if(use_implicit_rule) {
if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("MOC_DIR")) {
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
} else {
int dot = (*sit).findRev('.');
if(dot == -1 || ((*sit).left(dot) + Option::obj_ext != (*oit)))
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
}
}
if (!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) {
@@ -1704,12 +1704,12 @@ MakefileGenerator::writeYaccSrc(TQTextStream &t, const TQString &src)
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- TQString impl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first();
- TQString decl = dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first();
+ TQString impl = dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first();
+ TQString decl = dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first();
TQString yaccflags = "$(YACCFLAGS)", mangle = "y";
if(!project->isActiveConfig("yacc_no_name_mangle")) {
- mangle = fi.baseName(TRUE);
+ mangle = fi.baseName(true);
if(!project->isEmpty("QMAKE_YACCFLAGS_MANGLE"))
yaccflags += " " + var("QMAKE_YACCFLAGS_MANGLE").replace(stringBase, mangle);
else
@@ -1749,11 +1749,11 @@ MakefileGenerator::writeLexSrc(TQTextStream &t, const TQString &src)
dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir);
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- TQString impl = dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first();
+ TQString impl = dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first();
TQString lexflags = "$(LEXFLAGS)", stub="yy";
if(!project->isActiveConfig("yacc_no_name_mangle")) {
- stub = fi.baseName(TRUE);
+ stub = fi.baseName(true);
lexflags += " -P" + stub;
}
TQString out_c = default_out_c;
@@ -1781,11 +1781,11 @@ MakefileGenerator::writeImageObj(TQTextStream &t, const TQString &obj)
bool use_implicit_rule = !project->isEmpty("QMAKE_RUN_CXX_IMP");
if(use_implicit_rule) {
if(!project->isEmpty("OBJECTS_DIR") || !project->isEmpty("UI_DIR") || !project->isEmpty("UI_SOURCES_DIR")) {
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
} else {
int dot = src.findRev('.');
if(dot == -1 || (src.left(dot) + Option::obj_ext != (*oit)))
- use_implicit_rule = FALSE;
+ use_implicit_rule = false;
}
}
if(!use_implicit_rule && !project->isEmpty("QMAKE_RUN_CXX")) {
@@ -1831,7 +1831,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
continue;
}
- bool do_default = TRUE;
+ bool do_default = true;
const TQString root = "$(INSTALL_ROOT)";
TQString target, dst= fileFixify(project->variables()[pvar].first());
if(dst.right(1) != Option::dir_sep)
@@ -1842,7 +1842,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
if(tmp.isEmpty())
tmp = project->variables()[(*it) + ".commands"]; //to allow compatible name
if(!tmp.isEmpty()) {
- do_default = FALSE;
+ do_default = false;
if(!target.isEmpty())
target += "\n\t";
target += tmp.join(" ");
@@ -1852,9 +1852,9 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
if(!tmp.isEmpty()) {
if(!target.isEmpty())
target += "\n";
- do_default = FALSE;
+ do_default = false;
for(TQStringList::Iterator wild_it = tmp.begin(); wild_it != tmp.end(); ++wild_it) {
- TQString wild = Option::fixPathToLocalOS((*wild_it), FALSE), wild_var = fileFixify(wild);
+ TQString wild = Option::fixPathToLocalOS((*wild_it), false), wild_var = fileFixify(wild);
TQString dirstr = TQDir::currentDirPath(), filestr = wild;
int slsh = filestr.findRev(Option::dir_sep);
if(slsh != -1) {
@@ -1870,13 +1870,13 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
target += "\t";
TQString cmd = TQString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
Option::fixPathToTargetOS(fileFixify(wild, TQString::null,
- TQString::null, FALSE, FALSE), FALSE) +
+ TQString::null, false, false), false) +
"\" \"" + root + dst + "\"\n";
target += cmd;
if(!project->isActiveConfig("debug") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
target += TQString("\t-") + var("QMAKE_STRIP") + " \"" +
- root + fileFixify(dst + filestr, TQString::null, TQString::null, FALSE, FALSE) +
+ root + fileFixify(dst + filestr, TQString::null, TQString::null, false, false) +
"\"\n";
if(!uninst.isEmpty())
uninst.append("\n\t");
@@ -1886,7 +1886,7 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
#else
TQString("-$(DEL_FILE) -r")
#endif
- + " \"" + root + fileFixify(dst + filestr, TQString::null, TQString::null, FALSE, FALSE) + "\"");
+ + " \"" + root + fileFixify(dst + filestr, TQString::null, TQString::null, false, false) + "\"");
continue;
}
fixEnvVariables(dirstr);
@@ -1903,20 +1903,20 @@ MakefileGenerator::writeInstalls(TQTextStream &t, const TQString &installs)
#else
TQString("-$(DEL_FILE) -r")
#endif
- + " \"" + root + fileFixify(dst + file, TQString::null, TQString::null, FALSE, FALSE) +
+ + " \"" + root + fileFixify(dst + file, TQString::null, TQString::null, false, false) +
"\"");
- TQFileInfo fi(Option::fixPathToTargetOS(fileFixify(dirstr + file), TRUE));
+ TQFileInfo fi(Option::fixPathToTargetOS(fileFixify(dirstr + file), true));
if(!target.isEmpty())
target += "\t";
TQString cmd = TQString(fi.isDir() ? "-$(INSTALL_DIR)" : "-$(INSTALL_FILE)") + " \"" +
Option::fixPathToTargetOS(fileFixify(dirstr + file, TQString::null,
- TQString::null, FALSE, FALSE), FALSE) +
+ TQString::null, false, false), false) +
"\" \"" + root + dst + "\"\n";
target += cmd;
if(!project->isActiveConfig("debug") &&
!fi.isDir() && fi.isExecutable() && !project->isEmpty("QMAKE_STRIP"))
target += TQString("\t-") + var("QMAKE_STRIP") + " \"" +
- root + fileFixify(dst + file, TQString::null, TQString::null, FALSE, FALSE) +
+ root + fileFixify(dst + file, TQString::null, TQString::null, false, false) +
"\"\n";
}
}
@@ -2025,14 +2025,14 @@ MakefileGenerator::createObjectList(const TQString &var)
for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) {
TQFileInfo fi(Option::fixPathToLocalOS((*it)));
if(objdir.isEmpty() && project->isActiveConfig("object_with_source")) {
- TQString fName = Option::fixPathToTargetOS((*it), FALSE);
+ TQString fName = Option::fixPathToTargetOS((*it), false);
int dl = fName.findRev(Option::dir_sep);
if(dl != -1)
dir = fName.left(dl + 1);
} else {
dir = objdir;
}
- ret.append(dir + fi.baseName(TRUE) + Option::obj_ext);
+ ret.append(dir + fi.baseName(true) + Option::obj_ext);
}
return ret;
}
@@ -2055,7 +2055,7 @@ MakefileGenerator::writeMakefile(TQTextStream &t)
t << "####### Install" << endl << endl;
writeInstalls(t, "INSTALLS");
- return TRUE;
+ return true;
}
TQString MakefileGenerator::buildArgs()
@@ -2139,7 +2139,7 @@ MakefileGenerator::writeHeader(TQTextStream &t)
t << "# Command: " << build_args() << endl;
t << "#############################################################################" << endl;
t << endl;
- return TRUE;
+ return true;
}
@@ -2177,7 +2177,7 @@ MakefileGenerator::writeMakeQmake(TQTextStream &t)
<< "@" << qmake << endl << endl;
}
}
- return TRUE;
+ return true;
}
TQStringList
@@ -2227,7 +2227,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d,
TQString orig_file = file;
if(!force_fix && project->isActiveConfig("no_fixpath")) {
if(!project->isEmpty("QMAKE_ABSOLUTE_SOURCE_PATH")) { //absoluteify it
- TQString qfile = Option::fixPathToLocalOS(file, TRUE, canon);
+ TQString qfile = Option::fixPathToLocalOS(file, true, canon);
if(TQDir::isRelativePath(file)) { //already absolute
TQFileInfo fi(qfile);
if(!fi.convertToAbs()) //strange
@@ -2235,7 +2235,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d,
}
}
} else { //fix it..
- TQString qfile(Option::fixPathToLocalOS(file, TRUE, canon)), in_dir(in_d), out_dir(out_d);
+ TQString qfile(Option::fixPathToLocalOS(file, true, canon)), in_dir(in_d), out_dir(out_d);
{
if(out_dir.isNull() || TQDir::isRelativePath(out_dir))
out_dir.prepend(Option::output_dir + TQDir::separator());
@@ -2268,13 +2268,13 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d,
file.prepend(Option::dir_sep);
file.prepend(in_dir);
}
- file = Option::fixPathToTargetOS(file, FALSE, canon);
- if(canon && TQFile::exists(file) && file == Option::fixPathToTargetOS(file, TRUE, canon)) {
+ file = Option::fixPathToTargetOS(file, false, canon);
+ if(canon && TQFile::exists(file) && file == Option::fixPathToTargetOS(file, true, canon)) {
TQString real_file = TQDir(file).canonicalPath();
if(!real_file.isEmpty())
file = Option::fixPathToTargetOS(real_file, false, canon);
}
- TQString match_dir = Option::fixPathToTargetOS(out_dir, FALSE, canon);
+ TQString match_dir = Option::fixPathToTargetOS(out_dir, false, canon);
if(file == match_dir) {
file = "";
} else if(file.startsWith(match_dir) &&
@@ -2303,7 +2303,7 @@ MakefileGenerator::fileFixify(const TQString& file0, const TQString &out_d,
}
}
}
- file = Option::fixPathToTargetOS(file, FALSE, canon);
+ file = Option::fixPathToTargetOS(file, false, canon);
if(file.isEmpty())
file = ".";
if(!quote.isNull())
@@ -2363,7 +2363,7 @@ MakefileGenerator::processedDependencies(const TQString &file)
{
TQString key = dependencyKey(file);
if(!depProcessed.contains(key))
- return FALSE;
+ return false;
return depProcessed[key];
}
@@ -2433,9 +2433,9 @@ MakefileGenerator::openOutput(TQFile &file) const
if(TQDir::isRelativePath(od))
od.prepend(Option::output_dir);
Option::output_dir = od;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 79659507b..4f7c683c2 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -134,9 +134,9 @@ protected:
TQString fileFixify(const TQString& file, const TQString &out_dir=TQString::null,
- const TQString &in_dir=TQString::null, bool force_fix=FALSE, bool canon=TRUE) const;
+ const TQString &in_dir=TQString::null, bool force_fix=false, bool canon=true) const;
TQStringList fileFixify(const TQStringList& files, const TQString &out_dir=TQString::null,
- const TQString &in_dir=TQString::null, bool force_fix=FALSE, bool canon=TRUE) const;
+ const TQString &in_dir=TQString::null, bool force_fix=false, bool canon=true) const;
public:
MakefileGenerator(TQMakeProject *p);
virtual ~MakefileGenerator();
@@ -180,7 +180,7 @@ inline TQString MakefileGenerator::defaultInstall(const TQString &)
{ return TQString(""); }
inline bool MakefileGenerator::findLibraries()
-{ return TRUE; }
+{ return true; }
inline TQString MakefileGenerator::findDependency(const TQString &)
{ return TQString(""); }
diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp
index 0bc44a599..03a4f6c8b 100644
--- a/qmake/generators/projectgenerator.cpp
+++ b/qmake/generators/projectgenerator.cpp
@@ -60,7 +60,7 @@ TQString project_builtin_regx() //calculate the builtin regular expression..
-ProjectGenerator::ProjectGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(FALSE)
+ProjectGenerator::ProjectGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(false)
{
}
@@ -70,7 +70,7 @@ ProjectGenerator::init()
if(init_flag)
return;
int file_count = 0;
- init_flag = TRUE;
+ init_flag = true;
TQMap<TQString, TQStringList> &v = project->variables();
TQString templ = Option::user_template.isEmpty() ? TQString("app") : Option::user_template;
@@ -94,12 +94,12 @@ ProjectGenerator::init()
for(TQStringList::Iterator pd = dirs.begin(); pd != dirs.end(); pd++) {
TQString dir, regex;
- bool add_depend = FALSE;
+ bool add_depend = false;
if(TQFile::exists((*pd))) {
TQFileInfo fi((*pd));
if(fi.isDir()) {
dir = (*pd);
- add_depend = TRUE;
+ add_depend = true;
if(dir.right(1) != Option::dir_sep)
dir += Option::dir_sep;
if(Option::projfile::do_recursive) {
@@ -117,7 +117,7 @@ ProjectGenerator::init()
if(s != -1)
dir = file.left(s+1);
if(addFile(file)) {
- add_depend = TRUE;
+ add_depend = true;
file_count++;
}
}
@@ -142,7 +142,7 @@ ProjectGenerator::init()
for(int i = 0; i < (int)d.count(); i++) {
TQString file = dir + d[i];
if (addFile(file)) {
- add_depend = TRUE;
+ add_depend = true;
file_count++;
}
}
@@ -235,7 +235,7 @@ ProjectGenerator::init()
}
TQPtrList<MakefileDependDir> deplist;
- deplist.setAutoDelete(TRUE);
+ deplist.setAutoDelete(true);
{
TQStringList &d = v["DEPENDPATH"];
for(TQStringList::Iterator it = d.begin(); it != d.end(); ++it) {
@@ -244,12 +244,12 @@ ProjectGenerator::init()
}
}
TQStringList &h = v["HEADERS"];
- bool no_qt_files = TRUE;
+ bool no_qt_files = true;
TQString srcs[] = { "SOURCES", "YACCSOURCES", "LEXSOURCES", "INTERFACES", TQString::null };
for(int i = 0; !srcs[i].isNull(); i++) {
TQStringList &l = v[srcs[i]];
for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
- if(generateDependencies(deplist, (*val_it), TRUE)) {
+ if(generateDependencies(deplist, (*val_it), true)) {
TQStringList &tmp = findDependencies((*val_it));
if(!tmp.isEmpty()) {
for(TQStringList::Iterator dep_it = tmp.begin(); dep_it != tmp.end(); ++dep_it) {
@@ -262,7 +262,7 @@ ProjectGenerator::init()
}
}
if(no_qt_files && file_no_path.find(TQRegExp("^q[a-z_0-9].h$")) != -1)
- no_qt_files = FALSE;
+ no_qt_files = false;
TQString h_ext;
for(TQStringList::Iterator hit = Option::h_ext.begin();
hit != Option::h_ext.end(); ++hit) {
@@ -282,12 +282,12 @@ ProjectGenerator::init()
TQString src((*dep_it).left((*dep_it).length() - h_ext.length()) +
(*cppit));
if(TQFile::exists(src)) {
- bool exists = FALSE;
+ bool exists = false;
TQStringList &srcl = v["SOURCES"];
for(TQStringList::Iterator src_it = srcl.begin();
src_it != srcl.end(); ++src_it) {
if((*src_it).lower() == src.lower()) {
- exists = TRUE;
+ exists = true;
break;
}
}
@@ -309,7 +309,7 @@ ProjectGenerator::init()
}
}
if(h.isEmpty())
- addConfig("moc", FALSE);
+ addConfig("moc", false);
//if we find a file that matches an forms it needn't be included in the project
TQStringList &u = v["INTERFACES"];
@@ -318,19 +318,19 @@ ProjectGenerator::init()
for(int i = 0; !no_ui[i].isNull(); i++) {
TQStringList &l = v[no_ui[i]];
for(TQStringList::Iterator val_it = l.begin(); val_it != l.end(); ) {
- bool found = FALSE;
+ bool found = false;
for(TQStringList::Iterator ui_it = u.begin(); ui_it != u.end(); ++ui_it) {
TQString s1 = (*val_it).right((*val_it).length() - ((*val_it).findRev(Option::dir_sep) + 1));
if(s1.findRev('.') != -1)
s1 = s1.left(s1.findRev('.')) + Option::ui_ext;
TQString u1 = (*ui_it).right((*ui_it).length() - ((*ui_it).findRev(Option::dir_sep) + 1));
if(s1 == u1) {
- found = TRUE;
+ found = true;
break;
}
}
if(!found && (*val_it).endsWith(Option::cpp_moc_ext))
- found = TRUE;
+ found = true;
if(found)
val_it = l.remove(val_it);
else
@@ -350,14 +350,14 @@ ProjectGenerator::writeMakefile(TQTextStream &t)
TQStringList::Iterator it;
for(it = Option::before_user_vars.begin(); it != Option::before_user_vars.end(); ++it)
t << (*it) << endl;
- t << getWritableVar("TEMPLATE_ASSIGN", FALSE);
+ t << getWritableVar("TEMPLATE_ASSIGN", false);
if(project->first("TEMPLATE_ASSIGN") == "subdirs") {
t << endl << "# Directories" << "\n"
<< getWritableVar("SUBDIRS");
} else {
t << getWritableVar("TARGET")
- << getWritableVar("CONFIG", FALSE)
- << getWritableVar("CONFIG_REMOVE", FALSE)
+ << getWritableVar("CONFIG", false)
+ << getWritableVar("CONFIG_REMOVE", false)
<< getWritableVar("DEPENDPATH")
<< getWritableVar("INCLUDEPATH") << endl;
@@ -371,7 +371,7 @@ ProjectGenerator::writeMakefile(TQTextStream &t)
}
for(it = Option::after_user_vars.begin(); it != Option::after_user_vars.end(); ++it)
t << (*it) << endl;
- return TRUE;
+ return true;
}
bool
@@ -382,9 +382,9 @@ ProjectGenerator::addConfig(const TQString &cfg, bool add)
where = "CONFIG_REMOVE";
if(!project->variables()[where].contains(cfg)) {
project->variables()[where] += cfg;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -397,13 +397,13 @@ ProjectGenerator::addFile(TQString file)
if(s != -1)
dir = file.left(s+1);
if(file.mid(dir.length(), Option::h_moc_mod.length()) == Option::h_moc_mod)
- return FALSE;
+ return false;
TQString where;
for(TQStringList::Iterator cppit = Option::cpp_ext.begin(); cppit != Option::cpp_ext.end(); ++cppit) {
if(file.endsWith((*cppit))) {
if(TQFile::exists(file.left(file.length() - (*cppit).length()) + Option::ui_ext))
- return FALSE;
+ return false;
else
where = "SOURCES";
break;
@@ -433,9 +433,9 @@ ProjectGenerator::addFile(TQString file)
TQString newfile = fileFixify(file);
if(!where.isEmpty() && !project->variables()[where].contains(file)) {
project->variables()[where] += newfile;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h
index a35aa2647..475746dcf 100644
--- a/qmake/generators/projectgenerator.h
+++ b/qmake/generators/projectgenerator.h
@@ -44,8 +44,8 @@ class ProjectGenerator : public MakefileGenerator
{
bool init_flag;
bool addFile(TQString);
- bool addConfig(const TQString &, bool add=TRUE);
- TQString getWritableVar(const TQString &, bool fixPath=TRUE);
+ bool addConfig(const TQString &, bool add=true);
+ TQString getWritableVar(const TQString &, bool fixPath=true);
protected:
virtual void init();
virtual bool writeMakefile(TQTextStream &);
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index a3532f971..9f2359f1b 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -50,7 +50,7 @@ UnixMakefileGenerator::init()
{
if(init_flag)
return;
- init_flag = TRUE;
+ init_flag = true;
if(!project->isEmpty("QMAKE_FAILED_REQUIREMENTS")) /* no point */
return;
@@ -244,7 +244,7 @@ UnixMakefileGenerator::init()
project->variables()["QMAKE_LFLAGS"] += project->variables()["QMAKE_LFLAGS_THREAD"];
}
if ( project->isActiveConfig("moc") )
- setMocAware(TRUE);
+ setMocAware(true);
TQString compile_flag = var("QMAKE_COMPILE_FLAG");
if(compile_flag.isEmpty())
compile_flag = "-c";
@@ -271,7 +271,7 @@ UnixMakefileGenerator::init()
project->variables()["QMAKE_RUN_CXX_IMP"].append("$(CXX) " + compile_flag + " $(CXXFLAGS) $(INCPATH) -o $@ $<");
project->variables()["QMAKE_FILETAGS"] += TQStringList::split("HEADERS SOURCES TARGET DESTDIR", " ");
if( project->isActiveConfig("GNUmake") && !project->isEmpty("QMAKE_CFLAGS_DEPS"))
- include_deps = TRUE; //do not generate deps
+ include_deps = true; //do not generate deps
if(project->isActiveConfig("compile_libtool"))
Option::obj_ext = ".lo"; //override the .o
@@ -356,7 +356,7 @@ UnixMakefileGenerator::init()
if(rpath.right(1) != Option::dir_sep) {
rpath += Option::dir_sep;
}
- comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, FALSE);
+ comp_flags += " -rpath " + Option::fixPathToTargetOS(rpath, false);
}
}
}
@@ -396,14 +396,14 @@ UnixMakefileGenerator::combineSetLFlags(const TQStringList &list1, const TQStrin
}
ret.append((*it));
} else if(project->isActiveConfig("macx") && (*it).startsWith("-framework")) {
- int as_one = TRUE;
+ int as_one = true;
TQString framework_in;
if((*it).length() > 11) {
framework_in = (*it).mid(11);
} else {
if(it != lst->end()) {
++it;
- as_one = FALSE;
+ as_one = false;
framework_in = (*it);
}
}
@@ -539,7 +539,7 @@ bool
UnixMakefileGenerator::findLibraries()
{
TQPtrList<MakefileDependDir> libdirs;
- libdirs.setAutoDelete(TRUE);
+ libdirs.setAutoDelete(true);
const TQString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", TQString::null };
for(int i = 0; !lflags[i].isNull(); i++) {
TQStringList &l = project->variables()[lflags[i]];
@@ -581,7 +581,7 @@ UnixMakefileGenerator::findLibraries()
if(!stub.isEmpty()) {
const TQString modifs[] = { "", "-mt", TQString::null };
for(int modif = 0; !modifs[modif].isNull(); modif++) {
- bool found = FALSE;
+ bool found = false;
TQStringList extens;
if(!extn.isNull())
extens << extn;
@@ -599,13 +599,13 @@ UnixMakefileGenerator::findLibraries()
}
if(!lib_stub.isNull()) {
(*it) = "-l" + lib_stub;
- found = TRUE;
+ found = true;
break;
}
} else {
if(TQFile::exists("lib" + stub + modifs[modif] + "." + (*extit))) {
(*it) = "lib" + stub + modifs[modif] + "." + (*extit);
- found = TRUE;
+ found = true;
break;
}
}
@@ -614,7 +614,7 @@ UnixMakefileGenerator::findLibraries()
for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) {
if(TQFile::exists(mdd->local_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext)) {
(*it) = mdd->real_dir + Option::dir_sep + "lib" + stub + modifs[modif] + Option::libtool_ext;
- found = TRUE;
+ found = true;
break;
}
}
@@ -626,7 +626,7 @@ UnixMakefileGenerator::findLibraries()
}
}
}
- return FALSE;
+ return false;
}
TQString linkLib(const TQString &file, const TQString &libName) {
@@ -642,10 +642,10 @@ UnixMakefileGenerator::processPrlFiles()
{
TQDict<void> processed;
TQPtrList<MakefileDependDir> libdirs;
- libdirs.setAutoDelete(TRUE);
+ libdirs.setAutoDelete(true);
const TQString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_LIBS", TQString::null };
for(int i = 0; !lflags[i].isNull(); i++) {
- for(bool ret = FALSE; TRUE; ret = FALSE) {
+ for(bool ret = false; true; ret = false) {
TQStringList l_out;
TQStringList &l = project->variables()[lflags[i]];
for(TQStringList::Iterator it = l.begin(); it != l.end(); ++it) {
@@ -675,7 +675,7 @@ UnixMakefileGenerator::processPrlFiles()
prl.replace(0, mdd->local_dir.length(), mdd->real_dir);
opt = linkLib(prl, lib);
processed.insert(opt, (void*)1);
- ret = TRUE;
+ ret = true;
break;
}
}
@@ -689,7 +689,7 @@ UnixMakefileGenerator::processPrlFiles()
TQString prl = "/System/Library/Frameworks/" + opt +
".framework/" + opt;
if(processPrlFile(prl))
- ret = TRUE;
+ ret = true;
l_out.append("-framework");
}
if(!opt.isEmpty())
@@ -699,7 +699,7 @@ UnixMakefileGenerator::processPrlFiles()
TQString lib = opt;
if(!processed[lib] && processPrlFile(lib)) {
processed.insert(lib, (void*)1);
- ret = TRUE;
+ ret = true;
}
#if 0
if(ret)
@@ -724,11 +724,11 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
if(t != "target" || project->first("TEMPLATE") == "subdirs")
return TQString();
- bool resource = FALSE;
+ bool resource = false;
const TQString root = "$(INSTALL_ROOT)";
TQStringList &uninst = project->variables()[t + ".uninstall"];
TQString ret, destdir=project->first("DESTDIR");
- TQString targetdir = Option::fixPathToTargetOS(project->first("target.path"), FALSE);
+ TQString targetdir = Option::fixPathToTargetOS(project->first("target.path"), false);
if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
destdir += Option::dir_sep;
targetdir = fileFixify(targetdir);
@@ -742,7 +742,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
if(project->isActiveConfig("resource_fork") && !project->isActiveConfig("console")) {
destdir += "../../../";
target += ".app";
- resource = TRUE;
+ resource = true;
}
} else if(project->first("TEMPLATE") == "lib") {
if(project->isActiveConfig("create_prl") && !project->isActiveConfig("no_install_prl") &&
@@ -827,7 +827,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
} else {
TQString src_targ = target;
if(!destdir.isEmpty())
- src_targ = Option::fixPathToTargetOS(destdir + target, FALSE);
+ src_targ = Option::fixPathToTargetOS(destdir + target, false);
TQString dst_targ = root + targetdir + target;
if(!ret.isEmpty())
ret += "\n\t";
@@ -861,7 +861,7 @@ UnixMakefileGenerator::defaultInstall(const TQString &t)
Option::target_mode == Option::TARG_MAC9_MODE) {
} else if(Option::target_mode == Option::TARG_UNIX_MODE ||
Option::target_mode == Option::TARG_MACX_MODE) {
- TQString link = Option::fixPathToTargetOS(destdir + (*it), FALSE);
+ TQString link = Option::fixPathToTargetOS(destdir + (*it), false);
int lslash = link.findRev(Option::dir_sep);
if(lslash != -1)
link = link.right(link.length() - (lslash + 1));
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index e243e1a5f..f118bdd2b 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -72,7 +72,7 @@ protected:
virtual void init();
void writeMakeParts(TQTextStream &);
- void writeSubdirs(TQTextStream &, bool=TRUE);
+ void writeSubdirs(TQTextStream &, bool=true);
private:
void init2();
diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp
index 1678e22c5..61c146b94 100644
--- a/qmake/generators/unix/unixmake2.cpp
+++ b/qmake/generators/unix/unixmake2.cpp
@@ -46,7 +46,7 @@
TQString mkdir_p_asstring(const TQString &dir);
-UnixMakefileGenerator::UnixMakefileGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(FALSE), include_deps(FALSE)
+UnixMakefileGenerator::UnixMakefileGenerator(TQMakeProject *p) : MakefileGenerator(p), init_flag(false), include_deps(false)
{
}
@@ -85,7 +85,7 @@ UnixMakefileGenerator::writeMakefile(TQTextStream &t)
<< var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
<< "@echo \"Skipped.\"" << endl << endl;
writeMakeQmake(t);
- return TRUE;
+ return true;
}
if (project->variables()["TEMPLATE"].first() == "app" ||
@@ -94,24 +94,24 @@ UnixMakefileGenerator::writeMakefile(TQTextStream &t)
return MakefileGenerator::writeMakefile(t);
} else if(project->variables()["TEMPLATE"].first() == "subdirs") {
writeSubdirs(t);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void
UnixMakefileGenerator::writeExtraVariables(TQTextStream &t)
{
- bool first = TRUE;
+ bool first = true;
TQMap<TQString, TQStringList> &vars = project->variables();
TQStringList &exports = project->variables()["QMAKE_EXTRA_UNIX_VARIABLES"];
for(TQMap<TQString, TQStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
for(TQStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
- TQRegExp rx((*exp_it), FALSE, TRUE);
+ TQRegExp rx((*exp_it), false, true);
if(rx.exactMatch(it.key())) {
if(first) {
t << "\n####### Custom Variables" << endl;
- first = FALSE;
+ first = false;
}
t << "EXPORT_" << it.key() << " = " << it.data().join(" ") << endl;
}
@@ -129,7 +129,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
!project->variables()["QMAKE_INCREMENTAL"].isEmpty() &&
(!project->variables()["QMAKE_APP_FLAG"].isEmpty() ||
!project->isActiveConfig("staticlib"))),
- src_incremental=FALSE, moc_incremental=FALSE;
+ src_incremental=false, moc_incremental=false;
t << "####### Compiler, tools and options" << endl << endl;
if (varGlue("INCLUDEPATH", " -I", " -I", "").find("$(LOCALBASE)") != -1)
@@ -217,10 +217,10 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
TQStringList &objs = project->variables()["OBJECTS"], &incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
t << "OBJECTS = ";
for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
- bool increment = FALSE;
+ bool increment = false;
for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
- if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) {
- increment = TRUE;
+ if((*objit).find(TQRegExp((*incrit), true, true)) != -1) {
+ increment = true;
incrs_out.append((*objit));
break;
}
@@ -233,7 +233,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
} else if(!incrs_out.count()) {
t << endl;
} else {
- src_incremental = TRUE;
+ src_incremental = true;
t << endl;
t << "INCREMENTAL_OBJECTS = " << incrs_out.join(" \\\n\t\t") << endl;
}
@@ -250,10 +250,10 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
&incrs = project->variables()["QMAKE_INCREMENTAL"], incrs_out;
t << "OBJMOC = ";
for(TQStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
- bool increment = FALSE;
+ bool increment = false;
for(TQStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
- if((*objit).find(TQRegExp((*incrit), TRUE, TRUE)) != -1) {
- increment = TRUE;
+ if((*objit).find(TQRegExp((*incrit), true, true)) != -1) {
+ increment = true;
incrs_out.append((*objit));
break;
}
@@ -266,7 +266,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
} else if(!incrs_out.count()) {
t << endl;
} else {
- moc_incremental = TRUE;
+ moc_incremental = true;
t << endl;
t << "INCREMENTAL_OBJMOC = " << incrs_out.join(" \\\n\t\t") << endl;
}
@@ -274,7 +274,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
t << "OBJMOC = " << objMoc << endl;
}
if(do_incremental && !moc_incremental && !src_incremental)
- do_incremental = FALSE;
+ do_incremental = false;
if(!project->isEmpty("QMAKE_EXTRA_UNIX_COMPILERS")) {
t << "OBJCOMP = " << varList("OBJCOMP") << endl;
target_deps += " $(OBJCOMP)";
@@ -807,8 +807,8 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir);
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::cpp_ext.first() );
- clean << ( dir + fi.baseName(TRUE) + Option::yacc_mod + Option::h_ext.first() );
+ clean << ( dir + fi.baseName(true) + Option::yacc_mod + Option::cpp_ext.first() );
+ clean << ( dir + fi.baseName(true) + Option::yacc_mod + Option::h_ext.first() );
}
if(!clean.isEmpty()) {
t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
@@ -827,7 +827,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
dir = fileFixify(dir, TQDir::currentDirPath(), Option::output_dir);
if(!dir.isEmpty() && dir.right(Option::dir_sep.length()) != Option::dir_sep)
dir += Option::dir_sep;
- clean << ( dir + fi.baseName(TRUE) + Option::lex_mod + Option::cpp_ext.first() );
+ clean << ( dir + fi.baseName(true) + Option::lex_mod + Option::cpp_ext.first() );
}
if(!clean.isEmpty()) {
t << "\t-$(DEL_FILE) " << clean.join(" ") << "\n";
@@ -963,7 +963,7 @@ UnixMakefileGenerator::writeMakeParts(TQTextStream &t)
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out, cmd = tmp_cmd, deps;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
@@ -1397,7 +1397,7 @@ void UnixMakefileGenerator::init2()
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
@@ -1493,7 +1493,7 @@ UnixMakefileGenerator::writeLibtoolFile()
if(install_dir.isEmpty())
install_dir = project->first("DESTDIR");
t << "# Directory that this library needs to be installed in:\n"
- "libdir='" << Option::fixPathToTargetOS(install_dir, FALSE) << "'\n";
+ "libdir='" << Option::fixPathToTargetOS(install_dir, false) << "'\n";
}
TQString
diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
index 069524314..2ff61c2c8 100644
--- a/qmake/generators/win32/mingw_make.cpp
+++ b/qmake/generators/win32/mingw_make.cpp
@@ -44,7 +44,7 @@
#include <time.h>
-MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
+MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false)
{
Option::obj_ext = ".o";
}
@@ -52,7 +52,7 @@ MingwMakefileGenerator::MingwMakefileGenerator(TQMakeProject *p) : Win32Makefile
bool
MingwMakefileGenerator::findLibraries() // todo - pascal
{
- return TRUE;
+ return true;
}
bool
@@ -65,7 +65,7 @@ MingwMakefileGenerator::writeMakefile(TQTextStream &t)
<< var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
<< "@echo \"Skipped.\"" << endl << endl;
writeMakeQmake(t);
- return TRUE;
+ return true;
}
if(project->first("TEMPLATE") == "app" ||
@@ -75,9 +75,9 @@ MingwMakefileGenerator::writeMakefile(TQTextStream &t)
}
else if(project->first("TEMPLATE") == "subdirs") {
writeSubDirs(t);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void createLdObjectScriptFile(const TQString & fileName, TQStringList & objList)
@@ -136,15 +136,15 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t)
t << "LIB = " << var("QMAKE_LIB") << endl;
}
t << "MOC = " << (project->isEmpty("QMAKE_MOC") ? TQString("moc") :
- Option::fixPathToTargetOS(var("QMAKE_MOC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_MOC"), false)) << endl;
t << "UIC = " << (project->isEmpty("QMAKE_UIC") ? TQString("uic") :
- Option::fixPathToTargetOS(var("QMAKE_UIC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_UIC"), false)) << endl;
t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? TQString("qmake") :
- Option::fixPathToTargetOS(var("QMAKE_QMAKE"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl;
t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? TQString("idc") :
- Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl;
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? TQString("midl") :
- Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_IDL"), false)) << endl;
t << "ZIP = " << var("QMAKE_ZIP") << endl;
t << "DEF_FILE = " << varList("DEF_FILE") << endl;
t << "COPY_FILE = " << var("QMAKE_COPY") << endl;
@@ -333,7 +333,7 @@ MingwMakefileGenerator::writeMingwParts(TQTextStream &t)
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out, cmd = tmp_cmd, deps;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
@@ -376,7 +376,7 @@ MingwMakefileGenerator::init()
{
if(init_flag)
return;
- init_flag = TRUE;
+ init_flag = true;
/* this should probably not be here, but I'm using it to wrap the .t files */
if(project->first("TEMPLATE") == "app")
@@ -602,7 +602,7 @@ MingwMakefileGenerator::init()
}
if ( project->isActiveConfig("moc") )
- setMocAware(TRUE);
+ setMocAware(true);
// add -L libs to libdir
TQStringList &libs = project->variables()["QMAKE_LIBS"];
@@ -622,7 +622,7 @@ MingwMakefileGenerator::init()
for(it = l.begin(); it != l.end(); ++it) {
TQStringList &gdmf = project->variables()[(*it)];
for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
- (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
+ (*inner) = Option::fixPathToTargetOS((*inner), false);
}
if ( project->isActiveConfig("dll") ) {
@@ -686,7 +686,7 @@ MingwMakefileGenerator::init()
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
@@ -704,7 +704,7 @@ MingwMakefileGenerator::writeSubDirs(TQTextStream &t)
TQTextStream ts (&qs, IO_WriteOnly) ;
Win32MakefileGenerator::writeSubDirs( ts ) ;
TQRegExp rx("(\\n\\tcd [^\\n\\t]+)(\\n\\t.+)\\n\\t@cd ..") ;
- rx.setMinimal(TRUE);
+ rx.setMinimal(true);
int pos = 0 ;
while ( -1 != (pos = rx.search( qs, pos)))
{
diff --git a/qmake/generators/win32/msvc_dsp.cpp b/qmake/generators/win32/msvc_dsp.cpp
index 6b6b8fdbd..962db7229 100644
--- a/qmake/generators/win32/msvc_dsp.cpp
+++ b/qmake/generators/win32/msvc_dsp.cpp
@@ -43,7 +43,7 @@
#include <stdlib.h>
#include <time.h>
-DspMakefileGenerator::DspMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
+DspMakefileGenerator::DspMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false)
{
}
@@ -55,7 +55,7 @@ DspMakefileGenerator::writeMakefile(TQTextStream &t)
/* for now just dump, I need to generated an empty dsp or something.. */
fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
var("QMAKE_FAILED_REQUIREMENTS").latin1());
- return TRUE;
+ return true;
}
if(project->first("TEMPLATE") == "vcapp" ||
@@ -65,9 +65,9 @@ DspMakefileGenerator::writeMakefile(TQTextStream &t)
else if(project->first("TEMPLATE") == "subdirs") {
writeHeader(t);
writeSubDirs(t);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool
@@ -86,7 +86,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t)
TQFile file(dspfile_loc);
if(!file.open(IO_ReadOnly)) {
fprintf(stderr, "Cannot open dsp file: %s\n", dspfile.latin1());
- return FALSE;
+ return false;
}
TQTextStream dsp(&file);
@@ -374,7 +374,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t)
f.close();
// create an output step for images not more than once
- bool imagesBuildDone = FALSE;
+ bool imagesBuildDone = false;
for( it = list.begin(); it != list.end(); ++it ) {
// beginGroupForFile((*it), t);
t << "# Begin Source File\n\nSOURCE=" << (*it) << endl;
@@ -384,7 +384,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t)
uicpath = uicpath.replace(TQRegExp("\\..*$"), "") + " ";
if ( !imagesBuildDone ) {
- imagesBuildDone = TRUE;
+ imagesBuildDone = true;
TQString build = "\n\n# Begin Custom Build - Creating image collection...\n"
"InputPath=.\\" + base + "\n\n";
@@ -577,7 +577,7 @@ DspMakefileGenerator::writeDspParts(TQTextStream &t)
}
t << endl;
file.close();
- return TRUE;
+ return true;
}
@@ -588,7 +588,7 @@ DspMakefileGenerator::init()
if(init_flag)
return;
TQStringList::Iterator it;
- init_flag = TRUE;
+ init_flag = true;
const bool thread = project->isActiveConfig("thread");
@@ -824,7 +824,7 @@ DspMakefileGenerator::init()
TQString targetfilename = project->variables()["TARGET"].first();
project->variables()["TARGET"].first() += project->first("TARGET_EXT");
if ( project->isActiveConfig("moc") )
- setMocAware(TRUE);
+ setMocAware(true);
project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
project->variables()["QMAKE_FILETAGS"] += TQStringList::split(' ',
@@ -833,7 +833,7 @@ DspMakefileGenerator::init()
for(it = l.begin(); it != l.end(); ++it) {
TQStringList &gdmf = project->variables()[(*it)];
for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
- (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
+ (*inner) = Option::fixPathToTargetOS((*inner), false);
}
MakefileGenerator::init();
@@ -1061,7 +1061,7 @@ DspMakefileGenerator::beginGroupForFile(TQString file, TQTextStream &t,
{
if(project->isActiveConfig("flat"))
return;
- fileFixify(file, TQDir::currentDirPath(), TQDir::currentDirPath(), TRUE);
+ fileFixify(file, TQDir::currentDirPath(), TQDir::currentDirPath(), true);
file = file.section(Option::dir_sep, 0, -2);
if(file.right(Option::dir_sep.length()) != Option::dir_sep)
file += Option::dir_sep;
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index a1ada25f5..145ee41e0 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -44,7 +44,7 @@
#include <stdlib.h>
#include <time.h>
-NmakeMakefileGenerator::NmakeMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
+NmakeMakefileGenerator::NmakeMakefileGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false)
{
}
@@ -64,7 +64,7 @@ NmakeMakefileGenerator::writeMakefile(TQTextStream &t)
<< var("QMAKE_FAILED_REQUIREMENTS") << ") are not available.\"" << "\n\t"
<< "@echo \"Skipped.\"" << endl << endl;
writeMakeQmake(t);
- return TRUE;
+ return true;
}
if(project->first("TEMPLATE") == "app" ||
@@ -74,9 +74,9 @@ NmakeMakefileGenerator::writeMakefile(TQTextStream &t)
}
else if(project->first("TEMPLATE") == "subdirs") {
writeSubDirs(t);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQStringList
@@ -146,15 +146,15 @@ NmakeMakefileGenerator::writeNmakeParts(TQTextStream &t)
t << "LIB = " << var("QMAKE_LIB") << endl;
}
t << "MOC = " << (project->isEmpty("QMAKE_MOC") ? TQString("moc") :
- Option::fixPathToTargetOS(var("QMAKE_MOC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_MOC"), false)) << endl;
t << "UIC = " << (project->isEmpty("QMAKE_UIC") ? TQString("uic") :
- Option::fixPathToTargetOS(var("QMAKE_UIC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_UIC"), false)) << endl;
t << "QMAKE = " << (project->isEmpty("QMAKE_QMAKE") ? TQString("qmake") :
- Option::fixPathToTargetOS(var("QMAKE_QMAKE"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_QMAKE"), false)) << endl;
t << "IDC = " << (project->isEmpty("QMAKE_IDC") ? TQString("idc") :
- Option::fixPathToTargetOS(var("QMAKE_IDC"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_IDC"), false)) << endl;
t << "IDL = " << (project->isEmpty("QMAKE_IDL") ? TQString("midl") :
- Option::fixPathToTargetOS(var("QMAKE_IDL"), FALSE)) << endl;
+ Option::fixPathToTargetOS(var("QMAKE_IDL"), false)) << endl;
t << "ZIP = " << var("QMAKE_ZIP") << endl;
t << "COPY_FILE = " << var("QMAKE_COPY") << endl;
t << "COPY_DIR = " << var("QMAKE_COPY") << endl;
@@ -377,7 +377,7 @@ NmakeMakefileGenerator::writeNmakeParts(TQTextStream &t)
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out, cmd = tmp_cmd, deps;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
@@ -461,7 +461,7 @@ NmakeMakefileGenerator::init()
{
if(init_flag)
return;
- init_flag = TRUE;
+ init_flag = true;
/* this should probably not be here, but I'm using it to wrap the .t files */
if(project->first("TEMPLATE") == "app")
@@ -680,7 +680,7 @@ NmakeMakefileGenerator::init()
if ( project->isActiveConfig("moc") )
- setMocAware(TRUE);
+ setMocAware(true);
project->variables()["QMAKE_LIBS"] += project->variables()["LIBS"];
TQStringList &libList = project->variables()["QMAKE_LIBS"];
@@ -704,7 +704,7 @@ NmakeMakefileGenerator::init()
for(it = l.begin(); it != l.end(); ++it) {
TQStringList &gdmf = project->variables()[(*it)];
for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
- (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
+ (*inner) = Option::fixPathToTargetOS((*inner), false);
}
if ( !project->variables()["DEF_FILE"].isEmpty() )
@@ -780,7 +780,7 @@ NmakeMakefileGenerator::init()
TQStringList &inputs = project->variables()[(*it2)];
for(TQStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
TQFileInfo fi(Option::fixPathToLocalOS((*input)));
- TQString in = Option::fixPathToTargetOS((*input), FALSE),
+ TQString in = Option::fixPathToTargetOS((*input), false),
out = tmp_out;
out.replace("${QMAKE_FILE_BASE}", fi.baseName());
out.replace("${QMAKE_FILE_NAME}", fi.filePath());
diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp
index 13dd83390..3e20838d5 100644
--- a/qmake/generators/win32/msvc_objectmodel.cpp
+++ b/qmake/generators/win32/msvc_objectmodel.cpp
@@ -476,25 +476,25 @@ bool VCCLCompilerTool::parseOption( const char* option )
char second = option[2];
char third = option[3];
char fourth = option[4];
- bool found = TRUE;
+ bool found = true;
switch ( first ) {
case '?':
case 'h':
tqWarning( "Generator: Option '/?', '/help': MSVC.NET projects do not support outputting help info" );
- found = FALSE;
+ found = false;
break;
case '@':
tqWarning( "Generator: Option '/@': MSVC.NET projects do not support the use of a response file" );
- found = FALSE;
+ found = false;
break;
case 'l':
tqWarning( "Generator: Option '/link': qmake generator does not support passing link options through the compiler tool" );
- found = FALSE;
+ found = false;
break;
case 'A':
if ( second != 'I' ) {
- found = FALSE; break;
+ found = false; break;
}
AdditionalUsingDirectories += option+3;
break;
@@ -520,7 +520,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
AdditionalOptions += option;
break;
}
- found = FALSE; break;
+ found = false; break;
}
GeneratePreprocessedFile = preprocessYes;
break;
@@ -577,7 +577,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
ExpandAttributedSource = _True;
break;
default:
- found = FALSE; break;
+ found = false; break;
}
}
break;
@@ -586,7 +586,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
case '3':
case '4':
tqWarning( "Option '/G3' and '/G4' were phased out in Visual C++ 5.0" );
- found = FALSE; break;
+ found = false; break;
case '5':
OptimizeForProcessor = procOptimizePentium;
break;
@@ -655,7 +655,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
CallingConvention = callConventionStdCall;
break;
default:
- found = FALSE; break;
+ found = false; break;
}
break;
case 'H':
@@ -669,7 +669,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
AdditionalOptions += option;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'M':
if ( second == 'D' ) {
RuntimeLibrary = rtMultiThreadedDLL;
@@ -687,7 +687,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
RuntimeLibrary = rtMultiThreadedDebug;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'O':
switch ( second ) {
case '1':
@@ -707,7 +707,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
else if ( third == '2' )
InlineFunctionExpansion = expandAnySuitable;
else
- found = FALSE;
+ found = false;
break;
case 'd':
Optimization = optimizeDisabled;
@@ -741,7 +741,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
OmitFramePointers = _False;
break;
default:
- found = FALSE; break;
+ found = false; break;
}
break;
case 'P':
@@ -752,7 +752,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
AdditionalOptions += option;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'R':
if ( second == 'T' && third == 'C' ) {
if ( fourth == '1' )
@@ -764,7 +764,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
else if ( fourth == 'u' )
BasicRuntimeChecks = runtimeCheckUninitVariables;
else
- found = FALSE; break;
+ found = false; break;
}
break;
case 'T':
@@ -774,7 +774,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
CompileAs = compileAsCPlusPlus;
} else {
tqWarning( "Generator: Options '/Tp<filename>' and '/Tc<filename>' are not supported by qmake" );
- found = FALSE; break;
+ found = false; break;
}
break;
case 'U':
@@ -814,7 +814,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
}
// Fallthrough
default:
- found = FALSE; break;
+ found = false; break;
}
break;
case 'X':
@@ -843,7 +843,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
PrecompiledHeaderFile = option+3;
break;
default:
- found = FALSE; break;
+ found = false; break;
}
break;
case 'Z':
@@ -876,9 +876,9 @@ bool VCCLCompilerTool::parseOption( const char* option )
else if ( fourth == 'w' )
TreatWChar_tAsBuiltInType = _True;
else
- found = FALSE;
+ found = false;
} else {
- found = FALSE; break;
+ found = false; break;
}
break;
case 'g':
@@ -905,11 +905,11 @@ bool VCCLCompilerTool::parseOption( const char* option )
StructMemberAlignment = alignEightBytes;
break;
default:
- found = FALSE; break;
+ found = false; break;
}
break;
default:
- found = FALSE; break;
+ found = false; break;
}
break;
case 'c':
@@ -923,12 +923,12 @@ bool VCCLCompilerTool::parseOption( const char* option )
CompileAsManaged = managedAssembly;
}
} else {
- found = FALSE; break;
+ found = false; break;
}
break;
case 'd':
if ( second != 'r' ) {
- found = FALSE; break;
+ found = false; break;
}
CompileAsManaged = managedAssembly;
break;
@@ -941,19 +941,19 @@ bool VCCLCompilerTool::parseOption( const char* option )
SuppressStartupBanner = _True;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'o':
if ( second == 'p' && third == 'e' && fourth == 'n' ) {
OpenMP = _True;
break;
}
- found = FALSE; break;
+ found = false; break;
case 's':
if ( second == 'h' && third == 'o' && fourth == 'w' ) {
ShowIncludes = _True;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'u':
UndefineAllPreprocessorDefinitions = _True;
break;
@@ -962,7 +962,7 @@ bool VCCLCompilerTool::parseOption( const char* option )
AdditionalOptions += option;
break;
}
- found = FALSE; break;
+ found = false; break;
case 'w':
switch ( second ) {
case '\0':
@@ -976,11 +976,11 @@ bool VCCLCompilerTool::parseOption( const char* option )
}
break;
default:
- found = FALSE; break;
+ found = false; break;
}
if( !found )
warn_msg( WarnLogic, "Could not parse Compiler option: %s", option );
- return TRUE;
+ return true;
}
// VCLinkerTool -----------------------------------------------------
@@ -1147,7 +1147,7 @@ bool VCLinkerTool::parseOption( const char* option )
displayHash( "CONSOLE" ); displayHash( "EFI_APPLICATION" ); displayHash( "EFI_BOOT_SERVICE_DRIVER" ); displayHash( "EFI_ROM" ); displayHash( "EFI_RUNTIME_DRIVER" ); displayHash( "NATIVE" );
displayHash( "POSIX" ); displayHash( "WINDOWS" ); displayHash( "WINDOWSCE" ); displayHash( "NET" ); displayHash( "CD" ); displayHash( "NO" );
#endif
- bool found = TRUE;
+ bool found = true;
switch ( elfHash(option) ) {
case 0x3360dbe: // /ALIGN[:number]
case 0x1485c34: // /ALLOWBIND[:NO]
@@ -1265,7 +1265,7 @@ bool VCLinkerTool::parseOption( const char* option )
TargetMachine = machineX86;
break;
default:
- found = FALSE;
+ found = false;
}
break;
case 0x0034160: // /MAP[:filename]
@@ -1324,7 +1324,7 @@ bool VCLinkerTool::parseOption( const char* option )
OptimizeForWindows98 = optWin98No;
break;
default:
- found = FALSE;
+ found = false;
}
}
break;
@@ -1373,7 +1373,7 @@ bool VCLinkerTool::parseOption( const char* option )
AdditionalOptions += option;
break;
default:
- found = FALSE;
+ found = false;
}
}
break;
@@ -1383,7 +1383,7 @@ bool VCLinkerTool::parseOption( const char* option )
else if ( *(option+9) == 'C' )
SwapRunFromCD = _True;
else
- found = FALSE;
+ found = false;
break;
case 0x34906d4: // /TLBID:id
TypeLibraryResourceID = TQString( option+7 ).toLong();
@@ -1409,7 +1409,7 @@ bool VCLinkerTool::parseOption( const char* option )
Version = option+9;
break;
default:
- found = FALSE;
+ found = false;
}
if( !found )
warn_msg( WarnLogic, "Could not parse Linker options: %s", option );
@@ -1506,7 +1506,7 @@ bool VCMIDLTool::parseOption( const char* option )
displayHash( "/target {system}" ); displayHash( "/tlb filename" ); displayHash( "/use_epv" );
displayHash( "/win32" ); displayHash( "/win64" );
#endif
- bool found = TRUE;
+ bool found = true;
int offset = 0;
switch( elfHash(option) ) {
case 0x0000334: // /D name[=def]
@@ -1542,7 +1542,7 @@ bool VCMIDLTool::parseOption( const char* option )
StructMemberAlignment = midlAlignEightBytes;
break;
default:
- found = FALSE;
+ found = false;
}
break;
case 0x0359e82: // /char {ascii7|signed|unsigned}
@@ -1557,7 +1557,7 @@ bool VCMIDLTool::parseOption( const char* option )
DefaultCharType = midlCharUnsigned;
break;
default:
- found = FALSE;
+ found = false;
}
break;
case 0xa766524: // /cpp_opt options
@@ -1594,7 +1594,7 @@ bool VCMIDLTool::parseOption( const char* option )
ErrorCheckStubData = _True;
break;
default:
- found = FALSE;
+ found = false;
}
break;
case 0x5eb7af2: // /header filename
@@ -1699,14 +1699,14 @@ bool VCMIDLTool::parseOption( const char* option )
WarningLevel = midlWarningLevel_4;
break;
default:
- found = FALSE;
+ found = false;
}
}
break;
}
if( !found )
warn_msg( WarnLogic, "Could not parse MIDL option: %s", option );
- return TRUE;
+ return true;
}
// VCLibrarianTool --------------------------------------------------
@@ -1877,8 +1877,8 @@ TQTextStream &operator<<( TQTextStream &strm, const VCConfiguration &tool )
VCFilter::VCFilter()
: ParseFiles( unset )
{
- useCustomBuildTool = FALSE;
- useCompilerTool = FALSE;
+ useCustomBuildTool = false;
+ useCompilerTool = false;
}
void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename )
@@ -1899,7 +1899,7 @@ void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename )
return;
CustomBuildTool = VCCustomBuildTool();
- useCustomBuildTool = TRUE;
+ useCustomBuildTool = true;
CustomBuildTool.Description = "Moc&apos;ing " + filename + "...";
CustomBuildTool.CommandLine += (mocApp + " "
+ filename + " -o " + mocOutput);
@@ -1912,7 +1912,7 @@ void VCFilter::addMOCstage( TQTextStream & /*strm*/, TQString filename )
void VCFilter::addUICstage( TQTextStream & /*strm*/, TQString str )
{
CustomBuildTool = VCCustomBuildTool();
- useCustomBuildTool = TRUE;
+ useCustomBuildTool = true;
TQString uicApp = Project->var("QMAKE_UIC");
TQString mocApp = Project->var( "QMAKE_MOC" );
@@ -1972,7 +1972,7 @@ void VCFilter::modifyPCHstage( TQTextStream &/*strm*/, TQString str )
return;
CompilerTool = VCCLCompilerTool();
- useCompilerTool = TRUE;
+ useCompilerTool = true;
// Unset some default options
CompilerTool.BufferSecurityCheck = unset;
@@ -1992,23 +1992,23 @@ void VCFilter::modifyPCHstage( TQTextStream &/*strm*/, TQString str )
bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str )
{
- bool isCorH = FALSE;
+ bool isCorH = false;
if (str.endsWith(".c") || str.endsWith(".rc"))
- isCorH = TRUE;
+ isCorH = true;
TQStringList::Iterator it;
for(it = Option::cpp_ext.begin(); it != Option::cpp_ext.end(); ++it)
if(str.endsWith(*it))
- isCorH = TRUE;
+ isCorH = true;
for(it = Option::h_ext.begin(); it != Option::h_ext.end(); ++it)
if(str.endsWith(*it))
- isCorH = TRUE;
+ isCorH = true;
TQString collectionName = Project->project->first("QMAKE_IMAGE_COLLECTION");
if (str.isEmpty() || isCorH || collectionName.isEmpty())
- return FALSE;
+ return false;
CustomBuildTool = VCCustomBuildTool();
- useCustomBuildTool = TRUE;
+ useCustomBuildTool = true;
// Some projects (like designer core) may have too many images to
// call uic directly. Therefor we have to create a temporary
@@ -2016,7 +2016,7 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str )
TQString tmpFileCmd = "echo ";
TQString tmpImageFilename = ".imgcol";
TQStringList& list = Project->project->variables()["IMAGES"];
- bool firstOutput = TRUE;
+ bool firstOutput = true;
it = list.begin();
while( it!=list.end() ) {
tmpFileCmd += (*it) + " ";
@@ -2026,7 +2026,7 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str )
+ (firstOutput?"> ":">> ")
+ tmpImageFilename;
tmpFileCmd = "echo ";
- firstOutput = FALSE;
+ firstOutput = false;
}
}
@@ -2056,14 +2056,14 @@ bool VCFilter::addIMGstage( TQTextStream &/*strm*/, TQString str )
CustomBuildTool.AdditionalDependencies += list;
CustomBuildTool.Outputs = collectionName;
CustomBuildTool.Outputs += tmpImageFilename;
- return TRUE;
+ return true;
}
bool VCFilter::addLexYaccStage( TQTextStream &/*strm*/, TQString str )
{
bool doLex = str.endsWith(".l");
if (!doLex && !str.endsWith(".y"))
- return FALSE;
+ return false;
TQString fname = "$(InputName)";
if (doLex) {
@@ -2090,8 +2090,8 @@ bool VCFilter::addLexYaccStage( TQTextStream &/*strm*/, TQString str )
CustomBuildTool.CommandLine += "move y.tab.c " + fname + Option::cpp_ext.first();
CustomBuildTool.Outputs += fname + Option::cpp_ext.first();
}
- useCustomBuildTool = TRUE;
- return TRUE;
+ useCustomBuildTool = true;
+ return true;
}
TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool )
@@ -2105,7 +2105,7 @@ TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool )
strm << SPair( _Filter, tool.Filter );
strm << ">";
- bool resourceBuild = FALSE;
+ bool resourceBuild = false;
int currentLevels = 0;
TQStringList currentDirs;
for ( TQStringList::ConstIterator it = tool.Files.begin(); it != tool.Files.end(); ++it ) {
@@ -2137,8 +2137,8 @@ TQTextStream &operator<<( TQTextStream &strm, VCFilter &tool )
currentLevels = int(newDirs.count());
}
- tool.useCustomBuildTool = FALSE;
- tool.useCompilerTool = FALSE;
+ tool.useCustomBuildTool = false;
+ tool.useCompilerTool = false;
// Add UIC, MOC and PCH stages to file
if ( tool.CustomBuild == moc )
tool.addMOCstage( strm, *it );
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 13b928974..b1721ae1e 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -605,7 +605,7 @@ public:
// Functions
VCLibrarianTool();
virtual ~VCLibrarianTool(){}
- bool parseOption( const char* ){ return FALSE; };
+ bool parseOption( const char* ){ return false; };
// Variables
TQStringList AdditionalDependencies;
@@ -626,7 +626,7 @@ public:
// Functions
VCCustomBuildTool();
virtual ~VCCustomBuildTool(){}
- bool parseOption( const char* ){ return FALSE; };
+ bool parseOption( const char* ){ return false; };
// Variables
TQStringList AdditionalDependencies;
@@ -643,7 +643,7 @@ public:
// Functions
VCResourceCompilerTool();
virtual ~VCResourceCompilerTool(){}
- bool parseOption( const char* ){ return FALSE; };
+ bool parseOption( const char* ){ return false; };
// Variables
TQStringList AdditionalIncludeDirectories;
@@ -663,7 +663,7 @@ protected:
// Functions
VCEventTool() : ExcludedFromBuild( unset ){};
virtual ~VCEventTool(){}
- bool parseOption( const char* ){ return FALSE; };
+ bool parseOption( const char* ){ return false; };
public:
// Variables
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 999b05f04..0127acefd 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -170,7 +170,7 @@ const char* _slnExtSections = "\n\tGlobalSection(ExtensibilityGlobals) = postSol
"\n\tEndGlobalSection";
// ------------------------------------------------------------------
-VcprojGenerator::VcprojGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(FALSE)
+VcprojGenerator::VcprojGenerator(TQMakeProject *p) : Win32MakefileGenerator(p), init_flag(false)
{
}
@@ -185,7 +185,7 @@ bool VcprojGenerator::writeMakefile(TQTextStream &t)
if(!project->variables()["QMAKE_FAILED_REQUIREMENTS"].isEmpty()) {
fprintf(stderr, "Project file not generated because all requirements not met:\n\t%s\n",
var("QMAKE_FAILED_REQUIREMENTS").latin1());
- return TRUE;
+ return true;
}
// Generate project file
@@ -193,15 +193,15 @@ bool VcprojGenerator::writeMakefile(TQTextStream &t)
project->first("TEMPLATE") == "vclib") {
debug_msg(1, "Generator: MSVC.NET: Writing project file" );
t << vcProject;
- return TRUE;
+ return true;
}
// Generate solution file
else if(project->first("TEMPLATE") == "vcsubdirs") {
debug_msg(1, "Generator: MSVC.NET: Writing solution file" );
writeSubDirs(t);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -215,7 +215,7 @@ struct VcsolutionDepend {
TQUuid VcprojGenerator::getProjectUUID(const TQString &filename)
{
- bool validUUID = TRUE;
+ bool validUUID = true;
// Read GUID from variable-space
TQUuid uuid = project->first("GUID");
@@ -295,14 +295,14 @@ void VcprojGenerator::writeSubDirs(TQTextStream &t)
TQDict<VcsolutionDepend> solution_depends;
TQPtrList<VcsolutionDepend> solution_cleanup;
- solution_cleanup.setAutoDelete(TRUE);
+ solution_cleanup.setAutoDelete(true);
TQStringList subdirs = project->variables()["SUBDIRS"];
TQString oldpwd = TQDir::currentDirPath();
for(TQStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it) {
- TQFileInfo fi(Option::fixPathToLocalOS((*it), TRUE));
+ TQFileInfo fi(Option::fixPathToLocalOS((*it), true));
if(fi.exists()) {
if(fi.isDir()) {
TQString profile = (*it);
@@ -324,7 +324,7 @@ void VcprojGenerator::writeSubDirs(TQTextStream &t)
// Initialize a 'fake' project to get the correct variables
// and to be able to extract all the dependencies
VcprojGenerator tmp_vcproj(&tmp_proj);
- tmp_vcproj.setNoIO(TRUE);
+ tmp_vcproj.setNoIO(true);
tmp_vcproj.init();
if(Option::debug_level) {
TQMap<TQString, TQStringList> &vars = tmp_proj.variables();
@@ -447,7 +447,7 @@ void VcprojGenerator::init()
if( init_flag )
return;
if(project->first("TEMPLATE") == "vcsubdirs") { //too much work for subdirs
- init_flag = TRUE;
+ init_flag = true;
return;
}
@@ -881,9 +881,9 @@ inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode )
ySlashPos = y.find('\\', yPos);
if (xSlashPos == -1 && ySlashPos != -1) {
- return FALSE;
+ return false;
} else if (xSlashPos != -1 && ySlashPos == -1) {
- return TRUE;
+ return true;
} else if (xSlashPos == -1 /* && yySlashPos == -1 */) {
TQString subX = x.mid(xPos);
TQString subY = y.mid(yPos);
@@ -898,7 +898,7 @@ inline bool XLessThanY( TQString &x, TQString &y, bool flat_mode )
xPos = xSlashPos + 1;
yPos = ySlashPos + 1;
}
- return FALSE;
+ return false;
}
void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode )
{
@@ -909,7 +909,7 @@ void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode )
if ( last == b ) // shortcut
return;
while( b != last ) {// sort them
- bool swapped = FALSE;
+ bool swapped = false;
TQStringList::Iterator swap_pos = b;
TQStringList::Iterator x = e;
TQStringList::Iterator y = x;
@@ -919,7 +919,7 @@ void nonflatDir_BubbleSort( TQStringList& list, bool flat_mode )
--x;
--y;
if ( XLessThanY(*x,*y, flat_mode) ) {
- swapped = TRUE;
+ swapped = true;
swap_str = (*x); // Swap -------
(*x) = (*y);
(*y) = swap_str; // ------------
@@ -1063,7 +1063,7 @@ void VcprojGenerator::initOld()
if( init_flag )
return;
- init_flag = TRUE;
+ init_flag = true;
TQStringList::Iterator it;
if ( project->isActiveConfig("stl") ) {
@@ -1253,7 +1253,7 @@ void VcprojGenerator::initOld()
// MOC -----------------------------------------------------------
if ( project->isActiveConfig("moc") )
- setMocAware(TRUE);
+ setMocAware(true);
// /VERSION:x.yz -------------------------------------------------
if ( !project->variables()["VERSION"].isEmpty() ) {
@@ -1289,7 +1289,7 @@ void VcprojGenerator::initOld()
for(it = l.begin(); it != l.end(); ++it) {
TQStringList &gdmf = project->variables()[(*it)];
for(TQStringList::Iterator inner = gdmf.begin(); inner != gdmf.end(); ++inner)
- (*inner) = Option::fixPathToTargetOS((*inner), FALSE);
+ (*inner) = Option::fixPathToTargetOS((*inner), false);
}
// Get filename w/o extention -----------------------------------
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index 9e5488045..5e37308c1 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -65,7 +65,7 @@ public:
~VcprojGenerator();
TQString defaultMakefile() const;
- virtual bool doDepends() const { return FALSE; } //never necesary
+ virtual bool doDepends() const { return false; } //never necesary
TQString precompH, precompHFilename,
precompObj, precompPch;
bool usePCH;
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 872d0fb1c..408beade9 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -259,7 +259,7 @@ Win32MakefileGenerator::writeSubDirs(TQTextStream &t)
int
Win32MakefileGenerator::findHighestVersion(const TQString &d, const TQString &stem)
{
- TQString bd = Option::fixPathToLocalOS(d, TRUE);
+ TQString bd = Option::fixPathToLocalOS(d, true);
if(!TQFile::exists(bd))
return -1;
if(!project->variables()["QMAKE_" + stem.upper() + "_VERSION_OVERRIDE"].isEmpty())
@@ -269,7 +269,7 @@ Win32MakefileGenerator::findHighestVersion(const TQString &d, const TQString &st
int biggest=-1;
TQStringList entries = dir.entryList();
TQString dllStem = stem + TQTDLL_POSTFIX;
- TQRegExp regx( "(" + dllStem + "([0-9]*)).lib", FALSE );
+ TQRegExp regx( "(" + dllStem + "([0-9]*)).lib", false );
for(TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) {
if(regx.exactMatch((*it)))
biggest = TQMAX(biggest, (regx.cap(1) == dllStem ||
@@ -334,10 +334,10 @@ Win32MakefileGenerator::findLibraries(const TQString &where)
dirs.append(new MakefileDependDir(r.replace("\"",""), l.replace("\"","")));
}
}
- dirs.setAutoDelete(TRUE);
+ dirs.setAutoDelete(true);
for(TQStringList::Iterator it = l.begin(); it != l.end(); ) {
TQChar quote;
- bool modified_opt = FALSE, remove = FALSE;
+ bool modified_opt = false, remove = false;
TQString opt = (*it).stripWhiteSpace();
if((opt[0] == '\'' || opt[0] == '"') && opt[(int)opt.length()-1] == opt[0]) {
quote = opt[0];
@@ -351,7 +351,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where)
TQString r = opt.mid(2), l = Option::fixPathToLocalOS(r);
dirs.append(new MakefileDependDir(r.replace("\"",""),
l.replace("\"","")));
- remove = TRUE; //we eat this switch
+ remove = true; //we eat this switch
} else if(opt.startsWith("-l") || opt.startsWith("/l")) {
TQString lib = opt.right(opt.length() - 2), out;
if(!lib.isEmpty()) {
@@ -369,9 +369,9 @@ Win32MakefileGenerator::findLibraries(const TQString &where)
}
}
if(out.isEmpty()) {
- remove = TRUE; //just eat it since we cannot find one..
+ remove = true; //just eat it since we cannot find one..
} else {
- modified_opt = TRUE;
+ modified_opt = true;
(*it) = out;
}
} else if(!TQFile::exists(Option::fixPathToLocalOS(opt))) {
@@ -405,7 +405,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where)
dir += Option::dir_sep;
lib_tmpl.prepend(dir);
}
- modified_opt = TRUE;
+ modified_opt = true;
(*it) = lib_tmpl;
break;
}
@@ -423,7 +423,7 @@ Win32MakefileGenerator::findLibraries(const TQString &where)
++it;
}
}
- return TRUE;
+ return true;
}
void
@@ -431,7 +431,7 @@ Win32MakefileGenerator::processPrlFiles()
{
TQDict<void> processed;
TQPtrList<MakefileDependDir> libdirs;
- libdirs.setAutoDelete(TRUE);
+ libdirs.setAutoDelete(true);
{
TQStringList &libpaths = project->variables()["QMAKE_LIBDIR"];
for(TQStringList::Iterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit) {
@@ -441,7 +441,7 @@ Win32MakefileGenerator::processPrlFiles()
l.replace("\"","")));
}
}
- for(bool ret = FALSE; TRUE; ret = FALSE) {
+ for(bool ret = false; true; ret = false) {
//read in any prl files included..
TQStringList l_out;
TQString where = "QMAKE_LIBS";
@@ -461,7 +461,7 @@ Win32MakefileGenerator::processPrlFiles()
if(!processed[opt]) {
if(processPrlFile(opt)) {
processed.insert(opt, (void*)1);
- ret = TRUE;
+ ret = true;
} else {
for(MakefileDependDir *mdd = libdirs.first(); mdd; mdd = libdirs.next() ) {
TQString prl = mdd->local_dir + Option::dir_sep + opt;
@@ -469,7 +469,7 @@ Win32MakefileGenerator::processPrlFiles()
break;
} else if(processPrlFile(prl)) {
processed.insert(prl, (void*)1);
- ret = TRUE;
+ ret = true;
break;
}
}
diff --git a/qmake/main.cpp b/qmake/main.cpp
index d9095ef0a..7e30a6785 100644
--- a/qmake/main.cpp
+++ b/qmake/main.cpp
@@ -52,7 +52,7 @@
#ifdef Q_OS_MAC
// for qurl
-bool tqt_resolve_symlinks = FALSE;
+bool tqt_resolve_symlinks = false;
#endif
#if defined(TQ_WS_WIN)
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
}
}
- bool using_stdout = FALSE;
+ bool using_stdout = false;
MakefileGenerator *mkfile = MakefileGenerator::create(&proj); //figure out generator
if(mkfile && (Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)) {
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
Option::output.setName("");
Option::output_dir = TQDir::currentDirPath();
Option::output.open(IO_WriteOnly | IO_Translate, stdout);
- using_stdout = TRUE;
+ using_stdout = true;
} else {
if(Option::output.name().isEmpty() && Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE)
Option::output.setName(proj.first("QMAKE_MAKEFILE"));
@@ -166,7 +166,7 @@ int main(int argc, char **argv)
}
}
} else {
- using_stdout = TRUE; //kind of..
+ using_stdout = true; //kind of..
}
if(mkfile && !mkfile->write()) {
if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
diff --git a/qmake/meta.cpp b/qmake/meta.cpp
index 36ae25744..df584fa57 100644
--- a/qmake/meta.cpp
+++ b/qmake/meta.cpp
@@ -57,10 +57,10 @@ TQMakeMetaInfo::readLib(const TQString &lib)
if(cache_vars.contains(meta_file)) {
vars = cache_vars[meta_file];
- return TRUE;
+ return true;
}
- bool ret = FALSE;
+ bool ret = false;
if(!meta_file.isNull()) {
if(meta_file.endsWith(Option::pkgcfg_ext)) {
if((ret=readPkgCfgFile(meta_file)))
@@ -72,10 +72,10 @@ TQMakeMetaInfo::readLib(const TQString &lib)
TQMakeProject proj;
if(!proj.read(Option::fixPathToLocalOS(meta_file),
TQDir::currentDirPath(), TQMakeProject::ReadProFile))
- return FALSE;
+ return false;
meta_type = "tqmake";
vars = proj.variables();
- ret = TRUE;
+ ret = true;
} else {
warn_msg(WarnLogic, "TQMakeMetaInfo: unknown file format for %s", meta_file.latin1());
}
@@ -124,7 +124,7 @@ TQMakeMetaInfo::readLibtoolFile(const TQString &f)
/* I can just run the .la through the .pro parser since they are compatible.. */
TQMakeProject proj;
if(!proj.read(Option::fixPathToLocalOS(f), TQDir::currentDirPath(), TQMakeProject::ReadProFile))
- return FALSE;
+ return false;
TQString dirf = Option::fixPathToTargetOS(f).section(Option::dir_sep, 0, -2);
if(dirf == f)
dirf = "";
@@ -147,7 +147,7 @@ TQMakeMetaInfo::readLibtoolFile(const TQString &f)
if(lst.count() == 1)
lst = TQStringList::split(" ", lst.first());
for(TQStringList::Iterator lst_it = lst.begin(); lst_it != lst.end(); ++lst_it) {
- bool found = FALSE;
+ bool found = false;
TQString dirs[] = { "", dir, dirf, dirf + ".libs" + TQDir::separator(), "(term)" };
for(int i = 0; !found && dirs[i] != "(term)"; i++) {
if(TQFile::exists(dirs[i] + (*lst_it))) {
@@ -155,7 +155,7 @@ TQMakeMetaInfo::readLibtoolFile(const TQString &f)
if(TQDir::isRelativePath(targ))
targ.prepend(TQDir::currentDirPath() + TQDir::separator());
vars["QMAKE_PRL_TARGET"] << targ;
- found = TRUE;
+ found = true;
}
}
if(found)
@@ -184,12 +184,12 @@ TQMakeMetaInfo::readLibtoolFile(const TQString &f)
vars["QMAKE_PRL_LIBS"] += lst;
}
}
- return TRUE;
+ return true;
}
bool
TQMakeMetaInfo::readPkgCfgFile(const TQString &f)
{
fprintf(stderr, "Must implement reading in pkg-config files (%s)!!!\n", f.latin1());
- return FALSE;
+ return false;
}
diff --git a/qmake/option.cpp b/qmake/option.cpp
index d57e39e6e..e1bdafae3 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -89,18 +89,18 @@ Option::TARG_MODE Option::target_mode = Option::TARG_UNIX_MODE;
TQStringList Option::prop::properties;
//QMAKE_GENERATE_PROJECT stuff
-bool Option::projfile::do_pwd = TRUE;
-bool Option::projfile::do_recursive = TRUE;
+bool Option::projfile::do_pwd = true;
+bool Option::projfile::do_recursive = true;
TQStringList Option::projfile::project_dirs;
//QMAKE_GENERATE_MAKEFILE stuff
TQString Option::mkfile::qmakespec;
int Option::mkfile::cachefile_depth = -1;
-bool Option::mkfile::do_deps = TRUE;
-bool Option::mkfile::do_mocs = TRUE;
-bool Option::mkfile::do_dep_heuristics = TRUE;
-bool Option::mkfile::do_preprocess = FALSE;
-bool Option::mkfile::do_cache = TRUE;
+bool Option::mkfile::do_deps = true;
+bool Option::mkfile::do_mocs = true;
+bool Option::mkfile::do_dep_heuristics = true;
+bool Option::mkfile::do_preprocess = false;
+bool Option::mkfile::do_cache = true;
TQString Option::mkfile::cachefile;
TQStringList Option::mkfile::project_files;
TQString Option::mkfile::qmakespec_commandline;
@@ -168,7 +168,7 @@ bool usage(const char *a0)
,a0,
default_mode(a0) == Option::QMAKE_GENERATE_PROJECT ? " (default)" : "", project_builtin_regx().latin1(),
default_mode(a0) == Option::QMAKE_GENERATE_MAKEFILE ? " (default)" : "");
- return FALSE;
+ return false;
}
enum {
@@ -179,19 +179,19 @@ enum {
int
Option::internalParseCommandLine(int argc, char **argv, int skip)
{
- bool before = TRUE;
+ bool before = true;
for(int x = skip; x < argc; x++) {
if(*argv[x] == '-' && strlen(argv[x]) > 1) { /* options */
TQString opt = argv[x] + 1;
//first param is a mode, or we default
if(x == 1) {
- bool specified = TRUE;
+ bool specified = true;
if(opt == "project") {
Option::qmake_mode = Option::QMAKE_GENERATE_PROJECT;
} else if(opt == "prl") {
- Option::mkfile::do_deps = FALSE;
- Option::mkfile::do_mocs = FALSE;
+ Option::mkfile::do_deps = false;
+ Option::mkfile::do_mocs = false;
Option::qmake_mode = Option::QMAKE_GENERATE_PRL;
} else if(opt == "set") {
Option::qmake_mode = Option::QMAKE_SET_PROPERTY;
@@ -200,7 +200,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
} else if(opt == "makefile") {
Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE;
} else {
- specified = FALSE;
+ specified = false;
}
if(specified)
continue;
@@ -209,7 +209,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
if(opt == "o" || opt == "output") {
Option::output.setName(argv[++x]);
} else if(opt == "after") {
- before = FALSE;
+ before = false;
} else if(opt == "t" || opt == "template") {
Option::user_template = argv[++x];
} else if(opt == "tp" || opt == "template_prefix") {
@@ -242,15 +242,15 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
if(opt == "nodepend") {
- Option::mkfile::do_deps = FALSE;
+ Option::mkfile::do_deps = false;
} else if(opt == "nomoc") {
- Option::mkfile::do_mocs = FALSE;
+ Option::mkfile::do_mocs = false;
} else if(opt == "nocache") {
- Option::mkfile::do_cache = FALSE;
+ Option::mkfile::do_cache = false;
} else if(opt == "nodependheuristics") {
- Option::mkfile::do_dep_heuristics = FALSE;
+ Option::mkfile::do_dep_heuristics = false;
} else if(opt == "E") {
- Option::mkfile::do_preprocess = TRUE;
+ Option::mkfile::do_preprocess = true;
} else if(opt == "cache") {
Option::mkfile::cachefile = argv[++x];
} else if(opt == "platform" || opt == "spec") {
@@ -262,11 +262,11 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
}
} else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
if(opt == "nopwd") {
- Option::projfile::do_pwd = FALSE;
+ Option::projfile::do_pwd = false;
} else if(opt == "r") {
- Option::projfile::do_recursive = TRUE;
+ Option::projfile::do_recursive = true;
} else if(opt == "norecursive") {
- Option::projfile::do_recursive = FALSE;
+ Option::projfile::do_recursive = false;
} else {
fprintf(stderr, "***Unknown option -%s\n", opt.latin1());
return QMAKE_CMDLINE_SHOW_USAGE;
@@ -281,7 +281,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
else
Option::after_user_vars.append(arg);
} else {
- bool handled = TRUE;
+ bool handled = true;
if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY ||
Option::qmake_mode == Option::QMAKE_SET_PROPERTY) {
Option::prop::properties.append(arg);
@@ -295,7 +295,7 @@ Option::internalParseCommandLine(int argc, char **argv, int skip)
else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
Option::projfile::project_dirs.append(arg);
else
- handled = FALSE;
+ handled = false;
}
if(!handled)
return QMAKE_CMDLINE_SHOW_USAGE;
@@ -370,7 +370,7 @@ Option::parseCommandLine(int argc, char **argv)
{
int ret = internalParseCommandLine(argc, argv, 1);
if(ret != QMAKE_CMDLINE_SUCCESS)
- return ret == QMAKE_CMDLINE_SHOW_USAGE ? usage(argv[0]) : FALSE;
+ return ret == QMAKE_CMDLINE_SHOW_USAGE ? usage(argv[0]) : false;
}
//last chance for defaults
@@ -405,7 +405,7 @@ Option::parseCommandLine(int argc, char **argv)
Option::dir_sep = "/";
Option::obj_ext = ".o";
}
- return TRUE;
+ return true;
}
bool Option::postProcessProject(TQMakeProject *project)
@@ -447,14 +447,14 @@ bool Option::postProcessProject(TQMakeProject *project)
Option::yacc_mod = project->first("QMAKE_MOD_YACC");
if(!project->isEmpty("QMAKE_DIR_SEP"))
Option::dir_sep = project->first("QMAKE_DIR_SEP");
- return TRUE;
+ return true;
}
void fixEnvVariables(TQString &x)
{
int rep;
TQRegExp reg_var("\\$\\(.*\\)");
- reg_var.setMinimal( TRUE );
+ reg_var.setMinimal( true );
while((rep = reg_var.search(x)) != -1)
x.replace(rep, reg_var.matchedLength(), TQString(getenv(x.mid(rep + 2, reg_var.matchedLength() - 3).latin1())));
}
diff --git a/qmake/option.h b/qmake/option.h
index 6b02d1352..01f40f5b1 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -84,8 +84,8 @@ struct Option
static bool postProcessProject(TQMakeProject *);
//and convenience functions
- static TQString fixPathToLocalOS(const TQString& in, bool fix_env=TRUE, bool canonical=TRUE);
- static TQString fixPathToTargetOS(const TQString& in, bool fix_env=TRUE, bool canonical=TRUE);
+ static TQString fixPathToLocalOS(const TQString& in, bool fix_env=true, bool canonical=true);
+ static TQString fixPathToTargetOS(const TQString& in, bool fix_env=true, bool canonical=true);
//global qmake mode, can only be in one mode per invocation!
enum QMAKE_MODE { QMAKE_GENERATE_NOTHING, QMAKE_GENERATE_PROJECT, QMAKE_GENERATE_MAKEFILE,
diff --git a/qmake/project.cpp b/qmake/project.cpp
index de57507e2..e12fd5e49 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -163,7 +163,7 @@ static TQStringList split_arg_list(const TQString &params)
return args;
}
-static TQStringList split_value_list(const TQString &vals, bool do_semicolon=FALSE)
+static TQStringList split_value_list(const TQString &vals, bool do_semicolon=false)
{
TQString build;
TQStringList ret;
@@ -215,7 +215,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(hash_mark != -1) //good bye comments
s = s.left(hash_mark);
if(s.isEmpty()) /* blank_line */
- return TRUE;
+ return true;
if(s.stripWhiteSpace().left(1) == "}") {
debug_msg(1, "Project Parser: %s:%d : Leaving block %d", parser.file.latin1(),
@@ -224,7 +224,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
scope_block--;
s = s.mid(1).stripWhiteSpace();
if(s.isEmpty())
- return TRUE;
+ return true;
}
if(!(scope_flag & (0x01 << scope_block))) {
/* adjust scope for each block which appears on a single line */
@@ -232,7 +232,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
scope_flag &= ~(0x01 << (++scope_block));
debug_msg(1, "Project Parser: %s:%d : Ignored due to block being false.",
parser.file.latin1(), parser.line_no);
- return TRUE;
+ return true;
}
TQString scope, var, op;
@@ -240,7 +240,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
#define SKIP_WS(d) while(*d && (*d == ' ' || *d == '\t')) d++
const char *d = s.latin1();
SKIP_WS(d);
- bool scope_failed = FALSE, else_line = FALSE, or_op=FALSE;
+ bool scope_failed = false, else_line = false, or_op=false;
int parens = 0, scope_count=0;
while(*d) {
if(!parens) {
@@ -255,7 +255,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(*k == '=') {
TQString msg;
qmake_error_msg(*d + "must be followed immediately by =");
- return FALSE;
+ return false;
}
}
}
@@ -277,9 +277,9 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(scope.lower() == "else") {
if(scope_count != 1 || test_status == TestNone) {
qmake_error_msg("Unexpected " + scope + " ('" + s + "')");
- return FALSE;
+ return false;
}
- else_line = TRUE;
+ else_line = true;
test = (test_status == TestSeek);
debug_msg(1, "Project Parser: %s:%d : Else%s %s.", parser.file.latin1(), parser.line_no,
scope == "else" ? "" : TQString(" (" + scope + ")").latin1(),
@@ -298,7 +298,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
error.sprintf("Function missing right paren: %s ('%s')",
comp_scope.latin1(), s.latin1());
qmake_error_msg(error);
- return FALSE;
+ return false;
}
TQString func = comp_scope.left(lparen);
test = doProjectTest(func, comp_scope.mid(lparen+1, rparen - lparen - 1), place);
@@ -306,10 +306,10 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(invert_test)
test = !test;
test_status = (test ? TestFound : TestSeek);
- return TRUE; /* assume we are done */
+ return true; /* assume we are done */
}
} else {
- test = isActiveConfig(comp_scope.stripWhiteSpace(), TRUE, &place);
+ test = isActiveConfig(comp_scope.stripWhiteSpace(), true, &place);
}
if(invert_test)
test = !test;
@@ -373,7 +373,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
}
doVariableReplace(vals, place);
if(scope_failed)
- return TRUE; /* oh well */
+ return true; /* oh well */
#undef SKIP_WS
if(!var.isEmpty() && Option::mkfile::do_preprocess) {
@@ -401,22 +401,22 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(vallist.count() != 1) {
qmake_error_msg("~= operator only accepts one right hand paramater ('" +
s + "')");
- return FALSE;
+ return false;
}
TQString val(vallist.first());
if(val.length() < 4 || val.at(0) != 's') {
qmake_error_msg("~= operator only can handle s/// function ('" +
s + "')");
- return FALSE;
+ return false;
}
TQChar sep = val.at(1);
- TQStringList func = TQStringList::split(sep, val, TRUE);
+ TQStringList func = TQStringList::split(sep, val, true);
if(func.count() < 3 || func.count() > 4) {
qmake_error_msg("~= operator only can handle s/// function ('" +
s + "')");
- return FALSE;
+ return false;
}
- bool global = FALSE, case_sense = TRUE;
+ bool global = false, case_sense = true;
if(func.count() == 4) {
global = func[3].find('g') != -1;
case_sense = func[3].find('i') == -1;
@@ -451,7 +451,7 @@ TQMakeProject::parse(const TQString &t, TQMap<TQString, TQStringList> &place)
if(var == "REQUIRES") /* special case to get communicated to backends! */
doProjectCheckReqs(vallist, place);
- return TRUE;
+ return true;
}
bool
@@ -462,12 +462,12 @@ TQMakeProject::read(const TQString &file, TQMap<TQString, TQStringList> &place)
TQString filename = Option::fixPathToLocalOS(file);
doVariableReplace(filename, place);
- bool ret = FALSE, using_stdin = FALSE;
+ bool ret = false, using_stdin = false;
TQFile qfile;
if(!strcmp(filename, "-")) {
qfile.setName("");
ret = qfile.open(IO_ReadOnly, stdin);
- using_stdin = TRUE;
+ using_stdin = true;
} else {
qfile.setName(filename);
ret = qfile.open(IO_ReadOnly);
@@ -564,16 +564,16 @@ TQMakeProject::read(uchar cmd)
}
if(Option::mkfile::qmakespec.isEmpty()) {
fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
- return FALSE;
+ return false;
}
}
if(TQDir::isRelativePath(Option::mkfile::qmakespec)) {
- bool found_mkspec = FALSE;
+ bool found_mkspec = false;
for(TQStringList::Iterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
TQString mkspec = (*it) + TQDir::separator() + Option::mkfile::qmakespec;
if(TQFile::exists(mkspec)) {
- found_mkspec = TRUE;
+ found_mkspec = true;
Option::mkfile::qmakespec = mkspec;
break;
}
@@ -581,7 +581,7 @@ TQMakeProject::read(uchar cmd)
if(!found_mkspec) {
fprintf(stderr, "Could not find mkspecs for your QMAKESPEC after trying:\n\t%s\n",
mkspec_roots.join("\n\t").latin1());
- return FALSE;
+ return false;
}
}
@@ -595,7 +595,7 @@ TQMakeProject::read(uchar cmd)
debug_msg(1, "QMAKESPEC conf: reading %s", spec.latin1());
if(!read(spec, base_vars)) {
fprintf(stderr, "Failure to read QMAKESPEC conf file %s.\n", spec.latin1());
- return FALSE;
+ return false;
}
if(Option::mkfile::do_cache && !Option::mkfile::cachefile.isEmpty()) {
debug_msg(1, "QMAKECACHE file: reading %s", Option::mkfile::cachefile.latin1());
@@ -612,7 +612,7 @@ TQMakeProject::read(uchar cmd)
it != Option::before_user_vars.end(); ++it) {
if(!parse((*it), base_vars)) {
fprintf(stderr, "Argument failed to parse: %s\n", (*it).latin1());
- return FALSE;
+ return false;
}
parser.line_no++;
}
@@ -626,7 +626,7 @@ TQMakeProject::read(uchar cmd)
if(pfile != "-" && !TQFile::exists(pfile) && !pfile.endsWith(".pro"))
pfile += ".pro";
if(!read(pfile, vars))
- return FALSE;
+ return false;
}
if(cmd & ReadPostFiles) { /* parse post files */
@@ -643,7 +643,7 @@ TQMakeProject::read(uchar cmd)
it != Option::after_user_vars.end(); ++it) {
if(!parse((*it), vars)) {
fprintf(stderr, "Argument failed to parse: %s\n", (*it).latin1());
- return FALSE;
+ return false;
}
parser.line_no++;
}
@@ -689,36 +689,36 @@ TQMakeProject::read(uchar cmd)
}
}
}
- return TRUE;
+ return true;
}
bool
TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQStringList> *place)
{
if(x.isEmpty())
- return TRUE;
+ return true;
if((Option::target_mode == Option::TARG_MACX_MODE || Option::target_mode == Option::TARG_QNX6_MODE ||
Option::target_mode == Option::TARG_UNIX_MODE) && x == "unix")
- return TRUE;
+ return true;
else if(Option::target_mode == Option::TARG_MACX_MODE && x == "macx")
- return TRUE;
+ return true;
else if(Option::target_mode == Option::TARG_QNX6_MODE && x == "qnx6")
- return TRUE;
+ return true;
else if(Option::target_mode == Option::TARG_MAC9_MODE && x == "mac9")
- return TRUE;
+ return true;
else if((Option::target_mode == Option::TARG_MAC9_MODE || Option::target_mode == Option::TARG_MACX_MODE) &&
x == "mac")
- return TRUE;
+ return true;
else if(Option::target_mode == Option::TARG_WIN_MODE && x == "win32")
- return TRUE;
+ return true;
- TQRegExp re(x, FALSE, TRUE);
+ TQRegExp re(x, false, true);
TQString spec = Option::mkfile::qmakespec.right(Option::mkfile::qmakespec.length() -
(Option::mkfile::qmakespec.findRev(TQDir::separator())+1));
if((regex && re.exactMatch(spec)) || (!regex && spec == x))
- return TRUE;
+ return true;
#ifdef Q_OS_UNIX
else if(spec == "default") {
static char *buffer = NULL;
@@ -731,7 +731,7 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS
if(r.findRev('/') != -1)
r = r.mid(r.findRev('/') + 1);
if((regex && re.exactMatch(r)) || (!regex && r == x))
- return TRUE;
+ return true;
}
}
#endif
@@ -741,9 +741,9 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS
for(TQStringList::Iterator it = configs.begin(); it != configs.end(); ++it) {
if((regex && re.exactMatch((*it))) || (!regex && (*it) == x))
if(re.exactMatch((*it)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool
@@ -773,7 +773,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(args.count() != 2) {
fprintf(stderr, "%s:%d: equals(variable, value) requires two arguments.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
TQString value = args[1];
if((value.left(1) == "\"" || value.left(1) == "'") && value.right(1) == value.left(1))
@@ -783,14 +783,14 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(args.count() != 1) {
fprintf(stderr, "%s:%d: exists(file) requires one argument.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
TQString file = args.first();
file = Option::fixPathToLocalOS(file);
doVariableReplace(file, place);
if(TQFile::exists(file))
- return TRUE;
+ return true;
//regular expression I guess
TQString dirstr = TQDir::currentDirPath();
int slsh = file.findRev(Option::dir_sep);
@@ -804,27 +804,27 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(args.count() != 1) {
fprintf(stderr, "%s:%d: system(exec) requires one argument.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
return system(args.first().latin1()) == 0;
} else if(func == "contains") {
if(args.count() != 2) {
fprintf(stderr, "%s:%d: contains(var, val) requires two arguments.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
TQRegExp regx(args[1]);
TQStringList &l = place[args[0]];
for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
if(regx.exactMatch((*it)))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} else if(func == "infile") {
if(args.count() < 2 || args.count() > 3) {
fprintf(stderr, "%s:%d: infile(file, var, val) requires at least 2 arguments.\n",
parser.file.latin1(), parser.line_no);
- return FALSE;
+ return false;
}
TQMakeProject proj;
TQString file = args[0];
@@ -836,7 +836,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(di != -1) {
if(!TQDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) {
fprintf(stderr, "Cannot find directory: %s\n", file.left(di).latin1());
- return FALSE;
+ return false;
}
file = file.right(file.length() - di - 1);
}
@@ -846,7 +846,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(ret) {
fprintf(stderr, "Error processing project file: %s\n", file.latin1());
TQDir::setCurrent(oldpwd);
- return FALSE;
+ return false;
}
if(args.count() == 2) {
ret = !proj.isEmpty(args[1]);
@@ -855,7 +855,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
TQStringList &l = proj.values(args[1]);
for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
if(regx.exactMatch((*it))) {
- ret = TRUE;
+ ret = true;
break;
}
}
@@ -866,14 +866,14 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(args.count() != 2) {
fprintf(stderr, "%s:%d: count(var, count) requires two arguments.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
return vars[args[0]].count() == args[1].toUInt();
} else if(func == "isEmpty") {
if(args.count() != 1) {
fprintf(stderr, "%s:%d: isEmpty(var) requires one argument.\n", parser.file.latin1(),
parser.line_no);
- return FALSE;
+ return false;
}
return vars[args[0]].isEmpty();
} else if(func == "include" || func == "load") {
@@ -886,7 +886,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
func_desc = "load(feature)";
fprintf(stderr, "%s:%d: %s requires one argument.\n", parser.file.latin1(),
parser.line_no, func_desc.latin1());
- return FALSE;
+ return false;
}
TQString file = args.first();
@@ -897,7 +897,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(!file.endsWith(Option::prf_ext))
file += Option::prf_ext;
if(file.find(Option::dir_sep) == -1 || !TQFile::exists(file)) {
- bool found = FALSE;
+ bool found = false;
const TQString concat = TQDir::separator() + TQString("mkspecs") +
TQDir::separator() + TQString("features");
TQStringList feature_roots;
@@ -942,7 +942,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
for(TQStringList::Iterator it = feature_roots.begin(); it != feature_roots.end(); ++it) {
TQString prf = (*it) + TQDir::separator() + file;
if(TQFile::exists(prf)) {
- found = TRUE;
+ found = true;
file = prf;
break;
}
@@ -980,7 +980,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(di != -1) {
if(!TQDir::setCurrent(file.left(file.findRev(Option::dir_sep)))) {
fprintf(stderr, "Cannot find directory: %s\n", file.left(di).latin1());
- return FALSE;
+ return false;
}
file = file.right(file.length() - di - 1);
}
@@ -988,7 +988,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
int sb = scope_block;
int sf = scope_flag;
TestStatus sc = test_status;
- bool r = FALSE;
+ bool r = false;
if(!seek_var.isNull()) {
TQMap<TQString, TQStringList> tmp;
if((r = read(file.latin1(), tmp)))
@@ -1011,7 +1011,7 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
if(args.count() != 1) {
fprintf(stderr, "%s:%d: %s(message) requires one argument.\n", parser.file.latin1(),
parser.line_no, func.latin1());
- return FALSE;
+ return false;
}
TQString msg = args.first();
if((msg.startsWith("\"") || msg.startsWith("'")) && msg.endsWith(msg.left(1)))
@@ -1023,19 +1023,19 @@ TQMakeProject::doProjectTest(const TQString& func, TQStringList args, TQMap<TQSt
fixEnvVariables(msg);
fprintf(stderr, "Project %s: %s\n", func.upper().latin1(), msg.latin1());
if(func == "message")
- return TRUE;
+ return true;
exit(2);
} else {
fprintf(stderr, "%s:%d: Unknown test function: %s\n", parser.file.latin1(), parser.line_no,
func.latin1());
}
- return FALSE;
+ return false;
}
bool
TQMakeProject::doProjectCheckReqs(const TQStringList &deps, TQMap<TQString, TQStringList> &place)
{
- bool ret = FALSE;
+ bool ret = false;
for(TQStringList::ConstIterator it = deps.begin(); it != deps.end(); ++it) {
TQString chk = (*it);
if(chk.isEmpty())
@@ -1057,7 +1057,7 @@ TQMakeProject::doProjectCheckReqs(const TQStringList &deps, TQMap<TQString, TQSt
test = doProjectTest(func, chk.mid(lparen+1, rparen - lparen - 1), place);
}
} else {
- test = isActiveConfig(chk, TRUE, &place);
+ test = isActiveConfig(chk, true, &place);
}
if(invert_test) {
chk.prepend("!");
@@ -1067,7 +1067,7 @@ TQMakeProject::doProjectCheckReqs(const TQStringList &deps, TQMap<TQString, TQSt
debug_msg(1, "Project Parser: %s:%d Failed test: REQUIRES = %s",
parser.file.latin1(), parser.line_no, chk.latin1());
place["QMAKE_FAILED_REQUIREMENTS"].append(chk);
- ret = FALSE;
+ ret = false;
}
}
return ret;
@@ -1087,19 +1087,19 @@ TQMakeProject::doVariableReplace(TQString &str, const TQMap<TQString, TQStringLi
}
int var_incr = var_begin + 2;
- bool in_braces = FALSE, as_env = FALSE, as_prop = FALSE;
+ bool in_braces = false, as_env = false, as_prop = false;
if(str[var_incr] == '{') {
- in_braces = TRUE;
+ in_braces = true;
var_incr++;
while(var_incr < (int)str.length() &&
(str[var_incr] == ' ' || str[var_incr] == '\t' || str[var_incr] == '\n'))
var_incr++;
}
if(str[var_incr] == '(') {
- as_env = TRUE;
+ as_env = true;
var_incr++;
} else if(str[var_incr] == '[') {
- as_prop = TRUE;
+ as_prop = true;
var_incr++;
}
TQString val, args;
diff --git a/qmake/project.h b/qmake/project.h
index 3d7f17779..d4b8cd5f8 100644
--- a/qmake/project.h
+++ b/qmake/project.h
@@ -75,7 +75,7 @@ public:
TQStringList &values(const TQString &v);
TQString first(const TQString &v);
TQMap<TQString, TQStringList> &variables();
- bool isActiveConfig(const TQString &x, bool regex=FALSE, TQMap<TQString, TQStringList> *place=NULL);
+ bool isActiveConfig(const TQString &x, bool regex=false, TQMap<TQString, TQStringList> *place=NULL);
protected:
friend class MakefileGenerator;
diff --git a/qmake/property.cpp b/qmake/property.cpp
index d7ce32f0f..79cd689a1 100644
--- a/qmake/property.cpp
+++ b/qmake/property.cpp
@@ -60,9 +60,9 @@ TQMakeProperty::~TQMakeProperty()
bool TQMakeProperty::initSettings()
{
if(sett)
- return TRUE;
+ return true;
sett = new TQSettings;
- return TRUE;
+ return true;
}
TQString
@@ -106,12 +106,12 @@ TQMakeProperty::value(TQString v, bool just_check)
version = v.left(slash-1);
v = v.mid(slash+1);
}
- TQStringList subs = sett->subkeyList(keyBase(FALSE));
+ TQStringList subs = sett->subkeyList(keyBase(false));
subs.sort();
for(TQStringList::Iterator it = subs.fromLast(); it != subs.end(); --it) {
if((*it).isEmpty() || (*it) > version)
continue;
- ret = sett->readEntry(keyBase(FALSE) + (*it) + "/" + v, TQString::null, &ok);
+ ret = sett->readEntry(keyBase(false) + (*it) + "/" + v, TQString::null, &ok);
if(ok) {
if(!just_check)
debug_msg(1, "Fell back from %s -> %s for '%s'.", version.latin1(),
@@ -129,8 +129,8 @@ bool
TQMakeProperty::hasValue(TQString v)
{
if(initSettings())
- return !value(v, TRUE).isNull();
- return FALSE;
+ return !value(v, true).isNull();
+ return false;
}
void
@@ -143,30 +143,30 @@ TQMakeProperty::setValue(TQString var, const TQString &val)
bool
TQMakeProperty::exec()
{
- bool ret = TRUE;
+ bool ret = true;
if(Option::qmake_mode == Option::QMAKE_QUERY_PROPERTY) {
if(Option::prop::properties.isEmpty() && initSettings()) {
- TQStringList subs = sett->subkeyList(keyBase(FALSE));
+ TQStringList subs = sett->subkeyList(keyBase(false));
subs.sort();
for(TQStringList::Iterator it = subs.fromLast(); it != subs.end(); --it) {
if((*it).isEmpty())
continue;
- TQStringList keys = sett->entryList(keyBase(FALSE) + (*it));
+ TQStringList keys = sett->entryList(keyBase(false) + (*it));
for(TQStringList::Iterator it2 = keys.begin(); it2 != keys.end(); it2++) {
- TQString ret = sett->readEntry(keyBase(FALSE) + (*it) + "/" + (*it2));
+ TQString ret = sett->readEntry(keyBase(false) + (*it) + "/" + (*it2));
if((*it) != qmake_version())
fprintf(stdout, "%s/", (*it).latin1());
fprintf(stdout, "%s:%s\n", (*it2).latin1(), ret.latin1());
}
}
- return TRUE;
+ return true;
}
for(TQStringList::Iterator it = Option::prop::properties.begin();
it != Option::prop::properties.end(); it++) {
if(Option::prop::properties.count() > 1)
fprintf(stdout, "%s:", (*it).latin1());
if(!hasValue((*it))) {
- ret = FALSE;
+ ret = false;
fprintf(stdout, "**Unknown**\n");
} else {
fprintf(stdout, "%s\n", value((*it)).latin1());
@@ -178,7 +178,7 @@ TQMakeProperty::exec()
TQString var = (*it);
it++;
if(it == Option::prop::properties.end()) {
- ret = FALSE;
+ ret = false;
break;
}
if(!var.startsWith("."))
diff --git a/qmake/property.h b/qmake/property.h
index edad8af28..29d48323f 100644
--- a/qmake/property.h
+++ b/qmake/property.h
@@ -46,7 +46,7 @@ class TQSettings;
class TQMakeProperty
{
TQSettings *sett;
- TQString keyBase(bool =TRUE) const;
+ TQString keyBase(bool =true) const;
bool initSettings();
TQString value(TQString, bool just_check);
public:
@@ -54,7 +54,7 @@ public:
~TQMakeProperty();
bool hasValue(TQString);
- TQString value(TQString v) { return value(v, FALSE); }
+ TQString value(TQString v) { return value(v, false); }
void setValue(TQString, const TQString &);
bool exec();