summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/dialogs/tqcolordialog.cpp92
-rw-r--r--src/dialogs/tqcolordialog.h4
-rw-r--r--src/dialogs/tqdialog.cpp74
-rw-r--r--src/dialogs/tqdialog.h4
-rw-r--r--src/dialogs/tqerrormessage.cpp8
-rw-r--r--src/dialogs/tqfiledialog.cpp606
-rw-r--r--src/dialogs/tqfiledialog.h18
-rw-r--r--src/dialogs/tqfontdialog.cpp62
-rw-r--r--src/dialogs/tqfontdialog.h2
-rw-r--r--src/dialogs/tqinputdialog.cpp48
-rw-r--r--src/dialogs/tqinputdialog.h4
-rw-r--r--src/dialogs/tqmessagebox.cpp24
-rw-r--r--src/dialogs/tqmessagebox.h2
-rw-r--r--src/dialogs/tqprintdialog.cpp96
-rw-r--r--src/dialogs/tqprintdialog.h2
-rw-r--r--src/dialogs/tqprogressdialog.cpp50
-rw-r--r--src/dialogs/tqprogressdialog.h4
-rw-r--r--src/dialogs/tqtabdialog.cpp40
-rw-r--r--src/dialogs/tqtabdialog.h2
-rw-r--r--src/dialogs/tqwizard.cpp48
-rw-r--r--src/dialogs/tqwizard.h2
-rw-r--r--src/network/tqdns.cpp144
-rw-r--r--src/network/tqftp.cpp178
-rw-r--r--src/network/tqhostaddress.cpp68
-rw-r--r--src/network/tqhttp.cpp126
-rw-r--r--src/network/tqserversocket.cpp8
-rw-r--r--src/network/tqsocket.cpp98
-rw-r--r--src/network/tqsocket.h2
-rw-r--r--src/network/tqsocketdevice.cpp22
-rw-r--r--src/network/tqsocketdevice_unix.cpp80
-rw-r--r--src/opengl/tqgl.cpp174
-rw-r--r--src/opengl/tqgl.h12
-rw-r--r--src/opengl/tqgl_x11.cpp126
-rw-r--r--src/opengl/tqgl_x11_p.h4
-rw-r--r--src/opengl/tqglcolormap.cpp2
35 files changed, 1118 insertions, 1118 deletions
diff --git a/src/dialogs/tqcolordialog.cpp b/src/dialogs/tqcolordialog.cpp
index 43e77866f..a80b63bc1 100644
--- a/src/dialogs/tqcolordialog.cpp
+++ b/src/dialogs/tqcolordialog.cpp
@@ -78,7 +78,7 @@ class TQWellArray : public TQGridView
TQ_PROPERTY( int selectedRow READ selectedRow )
public:
- TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = FALSE );
+ TQWellArray( TQWidget* parent=0, const char* name=0, bool popup = false );
~TQWellArray() {}
TQString cellContent( int row, int col ) const;
@@ -175,7 +175,7 @@ TQWellArray::TQWellArray( TQWidget *parent, const char * name, bool popup )
selRow = -1;
if ( smallStyle )
- setMouseTracking( TRUE );
+ setMouseTracking( true );
}
@@ -411,13 +411,13 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e )
if( curRow > 0 )
setCurrent( curRow - 1, curCol);
else if ( smallStyle )
- focusNextPrevChild( FALSE );
+ focusNextPrevChild( false );
break;
case Key_Down:
if( curRow < numRows()-1 )
setCurrent( curRow + 1, curCol);
else if ( smallStyle )
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
break;
case Key_Space:
case Key_Return:
@@ -433,17 +433,17 @@ void TQWellArray::keyPressEvent( TQKeyEvent* e )
//////////// TQWellArray END
-static bool initrgb = FALSE;
+static bool initrgb = false;
static TQRgb stdrgb[6*8];
static TQRgb cusrgb[2*8];
-static bool customSet = FALSE;
+static bool customSet = false;
static void initRGB()
{
if ( initrgb )
return;
- initrgb = TRUE;
+ initrgb = true;
int i = 0;
for ( int g = 0; g < 4; g++ )
for ( int r = 0; r < 4; r++ )
@@ -490,7 +490,7 @@ void TQColorDialog::setCustomColor( int i, TQRgb c )
#endif
return;
}
- customSet = TRUE;
+ customSet = true;
cusrgb[i] = c;
}
@@ -521,7 +521,7 @@ class TQColorWell : public TQWellArray
{
public:
TQColorWell( TQWidget *parent, int r, int c, TQRgb *vals )
- :TQWellArray( parent, "" ), values( vals ), mousePressed( FALSE ), oldCurrent( -1, -1 )
+ :TQWellArray( parent, "" ), values( vals ), mousePressed( false ), oldCurrent( -1, -1 )
{ setNumRows(r), setNumCols(c); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); }
protected:
@@ -554,7 +554,7 @@ void TQColorWell::mousePressEvent( TQMouseEvent *e )
{
oldCurrent = TQPoint( selectedRow(), selectedColumn() );
TQWellArray::mousePressEvent( e );
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -575,7 +575,7 @@ void TQColorWell::mouseMoveEvent( TQMouseEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
#endif
@@ -613,7 +613,7 @@ void TQColorWell::dropEvent( TQDropEvent *e )
TQColor col;
TQColorDrag::decode( e, col );
values[ i ] = col.rgb();
- repaintContents( FALSE );
+ repaintContents( false );
e->accept();
} else {
e->ignore();
@@ -627,7 +627,7 @@ void TQColorWell::mouseReleaseEvent( TQMouseEvent *e )
if ( !mousePressed )
return;
TQWellArray::mouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
}
class TQColorPicker : public TQFrame
@@ -738,7 +738,7 @@ void TQColorLuminancePicker::setVal( int v )
return;
val = TQMAX( 0, TQMIN(v,255));
delete pix; pix=0;
- repaint( FALSE ); //###
+ repaint( false ); //###
emit newHsv( hue, sat, val );
}
@@ -773,7 +773,7 @@ void TQColorLuminancePicker::paintEvent( TQPaintEvent * )
TQPainter p(this);
p.drawPixmap( 1, coff, *pix );
const TQColorGroup &g = colorGroup();
- qDrawShadePanel( &p, r, g, TRUE );
+ qDrawShadePanel( &p, r, g, true );
p.setPen( g.foreground() );
p.setBrush( g.foreground() );
TQPointArray a;
@@ -789,7 +789,7 @@ void TQColorLuminancePicker::setCol( int h, int s , int v )
hue = h;
sat = s;
delete pix; pix=0;
- repaint( FALSE );//####
+ repaint( false );//####
}
TQPoint TQColorPicker::colPt()
@@ -842,7 +842,7 @@ void TQColorPicker::setCol( int h, int s )
r = r.unite( TQRect( colPt(), TQSize(20,20) ) );
r.moveBy( contentsRect().x()-9, contentsRect().y()-9 );
// update( r );
- repaint( r, FALSE );
+ repaint( r, false );
}
void TQColorPicker::mouseMoveEvent( TQMouseEvent *m )
@@ -918,7 +918,7 @@ public:
TQString s;
s.setNum(i);
bool block = signalsBlocked();
- blockSignals(TRUE);
+ blockSignals(true);
setText( s );
blockSignals(block);
}
@@ -974,8 +974,8 @@ public:
TQColorShowLabel( TQWidget *parent ) : TQFrame( parent, "qt_colorshow_lbl" ) {
setFrameStyle( TQFrame::Panel|TQFrame::Sunken );
setBackgroundMode( PaletteBackground );
- setAcceptDrops( TRUE );
- mousePressed = FALSE;
+ setAcceptDrops( true );
+ mousePressed = false;
}
void setColor( TQColor c ) { col = c; }
@@ -1018,7 +1018,7 @@ void TQColorShower::showAlpha( bool b )
void TQColorShowLabel::mousePressEvent( TQMouseEvent *e )
{
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -1035,7 +1035,7 @@ void TQColorShowLabel::mouseMoveEvent( TQMouseEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
#endif
@@ -1058,7 +1058,7 @@ void TQColorShowLabel::dropEvent( TQDropEvent *e )
{
if ( TQColorDrag::canDecode( e ) ) {
TQColorDrag::decode( e, col );
- repaint( FALSE );
+ repaint( false );
emit colorDropped( col.rgb() );
e->accept();
} else {
@@ -1071,7 +1071,7 @@ void TQColorShowLabel::mouseReleaseEvent( TQMouseEvent * )
{
if ( !mousePressed )
return;
- mousePressed = FALSE;
+ mousePressed = false;
}
TQColorShower::TQColorShower( TQWidget *parent, const char *name )
@@ -1154,12 +1154,12 @@ TQColorShower::TQColorShower( TQWidget *parent, const char *name )
void TQColorShower::showCurrentColor()
{
lab->setColor( currentColor() );
- lab->repaint(FALSE); //###
+ lab->repaint(false); //###
}
void TQColorShower::rgbEd()
{
- rgbOriginal = TRUE;
+ rgbOriginal = true;
if ( alphaEd->isVisible() )
curCol = tqRgba( rEd->val(), gEd->val(), bEd->val(), currentAlpha() );
else
@@ -1177,7 +1177,7 @@ void TQColorShower::rgbEd()
void TQColorShower::hsvEd()
{
- rgbOriginal = FALSE;
+ rgbOriginal = false;
hue = hEd->val();
sat = sEd->val();
val = vEd->val();
@@ -1194,7 +1194,7 @@ void TQColorShower::hsvEd()
void TQColorShower::setRgb( TQRgb rgb )
{
- rgbOriginal = TRUE;
+ rgbOriginal = true;
curCol = rgb;
rgb2hsv( currentColor(), hue, sat, val );
@@ -1212,7 +1212,7 @@ void TQColorShower::setRgb( TQRgb rgb )
void TQColorShower::setHsv( int h, int s, int v )
{
- rgbOriginal = FALSE;
+ rgbOriginal = false;
hue = h; val = v; sat = s; //Range check###
curCol = TQColor( hue, sat, val, TQColor::Hsv ).rgb();
@@ -1300,11 +1300,11 @@ void TQColorDialogPrivate::newStandard( int r, int c )
TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQObject(dialog)
{
- compact = FALSE;
+ compact = false;
// small displays (e.g. PDAs cannot fit the full color dialog,
// so just use the color picker.
if ( tqApp->desktop()->width() < 480 || tqApp->desktop()->height() < 350 )
- compact = TRUE;
+ compact = true;
nextCust = 0;
const int lumSpace = 3;
@@ -1335,7 +1335,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
custom = new TQColorWell( dialog, 2, 8, cusrgb );
custom->setCellWidth( 28 );
custom->setCellHeight( 24 );
- custom->setAcceptDrops( TRUE );
+ custom->setAcceptDrops( true );
connect( custom, TQ_SIGNAL(selected(int,int)), TQ_SLOT(newCustom(int,int)));
lab = new TQLabel( custom, TQColorDialog::tr( "&Custom colors") , dialog, "qt_custcolors_lbl" );
@@ -1345,7 +1345,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQPushButton *custbut =
new TQPushButton( TQColorDialog::tr("&Define Custom Colors >>"),
dialog, "qt_def_custcolors_lbl" );
- custbut->setEnabled( FALSE );
+ custbut->setEnabled( false );
leftLay->addWidget( custbut );
} else {
// better color picker size for small displays
@@ -1390,7 +1390,7 @@ TQColorDialogPrivate::TQColorDialogPrivate( TQColorDialog *dialog ) :
TQPushButton *ok, *cancel;
ok = new TQPushButton( TQColorDialog::tr("OK"), dialog, "qt_ok_btn" );
connect( ok, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(accept()) );
- ok->setDefault(TRUE);
+ ok->setDefault(true);
cancel = new TQPushButton( TQColorDialog::tr("Cancel"), dialog, "qt_cancel_btn" );
connect( cancel, TQ_SIGNAL(clicked()), dialog, TQ_SLOT(reject()) );
buttons->addWidget( ok );
@@ -1410,7 +1410,7 @@ void TQColorDialogPrivate::addCustom()
{
cusrgb[nextCust] = cs->currentColor();
if (custom)
- custom->repaintContents( FALSE );
+ custom->repaintContents( false );
nextCust = (nextCust+1) % 16;
}
@@ -1446,7 +1446,7 @@ void TQColorDialogPrivate::addCustom()
/*!
Constructs a default color dialog with parent \a parent and called
- \a name. If \a modal is TRUE the dialog will be modal. Use
+ \a name. If \a modal is true the dialog will be modal. Use
setColor() to set an initial value.
\sa getColor()
@@ -1456,7 +1456,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) :
TQDialog(parent, name, modal, ( WType_Dialog | WStyle_Customize | WStyle_Title |
WStyle_DialogBorder | WStyle_SysMenu ) )
{
- setSizeGripEnabled( FALSE );
+ setSizeGripEnabled( false );
d = new TQColorDialogPrivate( this );
#ifndef TQT_NO_SETTINGS
@@ -1464,7 +1464,7 @@ TQColorDialog::TQColorDialog(TQWidget* parent, const char* name, bool modal) :
TQSettings settings;
settings.insertSearchPath( TQSettings::Windows, "/Trolltech" );
for ( int i = 0; i < 2*8; ++i ) {
- bool ok = FALSE;
+ bool ok = false;
TQRgb rgb = (TQRgb)settings.readNumEntry( "/TQt/customColors/" + TQString::number( i ), 0, &ok );
if ( ok )
cusrgb[i] = rgb;
@@ -1493,7 +1493,7 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent,
#endif
int allocContext = TQColor::enterAllocContext();
- TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal
+ TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( TQColorDialog::tr( "Select color" ) );
#endif
@@ -1516,8 +1516,8 @@ TQColor TQColorDialog::getColor( const TQColor& initial, TQWidget *parent,
initially set to \a initial. The dialog is a child of \a parent
and called \a name.
- If \a ok is non-null, \e *\a ok is set to TRUE if the user clicked
- OK, and to FALSE if the user clicked Cancel.
+ If \a ok is non-null, \e *\a ok is set to true if the user clicked
+ OK, and to false if the user clicked Cancel.
If the user clicks Cancel, the \a initial value is returned.
*/
@@ -1537,7 +1537,7 @@ TQRgb TQColorDialog::getRgba( TQRgb initial, bool *ok,
#endif
int allocContext = TQColor::enterAllocContext();
- TQColorDialog *dlg = new TQColorDialog( parent, name, TRUE ); //modal
+ TQColorDialog *dlg = new TQColorDialog( parent, name, true ); //modal
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1616,7 +1616,7 @@ void TQColorDialog::setColor( const TQColor& c )
void TQColorDialog::setSelectedAlpha( int a )
{
- d->showAlpha( TRUE );
+ d->showAlpha( true );
d->setCurrentAlpha( a );
}
@@ -1646,7 +1646,7 @@ bool TQColorDialog::selectColor( const TQColor& col )
d->standard->setCurrent( i, j );
d->standard->setSelected( i, j );
d->standard->setFocus();
- return TRUE;
+ return true;
}
}
}
@@ -1660,12 +1660,12 @@ bool TQColorDialog::selectColor( const TQColor& col )
d->custom->setCurrent( i, j );
d->custom->setSelected( i, j );
d->custom->setFocus();
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
#include "tqcolordialog.moc"
diff --git a/src/dialogs/tqcolordialog.h b/src/dialogs/tqcolordialog.h
index 580f82ca0..93b6daf19 100644
--- a/src/dialogs/tqcolordialog.h
+++ b/src/dialogs/tqcolordialog.h
@@ -65,7 +65,7 @@ public:
private:
~TQColorDialog();
- TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE );
+ TQColorDialog( TQWidget* parent=0, const char* name=0, bool modal=false );
void setColor( const TQColor& );
TQColor color() const;
@@ -75,7 +75,7 @@ private:
void setSelectedAlpha( int );
int selectedAlpha() const;
- void showCustom( bool=TRUE );
+ void showCustom( bool=true );
private: // Disabled copy constructor and operator=
TQColorDialogPrivate *d;
diff --git a/src/dialogs/tqdialog.cpp b/src/dialogs/tqdialog.cpp
index 277a1b4ca..efeb03abc 100644
--- a/src/dialogs/tqdialog.cpp
+++ b/src/dialogs/tqdialog.cpp
@@ -99,12 +99,12 @@
and return the appropriate value. Alternatively you can connect to
the done() slot, passing it \c Accepted or \c Rejected.
- An alternative is to call setModal(TRUE), then show(). Unlike
+ An alternative is to call setModal(true), then show(). Unlike
exec(), show() returns control to the caller immediately. Calling
- setModal(TRUE) is especially useful for progress dialogs, where
+ setModal(true) is especially useful for progress dialogs, where
the user must have the ability to interact with the dialog, e.g.
to cancel a long running operation. If you use show() and
- setModal(TRUE) together you must call
+ setModal(true) together you must call
TQApplication::processEvents() periodically during processing to
enable the user to interact with the dialog. (See \l
TQProgressDialog.)
@@ -214,7 +214,7 @@ class TQDialogPrivate : public TQt
public:
TQDialogPrivate()
- : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(FALSE)
+ : mainDef(0), orientation(Horizontal),extension(0), doShowExtension(false)
#ifndef TQT_NO_SIZEGRIP
,resizer(0)
#endif
@@ -288,18 +288,18 @@ void TQDialog::setDefault( TQPushButton *pushButton )
Q_ASSERT(list);
TQObjectListIt it( *list );
TQPushButton *pb;
- bool hasMain = FALSE;
+ bool hasMain = false;
while ( (pb = (TQPushButton*)it.current()) ) {
++it;
if ( pb->topLevelWidget() != this )
continue;
if ( pb == d->mainDef )
- hasMain = TRUE;
+ hasMain = true;
if ( pb != pushButton )
- pb->setDefault( FALSE );
+ pb->setDefault( false );
}
if (!pushButton && hasMain)
- d->mainDef->setDefault( TRUE );
+ d->mainDef->setDefault( true );
if (!hasMain)
d->mainDef = pushButton;
delete list;
@@ -332,7 +332,7 @@ void TQDialog::hideDefault()
TQPushButton *pb;
while ( (pb = (TQPushButton*)it.current()) ) {
++it;
- pb->setDefault( FALSE );
+ pb->setDefault( false );
}
delete list;
#endif
@@ -351,9 +351,9 @@ void TQDialog::hideSpecial()
// "OK" buttons are hidden, and (Ok) shown on titlebar
// "Cancel" buttons are hidden, and (X) shown on titlebar
// "Help" buttons are hidden, and (?) shown on titlebar
- bool showOK = FALSE,
- showX = FALSE,
- showQ = FALSE;
+ bool showOK = false,
+ showX = false,
+ showQ = false;
TQObjectList *list = queryList( "TQPushButton" );
TQObjectListIt it( *list );
TQPushButton *pb;
@@ -361,15 +361,15 @@ void TQDialog::hideSpecial()
if ( !showOK &&
pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Ok] ) ) {
pb->hide();
- showOK = TRUE;
+ showOK = true;
} else if ( !showX &&
pb->text() == tqApp->translate( "TQMessageBox", mb_texts[TQMessageBox::Cancel] ) ) {
pb->hide();
- showX = TRUE;
+ showX = true;
} else if ( !showQ &&
pb->text() == tqApp->tr("Help") ) {
pb->hide();
- showQ = TRUE;
+ showQ = true;
}
++it;
}
@@ -431,7 +431,7 @@ int TQDialog::exec()
show();
- in_loop = TRUE;
+ in_loop = true;
tqApp->enter_loop();
if ( !wasShowModal )
@@ -530,14 +530,14 @@ bool TQDialog::eventFilter( TQObject *o, TQEvent *e )
void TQDialog::contextMenuEvent( TQContextMenuEvent *e )
{
#if !defined(TQT_NO_WHATSTHIS) && !defined(TQT_NO_POPUPMENU)
- TQWidget* w = childAt( e->pos(), TRUE );
+ TQWidget* w = childAt( e->pos(), true );
if ( !w )
return;
TQString s;
while ( s.isEmpty() && w ) {
- s = TQWhatsThis::textFor( w, e->pos(), FALSE );
+ s = TQWhatsThis::textFor( w, e->pos(), false );
if ( s.isEmpty() )
- w = w->parentWidget(TRUE);
+ w = w->parentWidget(true);
}
if ( !s.isEmpty() ) {
TQPopupMenu p(0,"qt_whats_this_menu");
@@ -595,7 +595,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e )
// call ours, since c++ blocks us from calling the one
// belonging to focusWidget().
TQFocusEvent::setReason(TQFocusEvent::Backtab);
- focusNextPrevChild( FALSE );
+ focusNextPrevChild( false );
TQFocusEvent::resetReason();
break;
case Key_Down:
@@ -607,7 +607,7 @@ void TQDialog::keyPressEvent( TQKeyEvent *e )
break;
}
TQFocusEvent::setReason(TQFocusEvent::Tab);
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
TQFocusEvent::resetReason();
break;
default:
@@ -701,7 +701,7 @@ void TQDialog::show()
adjustSize();
if( !qt_net_supports( qt_net_wm_full_placement )) {
if ( has_relpos && !did_move ) {
- adjustPositionInternal( parentWidget(), TRUE );
+ adjustPositionInternal( parentWidget(), true );
} else if ( !did_move ) {
adjustPositionInternal( parentWidget() );
}
@@ -750,7 +750,7 @@ void TQDialog::show()
if ( !d->mainDef && isTopLevel() ) {
if ( !fw || fw->focusPolicy() == NoFocus ) {
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
fw = focusWidget();
}
if ( fw ) {
@@ -761,7 +761,7 @@ void TQDialog::show()
do {
TQPushButton *pb = ::tqt_cast<TQPushButton*>(candidate);
if ( pb && pb->autoDefault() ) {
- pb->setDefault( TRUE );
+ pb->setDefault( true );
break;
}
candidate = fd->next();
@@ -899,7 +899,7 @@ void TQDialog::hide()
// Reimplemented to exit a modal when the dialog is hidden.
TQWidget::hide();
if ( in_loop ) {
- in_loop = FALSE;
+ in_loop = false;
tqApp->exit_loop();
}
}
@@ -913,7 +913,7 @@ void TQDialog::hide()
void TQDialog::move( int x, int y )
{
- did_move = TRUE;
+ did_move = true;
TQWidget::move( x, y );
}
@@ -921,7 +921,7 @@ void TQDialog::move( int x, int y )
void TQDialog::move( const TQPoint &p )
{
- did_move = TRUE;
+ did_move = true;
TQWidget::move( p );
}
@@ -929,7 +929,7 @@ void TQDialog::move( const TQPoint &p )
void TQDialog::resize( int w, int h )
{
- did_resize = TRUE;
+ did_resize = true;
TQWidget::resize( w, h );
}
@@ -937,7 +937,7 @@ void TQDialog::resize( int w, int h )
void TQDialog::resize( const TQSize &s )
{
- did_resize = TRUE;
+ did_resize = true;
TQWidget::resize( s );
}
@@ -945,8 +945,8 @@ void TQDialog::resize( const TQSize &s )
void TQDialog::setGeometry( int x, int y, int w, int h )
{
- did_move = TRUE;
- did_resize = TRUE;
+ did_move = true;
+ did_resize = true;
TQWidget::setGeometry( x, y, w, h );
}
@@ -954,8 +954,8 @@ void TQDialog::setGeometry( int x, int y, int w, int h )
void TQDialog::setGeometry( const TQRect &r )
{
- did_move = TRUE;
- did_resize = TRUE;
+ did_move = true;
+ did_resize = true;
TQWidget::setGeometry( r );
}
@@ -1019,7 +1019,7 @@ TQWidget* TQDialog::extension() const
/*!
- If \a showIt is TRUE, the dialog's extension is shown; otherwise the
+ If \a showIt is true, the dialog's extension is shown; otherwise the
extension is hidden.
This slot is usually connected to the \l TQButton::toggled() signal
@@ -1045,7 +1045,7 @@ void TQDialog::showExtension( bool showIt )
d->max = maximumSize();
#ifndef TQT_NO_LAYOUT
if ( layout() )
- layout()->setEnabled( FALSE );
+ layout()->setEnabled( false );
#endif
TQSize s( d->extension->sizeHint()
.expandedTo( d->extension->minimumSize() )
@@ -1068,7 +1068,7 @@ void TQDialog::showExtension( bool showIt )
resize( d->size );
#ifndef TQT_NO_LAYOUT
if ( layout() )
- layout()->setEnabled( TRUE );
+ layout()->setEnabled( true );
#endif
}
}
@@ -1135,7 +1135,7 @@ bool TQDialog::isSizeGripEnabled() const
#ifndef TQT_NO_SIZEGRIP
return !!d->resizer;
#else
- return FALSE;
+ return false;
#endif
}
diff --git a/src/dialogs/tqdialog.h b/src/dialogs/tqdialog.h
index e1d82c179..786be4cf5 100644
--- a/src/dialogs/tqdialog.h
+++ b/src/dialogs/tqdialog.h
@@ -60,7 +60,7 @@ friend class TQPushButton;
TQ_PROPERTY( bool modal READ isModal WRITE setModal )
public:
- Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ Q_EXPLICIT TQDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQDialog();
@@ -127,7 +127,7 @@ private:
uint has_relpos : 1;
uint did_resize : 1;
uint in_loop: 1;
- void adjustPositionInternal( TQWidget*, bool useRelPos = FALSE );
+ void adjustPositionInternal( TQWidget*, bool useRelPos = false );
TQDialogPrivate* d;
private: // Disabled copy constructor and operator=
diff --git a/src/dialogs/tqerrormessage.cpp b/src/dialogs/tqerrormessage.cpp
index 12013b0f6..e8431a345 100644
--- a/src/dialogs/tqerrormessage.cpp
+++ b/src/dialogs/tqerrormessage.cpp
@@ -117,7 +117,7 @@ static void deleteStaticcTQErrorMessage() // post-routine
}
}
-static bool metFatal = FALSE;
+static bool metFatal = false;
void jump( TQtMsgType t, const char * m )
{
@@ -169,7 +169,7 @@ TQErrorMessage::TQErrorMessage( TQWidget * parent, const char * name )
errors = new TQErrorMessageTextView( this, "errors" );
grid->addWidget( errors, 0, 1 );
again = new TQCheckBox( tr( "&Show this message again" ), this, "again" );
- again->setChecked( TRUE );
+ again->setChecked( true );
grid->addWidget( again, 1, 1, AlignTop + AlignAuto );
ok = new TQPushButton( tr( "&OK" ), this, "ok" );
connect( ok, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept()) );
@@ -244,10 +244,10 @@ bool TQErrorMessage::nextPending()
pending->remove( pending->begin() );
if ( !p.isEmpty() && !doNotShow->find( p ) ) {
errors->setText( p );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
diff --git a/src/dialogs/tqfiledialog.cpp b/src/dialogs/tqfiledialog.cpp
index de4754ec4..36cf60691 100644
--- a/src/dialogs/tqfiledialog.cpp
+++ b/src/dialogs/tqfiledialog.cpp
@@ -473,10 +473,10 @@ static int lastWidth = 0;
static int lastHeight = 0;
static TQString * workingDirectory = 0;
-static bool bShowHiddenFiles = FALSE;
+static bool bShowHiddenFiles = false;
static int sortFilesBy = (int)TQDir::Name;
-static bool sortAscending = TRUE;
-static bool detailViewMode = FALSE;
+static bool sortAscending = true;
+static bool detailViewMode = false;
static TQCleanupHandler<TQPixmap> qfd_cleanup_pixmap;
static TQCleanupHandler<TQString> qfd_cleanup_string;
@@ -527,7 +527,7 @@ static PtrExtractIconEx ptrExtractIconEx = 0;
static void resolveLibs()
{
#ifndef Q_OS_TEMP
- static bool triedResolve = FALSE;
+ static bool triedResolve = false;
if ( !triedResolve ) {
#ifdef TQT_THREAD_SUPPORT
@@ -542,10 +542,10 @@ static void resolveLibs()
return;
}
#endif
- triedResolve = TRUE;
+ triedResolve = true;
if ( qt_winunicode ) {
TQLibrary lib("shell32");
- lib.setAutoUnload( FALSE );
+ lib.setAutoUnload( false );
ptrExtractIconEx = (PtrExtractIconEx) lib.resolve( "ExtractIconExW" );
}
}
@@ -618,9 +618,9 @@ static void makeVariables() {
TQBitmap m( fifteenTransparentPixels->width(), 1 );
m.fill( TQt::color0 );
fifteenTransparentPixels->setMask( m );
- bShowHiddenFiles = FALSE;
+ bShowHiddenFiles = false;
sortFilesBy = (int)TQDir::Name;
- detailViewMode = FALSE;
+ detailViewMode = false;
#if defined(TQ_WS_WIN)
if ( !fileIconProvider )
fileIconProvider = new TQWindowsIconProvider( tqApp );
@@ -640,7 +640,7 @@ class TQRenameEdit : public TQLineEdit
public:
TQRenameEdit( TQWidget *parent )
- : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE)
+ : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(false)
{
connect( this, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()) );
}
@@ -671,7 +671,7 @@ private:
void clear();
void show();
- void startRename( bool check = TRUE );
+ void startRename( bool check = true );
void viewportMousePressEvent( TQMouseEvent *e );
void viewportMouseReleaseEvent( TQMouseEvent *e );
void viewportMouseDoubleClickEvent( TQMouseEvent *e );
@@ -720,8 +720,8 @@ public:
TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *d );
void clear();
- void startRename( bool check = TRUE );
- void setSorting( int column, bool increasing = TRUE );
+ void startRename( bool check = true );
+ void setSorting( int column, bool increasing = true );
TQRenameEdit *lined;
bool renaming;
@@ -806,7 +806,7 @@ TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *parent )
void TQFDProgressAnimation::start()
{
- timer->start( 150, FALSE );
+ timer->start( 150, false );
}
void TQFDProgressAnimation::next()
@@ -870,7 +870,7 @@ private:
};
TQFDProgressDialog::TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps )
- : TQDialog( parent, "", TRUE )
+ : TQDialog( parent, "", true )
{
#ifndef TQT_NO_WIDGET_TOPEXTRA
setCaption( TQFileDialog::tr( "Copy or Move a File" ) );
@@ -962,15 +962,15 @@ public:
struct File: public TQListViewItem {
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListViewItem * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after )
- : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); if ( !nextSibling() ) dlgp->last = this; }
~File();
@@ -997,7 +997,7 @@ public:
class UrlInfoList : public TQPtrList<TQUrlInfo> {
public:
- UrlInfoList() { setAutoDelete( TRUE ); }
+ UrlInfoList() { setAutoDelete( true ); }
int compareItems( TQPtrCollection::Item n1, TQPtrCollection::Item n2 ) {
if ( !n1 || !n2 )
return 0;
@@ -1124,7 +1124,7 @@ public:
return ui.isValid();
}
}
- return TRUE;
+ return true;
}
#ifndef Q_NO_CURSOR
@@ -1162,12 +1162,12 @@ void TQRenameEdit::focusOutEvent( TQFocusEvent * )
if ( !doRenameAlreadyEmitted )
emit doRename();
else
- doRenameAlreadyEmitted = FALSE;
+ doRenameAlreadyEmitted = false;
}
void TQRenameEdit::slotReturnPressed()
{
- doRenameAlreadyEmitted = TRUE;
+ doRenameAlreadyEmitted = true;
emit doRename();
}
@@ -1179,8 +1179,8 @@ void TQRenameEdit::slotReturnPressed()
TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
: TQListBox( parent, "filelistbox" ), filedialog( dlg ),
- renaming( FALSE ), renameItem( 0 ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ renaming( false ), renameItem( 0 ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1200,7 +1200,7 @@ TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
this, TQ_SLOT( changeDirDuringDrag() ) );
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
dragItem = 0;
}
@@ -1255,7 +1255,7 @@ void TQFileListBox::keyPressEvent( TQKeyEvent *e )
void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
@@ -1265,12 +1265,12 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListBox::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
int i = currentItem();
- bool wasSelected = FALSE;
+ bool wasSelected = false;
if ( i != -1 )
wasSelected = item( i )->isSelected();
TQListBox::mousePressEvent( e );
@@ -1281,24 +1281,24 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
|| ( filedialog->mode() == TQFileDialog::Directory ) || ( filedialog->mode() == TQFileDialog::DirectoryOnly );
if ( itemAt( e->pos() ) != item( i ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() != -1 &&
wasSelected && TQUrlInfo( filedialog->d->url, "." ).isWritable() && item( currentItem() )->text() != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = item( i );
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileListBox::viewportMouseReleaseEvent( TQMouseEvent *e )
{
dragItem = 0;
TQListBox::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
}
void TQFileListBox::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1334,7 +1334,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
} else
#endif
@@ -1462,15 +1462,15 @@ bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
TQListBoxItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text() );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileListBox::setCurrentDropItem( const TQPoint &pnt )
@@ -1516,7 +1516,7 @@ void TQFileListBox::startRename( bool check )
return;
int i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( item( i ) );
int bdr = item( i )->pixmap() ?
item( i )->pixmap()->width() : 16;
@@ -1530,10 +1530,10 @@ void TQFileListBox::startRename( bool check )
lined->setFocus();
lined->setText( item( i )->text() );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileListBox::clear()
@@ -1558,7 +1558,7 @@ void TQFileListBox::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
updateItem( currentItem() );
if ( lined->hasFocus() )
viewport()->setFocus();
@@ -1579,9 +1579,9 @@ void TQFileListBox::contentsMoved( int, int )
************************************************************************/
TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg )
- : TQListView( parent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ),
- filedialog( dlg ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( 0 ),
+ filedialog( dlg ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1595,7 +1595,7 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
this, TQ_SLOT (rename() ) );
connect( lined, TQ_SIGNAL( cancelRename() ),
this, TQ_SLOT( cancelRename() ) );
- header()->setMovingEnabled( FALSE );
+ header()->setMovingEnabled( false );
connect( renameTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doubleClickTimeout() ) );
connect( changeDirTimer, TQ_SIGNAL( timeout() ),
@@ -1607,9 +1607,9 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
sortcolumn = 0;
- ascending = TRUE;
+ ascending = true;
dragItem = 0;
}
@@ -1643,7 +1643,7 @@ void TQFileDialogTQFileListView::setSorting( int column, bool increasing )
void TQFileDialogTQFileListView::changeSortColumn2( int column )
{
int lcol = header()->mapToLogical( column );
- setSorting( lcol, sortcolumn == lcol ? !ascending : TRUE );
+ setSorting( lcol, sortcolumn == lcol ? !ascending : true );
}
void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
@@ -1688,7 +1688,7 @@ void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
cancelRename();
@@ -1697,7 +1697,7 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListView::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
@@ -1711,17 +1711,17 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( itemAt( e->pos() ) != i ||
e->x() + contentsX() > columnWidth( 0 ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() &&
TQUrlInfo( filedialog->d->url, "." ).isWritable() && currentItem()->text( 0 ) != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = currentItem();
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1733,7 +1733,7 @@ void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e
void TQFileDialogTQFileListView::viewportMouseReleaseEvent( TQMouseEvent *e )
{
TQListView::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
dragItem = 0;
}
@@ -1762,7 +1762,7 @@ void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
}
#endif
@@ -1881,15 +1881,15 @@ bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *sourc
TQListViewItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text( 0 ) );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt )
@@ -1939,7 +1939,7 @@ void TQFileDialogTQFileListView::startRename( bool check )
return;
TQListViewItem *i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( i );
int bdr = i->pixmap( 0 ) ?
@@ -1954,10 +1954,10 @@ void TQFileDialogTQFileListView::startRename( bool check )
lined->setFocus();
lined->setText( i->text( 0 ) );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileDialogTQFileListView::clear()
@@ -1982,7 +1982,7 @@ void TQFileDialogTQFileListView::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
if ( currentItem() )
currentItem()->repaint();
if ( lined->hasFocus() )
@@ -2203,7 +2203,7 @@ static TQStringList makeFiltersList( const TQString &filter )
the TQFileDialog.
\code
- TQFileDialog* fd = new TQFileDialog( this, "file dialog", TRUE );
+ TQFileDialog* fd = new TQFileDialog( this, "file dialog", true );
fd->setMode( TQFileDialog::AnyFile );
\endcode
@@ -2302,14 +2302,14 @@ static TQStringList makeFiltersList( const TQString &filter )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
\endcode
The first line creates an instance of our preview widget. We then
- create our file dialog and call setContentsPreviewEnabled( TRUE ),
+ create our file dialog and call setContentsPreviewEnabled( true ),
this tell the file dialog to preview the contents of the currently
selected file. We then call setContentsPreview() -- note that we pass
the same preview widget twice. Finally, before showing the file
@@ -2387,7 +2387,7 @@ extern const char qt_file_dialog_filter_reg_exp[] =
/*!
Constructs a file dialog called \a name, with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
*/
@@ -2399,7 +2399,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
init();
d->mode = ExistingFile;
d->types->insertItem( tr( "All Files (*)" ) );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
emit dirEntered( d->url.dirPath() );
rereadDir();
}
@@ -2407,7 +2407,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
/*!
Constructs a file dialog called \a name with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
If \a dirName is specified then it will be used as the dialog's
@@ -2435,7 +2435,7 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter,
if ( !filter.isEmpty() ) {
setFilters( filter );
if ( !dirName.isEmpty() ) {
- int dotpos = dirName.find( TQChar('.'), 0, FALSE );
+ int dotpos = dirName.find( TQChar('.'), 0, false );
if ( dotpos != -1 ) {
for ( int b=0 ; b<d->types->count() ; b++ ) {
if ( d->types->text(b).contains( dirName.right( dirName.length() - dotpos ) ) ) {
@@ -2463,23 +2463,23 @@ extern int qt_ntfs_permission_lookup;
void TQFileDialog::init()
{
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
d = new TQFileDialogPrivate();
d->mode = AnyFile;
d->last = 0;
d->lastEFSelected = 0;
d->moreFiles = 0;
- d->infoPreview = FALSE;
- d->contentsPreview = FALSE;
- d->hadDotDot = FALSE;
- d->ignoreNextKeyPress = FALSE;
+ d->infoPreview = false;
+ d->contentsPreview = false;
+ d->hadDotDot = false;
+ d->ignoreNextKeyPress = false;
d->progressDia = 0;
- d->checkForFilter = FALSE;
- d->ignoreNextRefresh = FALSE;
- d->ignoreStop = FALSE;
- d->pendingItems.setAutoDelete( FALSE );
+ d->checkForFilter = false;
+ d->ignoreNextRefresh = false;
+ d->ignoreStop = false;
+ d->pendingItems.setAutoDelete( false );
d->mimeTypeTimer = new TQTimer( this );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
#if defined(TQ_WS_WIN)
d->oldPermissionLookup = qt_ntfs_permission_lookup;
#endif
@@ -2525,7 +2525,7 @@ void TQFileDialog::init()
files->addColumn( tr("Type") );
files->addColumn( tr("Date") );
files->addColumn( tr("Attributes") );
- files->header()->setStretchEnabled( TRUE, 0 );
+ files->header()->setStretchEnabled( true, 0 );
files->setMinimumSize( 50, 25 + 2*fm.lineSpacing() );
@@ -2545,7 +2545,7 @@ void TQFileDialog::init()
d->moreFiles = new TQFileListBox( d->stack, this );
d->moreFiles->setRowMode( TQListBox::FitToHeight );
- d->moreFiles->setVariableWidth( TRUE );
+ d->moreFiles->setVariableWidth( true );
connect( d->moreFiles, TQ_SIGNAL(selected(TQListBoxItem*)),
this, TQ_SLOT(selectDirectoryOrFile(TQListBoxItem*)) );
@@ -2560,14 +2560,14 @@ void TQFileDialog::init()
d->moreFiles->viewport()->installEventFilter( this );
okB = new TQPushButton( tr("&OK"), this, "OK" ); //### Or "Save (see other "OK")
- okB->setDefault( TRUE );
- okB->setEnabled( FALSE );
+ okB->setDefault( true );
+ okB->setEnabled( false );
connect( okB, TQ_SIGNAL(clicked()), this, TQ_SLOT(okClicked()) );
cancelB = new TQPushButton( tr("Cancel") , this, "Cancel" );
connect( cancelB, TQ_SIGNAL(clicked()), this, TQ_SLOT(cancelClicked()) );
- d->paths = new TQComboBox( TRUE, this, "directory history/editor" );
- d->paths->setDuplicatesEnabled( FALSE );
+ d->paths = new TQComboBox( true, this, "directory history/editor" );
+ d->paths->setDuplicatesEnabled( false );
d->paths->setInsertionPolicy( TQComboBox::NoInsertion );
const TQFileInfoList * rootDrives = TQDir::drives();
TQFileInfoListIterator it( *rootDrives );
@@ -2593,10 +2593,10 @@ void TQFileDialog::init()
( (TQLineEdit*)ol->first() )->installEventFilter( this );
delete ol;
- d->geometryDirty = TRUE;
- d->types = new TQComboBox( TRUE, this, "file types" );
- d->types->setDuplicatesEnabled( FALSE );
- d->types->setEditable( FALSE );
+ d->geometryDirty = true;
+ d->types = new TQComboBox( true, this, "file types" );
+ d->types->setDuplicatesEnabled( false );
+ d->types->setEditable( false );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
this, TQ_SLOT(setFilter(const TQString&)) );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
@@ -2607,7 +2607,7 @@ void TQFileDialog::init()
d->typeL = new TQLabel( d->types, tr("File &type:"), this, "qt_filetype_lbl" );
d->goBack = new TQToolButton( this, "go back" );
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
d->goBack->setFocusPolicy( TabFocus );
connect( d->goBack, TQ_SIGNAL( clicked() ), this, TQ_SLOT( goBack() ) );
#ifndef TQT_NO_TOOLTIP
@@ -2636,7 +2636,7 @@ void TQFileDialog::init()
d->modeButtons = new TQButtonGroup( 0, "invisible group" );
connect( d->modeButtons, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(modeButtonsDestroyed()) );
- d->modeButtons->setExclusive( TRUE );
+ d->modeButtons->setExclusive( true );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
d->stack, TQ_SLOT(raiseWidget(int)) );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
@@ -2648,7 +2648,7 @@ void TQFileDialog::init()
TQToolTip::add( d->mcView, tr( "List View" ) );
#endif
d->mcView->setIconSet( *multiColumnListViewIcon );
- d->mcView->setToggleButton( TRUE );
+ d->mcView->setToggleButton( true );
d->stack->addWidget( d->moreFiles, d->modeButtons->insert( d->mcView ) );
d->detailView = new TQToolButton( this, "list view" );
d->detailView->setFocusPolicy( TabFocus );
@@ -2656,7 +2656,7 @@ void TQFileDialog::init()
TQToolTip::add( d->detailView, tr( "Detail View" ) );
#endif
d->detailView->setIconSet( *detailViewIcon );
- d->detailView->setToggleButton( TRUE );
+ d->detailView->setToggleButton( true );
d->stack->addWidget( files, d->modeButtons->insert( d->detailView ) );
d->previewInfo = new TQToolButton( this, "preview info view" );
@@ -2665,7 +2665,7 @@ void TQFileDialog::init()
TQToolTip::add( d->previewInfo, tr( "Preview File Info" ) );
#endif
d->previewInfo->setIconSet( *previewInfoViewIcon );
- d->previewInfo->setToggleButton( TRUE );
+ d->previewInfo->setToggleButton( true );
d->modeButtons->insert( d->previewInfo );
d->previewContents = new TQToolButton( this, "preview info view" );
@@ -2675,20 +2675,20 @@ void TQFileDialog::init()
if ( !qstrcmp(style().className(), "TQWindowsStyle") )
#endif
{
- d->goBack->setAutoRaise( TRUE );
- d->cdToParent->setAutoRaise( TRUE );
- d->newFolder->setAutoRaise( TRUE );
- d->mcView->setAutoRaise( TRUE );
- d->detailView->setAutoRaise( TRUE );
- d->previewInfo->setAutoRaise( TRUE );
- d->previewContents->setAutoRaise( TRUE );
+ d->goBack->setAutoRaise( true );
+ d->cdToParent->setAutoRaise( true );
+ d->newFolder->setAutoRaise( true );
+ d->mcView->setAutoRaise( true );
+ d->detailView->setAutoRaise( true );
+ d->previewInfo->setAutoRaise( true );
+ d->previewContents->setAutoRaise( true );
}
d->previewContents->setFocusPolicy( TabFocus );
#ifndef TQT_NO_TOOLTIP
TQToolTip::add( d->previewContents, tr( "Preview File Contents" ) );
#endif
d->previewContents->setIconSet( *previewContentsViewIcon );
- d->previewContents->setToggleButton( TRUE );
+ d->previewContents->setToggleButton( true );
d->modeButtons->insert( d->previewContents );
connect( d->detailView, TQ_SIGNAL( clicked() ),
@@ -2701,18 +2701,18 @@ void TQFileDialog::init()
files, TQ_SLOT( cancelRename() ) );
d->stack->raiseWidget( d->moreFiles );
- d->mcView->setOn( TRUE );
+ d->mcView->setOn( true );
TQHBoxLayout *lay = new TQHBoxLayout( this );
lay->setMargin( 6 );
d->leftLayout = new TQHBoxLayout( lay, 5 );
d->topLevelLayout = new TQVBoxLayout( (TQWidget*)0, 5 );
lay->addLayout( d->topLevelLayout, 1 );
- d->extraWidgetsLayouts.setAutoDelete( FALSE );
- d->extraLabels.setAutoDelete( FALSE );
- d->extraWidgets.setAutoDelete( FALSE );
- d->extraButtons.setAutoDelete( FALSE );
- d->toolButtons.setAutoDelete( FALSE );
+ d->extraWidgetsLayouts.setAutoDelete( false );
+ d->extraLabels.setAutoDelete( false );
+ d->extraWidgets.setAutoDelete( false );
+ d->extraButtons.setAutoDelete( false );
+ d->toolButtons.setAutoDelete( false );
TQHBoxLayout * h;
@@ -2815,8 +2815,8 @@ void TQFileDialog::init()
if ( detailViewMode ) {
d->stack->raiseWidget( files );
- d->mcView->setOn( FALSE );
- d->detailView->setOn( TRUE );
+ d->mcView->setOn( false );
+ d->detailView->setOn( true );
}
d->preview->hide();
@@ -2851,9 +2851,9 @@ void TQFileDialog::fileNameEditReturnPressed()
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url,
TQFileDialogPrivate::encodeFileName(nameEdit->text() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
}
}
nameEdit->setText( TQString::null );
@@ -2913,12 +2913,12 @@ TQFileDialog::~TQFileDialog()
{
// since clear might call setContentsPos which would emit
// a signal and thus cause a recompute of sizes...
- files->blockSignals( TRUE );
- d->moreFiles->blockSignals( TRUE );
+ files->blockSignals( true );
+ d->moreFiles->blockSignals( true );
files->clear();
d->moreFiles->clear();
- d->moreFiles->blockSignals( FALSE );
- files->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
+ files->blockSignals( false );
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride )
@@ -3003,7 +3003,7 @@ void TQFileDialog::setSelectedFilter( const TQString& mask )
int n;
for ( n = 0; n < d->types->count(); n++ ) {
- if ( d->types->text( n ).contains( mask, FALSE ) ) {
+ if ( d->types->text( n ).contains( mask, false ) ) {
d->types->setCurrentItem( n );
TQString f = mask;
TQRegExp r( TQString::fromLatin1(qt_file_dialog_filter_reg_exp) );
@@ -3098,7 +3098,7 @@ void TQFileDialog::setSelection( const TQString & filename )
else
d->url = TQUrlOperator( filename );
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
bool isDirOk;
bool isDir = d->url.isDir( &isDirOk );
if ( !isDirOk )
@@ -3106,8 +3106,8 @@ void TQFileDialog::setSelection( const TQString & filename )
if ( !isDir ) {
TQUrlOperator u( d->url );
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, TRUE );
- d->ignoreNextRefresh = TRUE;
+ trySetSelection( false, u, true );
+ d->ignoreNextRefresh = true;
nameEdit->selectAll();
rereadDir();
emit dirEntered( d->url.dirPath() );
@@ -3118,12 +3118,12 @@ void TQFileDialog::setSelection( const TQString & filename )
p += "/";
d->url.setPath( p );
}
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
nameEdit->setText( TQString::fromLatin1("") );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3267,9 +3267,9 @@ void TQFileDialog::setDir( const TQDir &dir )
d->url = dir.canonicalPath();
d->url.setNameFilter( nf );
TQUrlInfo i( d->url, nameEdit->text() );
- d->checkForFilter = TRUE;
- trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), FALSE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), false );
+ d->checkForFilter = false;
rereadDir();
emit dirEntered( d->url.path() );
}
@@ -3285,7 +3285,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
d->oldUrl = d->url;
TQString nf = d->url.nameFilter();
- TQString operatorPath = url.toString( FALSE, FALSE );
+ TQString operatorPath = url.toString( false, false );
if ( TQUrl::isRelativeUrl( operatorPath ) ) {
d->url = TQUrl( d->url, operatorPath );
} else {
@@ -3293,21 +3293,21 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
}
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
if ( !d->url.isDir() ) {
TQUrlOperator u = d->url;
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, FALSE );
+ trySetSelection( false, u, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
TQString fn = u.fileName();
nameEdit->setText( fn );
} else {
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3315,7 +3315,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
\brief whether hidden files are shown in the file dialog
- The default is FALSE, i.e. don't show hidden files.
+ The default is false, i.e. don't show hidden files.
*/
void TQFileDialog::setShowHiddenFiles( bool s )
@@ -3347,7 +3347,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
d->pendingItems.clear();
@@ -3357,7 +3357,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
}
@@ -3406,7 +3406,7 @@ void TQFileDialog::rereadDir()
*/
extern bool tqt_resolve_symlinks; // defined in tqapplication.cpp
-bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
+bool TQ_EXPORT tqt_use_native_dialogs = true;
/*!
This is a convenience static function that returns an existing file
@@ -3445,7 +3445,7 @@ bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileNames(), getSaveFileName(), getExistingDirectory()
@@ -3507,10 +3507,10 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames(filter,
startWith.isEmpty() ? 0 : workingDirectory,
- parent, name, caption, selectedFilter, FALSE).first());
+ parent, name, caption, selectedFilter, false).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3576,7 +3576,7 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileName(), getOpenFileNames(), getExistingDirectory()
@@ -3635,7 +3635,7 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith,
caption, selectedFilter));
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3683,9 +3683,9 @@ void TQFileDialog::okClicked()
if ( fn.contains("*") ) {
addFilter( fn );
- nameEdit->blockSignals( TRUE );
+ nameEdit->blockSignals( true );
nameEdit->setText( TQString::fromLatin1("") );
- nameEdit->blockSignals( FALSE );
+ nameEdit->blockSignals( false );
return;
}
@@ -3714,7 +3714,7 @@ void TQFileDialog::okClicked()
if ( mode() == ExistingFiles ) {
if ( ! nameEdit->text().isEmpty() ) {
TQStringList sf = selectedFiles();
- bool isdir = FALSE;
+ bool isdir = false;
if ( sf.count() == 1 ) {
TQUrlOperator u( d->url, sf[0] );
bool ok;
@@ -3765,9 +3765,9 @@ void TQFileDialog::okClicked()
}
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(f.name() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
} else {
if ( !nameEdit->text().contains( "/" ) &&
!nameEdit->text().contains( "\\" )
@@ -3830,7 +3830,7 @@ void TQFileDialog::resizeEvent( TQResizeEvent * e )
bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool updatelined )
{
if ( !isDir && !u.path().isEmpty() && u.path().right( 1 ) == "/" )
- isDir = TRUE;
+ isDir = true;
if ( u.fileName().contains( "*") && d->checkForFilter ) {
TQString fn( u.fileName() );
if ( fn.contains( "*" ) ) {
@@ -3838,7 +3838,7 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
d->currentFileName = TQString::null;
d->url.setFileName( TQString::null );
nameEdit->setText( TQString::fromLatin1("") );
- return FALSE;
+ return false;
}
}
@@ -3873,9 +3873,9 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
}
if ( !d->currentFileName.isNull() || isDir ) {
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
} else if ( !isDirectoryMode( d->mode ) ) {
- okB->setEnabled( FALSE );
+ okB->setEnabled( false );
}
if ( d->currentFileName.length() && old != d->currentFileName )
@@ -3893,7 +3893,7 @@ void TQFileDialog::updateGeometries()
if ( !d || !d->geometryDirty )
return;
- d->geometryDirty = FALSE;
+ d->geometryDirty = false;
TQSize r, t;
@@ -3990,19 +3990,19 @@ void TQFileDialog::updateFileNameEdit( TQListViewItem * newItem )
if ( mode() == ExistingFiles ) {
detailViewSelectionChanged();
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
- TQFileInfo fi( u.toString( FALSE, FALSE ) );
+ TQFileInfo fi( u.toString( false, false ) );
if ( !fi.isDir() )
- emit fileHighlighted( u.toString( FALSE, FALSE ) );
+ emit fileHighlighted( u.toString( false, false ) );
} else if ( files->isSelected( newItem ) ) {
TQFileDialogPrivate::File * i = (TQFileDialogPrivate::File *)newItem;
if ( i && i->i && !i->i->isSelected() ) {
- d->moreFiles->blockSignals( TRUE );
- d->moreFiles->setSelected( i->i, TRUE );
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( true );
+ d->moreFiles->setSelected( i->i, true );
+ d->moreFiles->blockSignals( false );
}
// Encode the filename in case it had any special characters in it
TQString encFile = TQFileDialogPrivate::encodeFileName( newItem->text( 0 ) );
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), TRUE );
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), true );
}
}
@@ -4014,7 +4014,7 @@ void TQFileDialog::detailViewSelectionChanged()
nameEdit->clear();
TQString str;
TQListViewItem * i = files->firstChild();
- d->moreFiles->blockSignals( TRUE );
+ d->moreFiles->blockSignals( true );
while( i ) {
if ( d->moreFiles && isVisible() ) {
TQFileDialogPrivate::File *f = (TQFileDialogPrivate::File *)i;
@@ -4025,10 +4025,10 @@ void TQFileDialog::detailViewSelectionChanged()
str += TQString( "\"%1\" " ).arg( i->text( 0 ) );
i = i->nextSibling();
}
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && files->currentItem() ) {
TQUrl u = TQUrl( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
updatePreviews( u );
@@ -4041,7 +4041,7 @@ void TQFileDialog::listBoxSelectionChanged()
return;
if ( d->ignoreNextRefresh ) {
- d->ignoreNextRefresh = FALSE;
+ d->ignoreNextRefresh = false;
return;
}
@@ -4050,7 +4050,7 @@ void TQFileDialog::listBoxSelectionChanged()
TQListBoxItem * i = d->moreFiles->item( 0 );
TQListBoxItem * j = 0;
int index = 0;
- files->blockSignals( TRUE );
+ files->blockSignals( true );
while( i ) {
TQFileDialogPrivate::MCItem *mcitem = (TQFileDialogPrivate::MCItem *)i;
if ( files && isVisible() ) {
@@ -4068,7 +4068,7 @@ void TQFileDialog::listBoxSelectionChanged()
if ( mcitem->isSelected() && i != d->lastEFSelected ) {
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)(mcitem)->i)->info.name()) );
d->lastEFSelected = i;
- emit fileHighlighted( u.toString(FALSE, FALSE) );
+ emit fileHighlighted( u.toString(false, false) );
}
}
}
@@ -4081,10 +4081,10 @@ void TQFileDialog::listBoxSelectionChanged()
i = d->moreFiles->item( ++index );
}
- files->blockSignals( FALSE );
+ files->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && j ) {
TQUrl u = TQUrl( d->url,
TQFileDialogPrivate::encodeFileName( ( (TQFileDialogPrivate::File*)( (TQFileDialogPrivate::MCItem*)j )->i )->info.name() ) );
@@ -4113,7 +4113,7 @@ void TQFileDialog::fileNameEditDone()
TQUrlInfo f( d->url, nameEdit->text() );
if ( mode() != TQFileDialog::ExistingFiles ) {
TQUrlOperator u( d->url, TQFileDialogPrivate::encodeFileName( nameEdit->text() ) );
- trySetSelection( f.isDir(), u, FALSE );
+ trySetSelection( f.isDir(), u, false );
if ( d->preview && d->preview->isVisible() )
updatePreviews( u );
}
@@ -4152,10 +4152,10 @@ void TQFileDialog::selectDirectoryOrFile( TQListViewItem * newItem )
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) + "/" ) );
if ( isDirectoryMode( mode() ) ) {
TQUrlInfo f ( d->url, TQString::fromLatin1( "." ) );
- trySetSelection( f.isDir(), d->url, TRUE );
+ trySetSelection( f.isDir(), d->url, true );
}
} else if ( newItem->isSelectable() &&
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), TRUE ) ) {
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), true ) ) {
if ( !isDirectoryMode( mode() ) ) {
if ( mode() == ExistingFile ) {
if ( TQFileDialogPrivate::fileExists( d->url, nameEdit->text() ) ) {
@@ -4194,16 +4194,16 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
{
if ( item ) {
files->setCurrentItem( item );
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
}
PopupAction action;
- popupContextMenu( item ? item->text( 0 ) : TQString::null, TRUE, action, p );
+ popupContextMenu( item ? item->text( 0 ) : TQString::null, true, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- files->startRename( FALSE );
+ files->startRename( false );
else if ( action == PA_Delete )
deleteFile( item ? item->text( 0 ) : TQString::null );
else if ( action == PA_Reload )
@@ -4213,19 +4213,19 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
@@ -4234,12 +4234,12 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
{
PopupAction action;
- popupContextMenu( item ? item->text() : TQString::null, FALSE, action, p );
+ popupContextMenu( item ? item->text() : TQString::null, false, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
else if ( action == PA_Delete )
deleteFile( item->text() );
else if ( action == PA_Reload )
@@ -4249,19 +4249,19 @@ void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
}
@@ -4274,7 +4274,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
bool glob = filename.isEmpty();
TQPopupMenu m( 0, "file dialog context menu" );
- m.setCheckable( TRUE );
+ m.setCheckable( true );
if ( !glob ) {
TQString okt;
@@ -4295,9 +4295,9 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isWritable() ||
filename == ".." ) {
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isReadable() )
- m.setItemEnabled( ok, FALSE );
- m.setItemEnabled( rename, FALSE );
- m.setItemEnabled( del, FALSE );
+ m.setItemEnabled( ok, false );
+ m.setItemEnabled( rename, false );
+ m.setItemEnabled( del, false );
}
m.move( p );
@@ -4321,18 +4321,18 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
m2.insertSeparator();
int sunsorted = m2.insertItem( tr( "&Unsorted" ) );
- //m2.setItemEnabled( stype, FALSE );
+ //m2.setItemEnabled( stype, false );
if ( sortFilesBy == (int)TQDir::Name )
- m2.setItemChecked( sname, TRUE );
+ m2.setItemChecked( sname, true );
else if ( sortFilesBy == (int)TQDir::Size )
- m2.setItemChecked( ssize, TRUE );
+ m2.setItemChecked( ssize, true );
// else if ( sortFilesBy == 0x16 )
-// m2.setItemChecked( stype, TRUE );
+// m2.setItemChecked( stype, true );
else if ( sortFilesBy == (int)TQDir::Time )
- m2.setItemChecked( sdate, TRUE );
+ m2.setItemChecked( sdate, true );
else if ( sortFilesBy == (int)TQDir::Unsorted )
- m2.setItemChecked( sunsorted, TRUE );
+ m2.setItemChecked( sunsorted, true );
m.insertItem( tr( "Sort" ), &m2 );
@@ -4436,7 +4436,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
for ( uint i = 0; i < d->moreFiles->count(); ++i ) {
if ( d->moreFiles->text( i ) == info.name() ) {
d->moreFiles->setCurrentItem( i );
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
break;
}
}
@@ -4444,9 +4444,9 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
TQListViewItem *item = files->firstChild();
while ( item ) {
if ( item->text( 0 ) == info.name() ) {
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
files->setCurrentItem( item );
- files->startRename( FALSE );
+ files->startRename( false );
break;
}
item = item->nextSibling();
@@ -4465,7 +4465,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
this,
"get existing directory",
"Choose a directory",
- TRUE );
+ true );
\endcode
This function creates a modal file dialog called \a name, with
@@ -4479,13 +4479,13 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
Note on Windows that if \a dir is TQString::null then the dialog's working
directory will be set to the user's My Documents directory.
- If \a dirOnly is TRUE, then only directories will be shown in
+ If \a dirOnly is true, then only directories will be shown in
the file dialog; otherwise both directories and files will be shown.
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Under Windows and Mac OS X, this static function will use the native
@@ -4544,10 +4544,10 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if( tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name,
- caption, 0, FALSE, TRUE).first());
+ caption, 0, false, true).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -4561,7 +4561,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
dlg->d->types->clear();
dlg->d->types->insertItem( TQFileDialog::tr("Directories") );
- dlg->d->types->setEnabled( FALSE );
+ dlg->d->types->setEnabled( false );
TQString dir_( dir );
dir_ = dir_.simplifyWhiteSpace();
@@ -4635,32 +4635,32 @@ void TQFileDialog::setMode( Mode newMode )
d->moreFiles->setSelectionMode( TQListBox::Single );
if ( sel.isNull() )
sel = TQString::fromLatin1(".");
- d->types->setEnabled( FALSE );
+ d->types->setEnabled( false );
} else if ( newMode == ExistingFiles ) {
maxnamelen = INT_MAX;
files->setSelectionMode( TQListView::Extended );
d->moreFiles->setSelectionMode( TQListBox::Extended );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
} else {
files->setSelectionMode( TQListView::Single );
d->moreFiles->setSelectionMode( TQListBox::Single );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
}
nameEdit->setMaxLength(maxnamelen);
rereadDir();
TQUrlInfo f( d->url, "." );
- trySetSelection( f.isDir(), d->url, FALSE );
+ trySetSelection( f.isDir(), d->url, false );
}
TQString okt;
- bool changeFilters = FALSE;
+ bool changeFilters = false;
if ( mode() == AnyFile ) {
okt = tr("&Save");
d->fileL->setText( tr("File &name:") );
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4676,7 +4676,7 @@ void TQFileDialog::setMode( Mode newMode )
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4742,15 +4742,15 @@ TQFileDialog::ViewMode TQFileDialog::viewMode() const
void TQFileDialog::setViewMode( ViewMode m )
{
if ( m == Detail ) {
- detailViewMode = TRUE;
+ detailViewMode = true;
d->stack->raiseWidget( files );
- d->detailView->setOn( TRUE );
- d->mcView->setOn( FALSE );
+ d->detailView->setOn( true );
+ d->mcView->setOn( false );
} else if ( m == List ) {
- detailViewMode = FALSE;
+ detailViewMode = false;
d->stack->raiseWidget( d->moreFiles );
- d->detailView->setOn( FALSE );
- d->mcView->setOn( TRUE );
+ d->detailView->setOn( false );
+ d->mcView->setOn( true );
}
}
@@ -4772,15 +4772,15 @@ void TQFileDialog::setViewMode( ViewMode m )
void TQFileDialog::setPreviewMode( PreviewMode m )
{
if ( m == NoPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( false );
} else if ( m == Info && d->infoPreview ) {
- d->previewInfo->setOn( TRUE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( true );
+ d->previewContents->setOn( false );
changeMode( d->modeButtons->id( d->previewInfo ) );
} else if ( m == Contents && d->contentsPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( TRUE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( true );
changeMode( d->modeButtons->id( d->previewContents ) );
}
}
@@ -4827,7 +4827,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
if ( !l && !w && !b )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
TQHBoxLayout *lay = new TQHBoxLayout();
d->extraWidgetsLayouts.append( lay );
@@ -4859,7 +4859,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
/*!
Adds the tool button \a b to the row of tool buttons at the top of the
file dialog. The button is appended to the right of
- this row. If \a separator is TRUE, a small space is inserted between the
+ this row. If \a separator is true, a small space is inserted between the
last button of the row and the new button \a b.
\sa addWidgets(), addLeftWidget(), addRightWidget()
@@ -4870,7 +4870,7 @@ void TQFileDialog::addToolButton( TQButton *b, bool separator )
if ( !b || !d->buttonLayout )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->toolButtons.append( b );
if ( separator )
@@ -4890,7 +4890,7 @@ void TQFileDialog::addLeftWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->leftLayout->addWidget( w );
d->leftLayout->addSpacing( 5 );
@@ -4908,7 +4908,7 @@ void TQFileDialog::addRightWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->rightLayout->addSpacing( 5 );
d->rightLayout->addWidget( w );
@@ -4949,7 +4949,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
while ( i && nameEdit->text() != i->text( 0 ) )
i = i->nextSibling();
if ( i )
- files->setSelected( i, TRUE );
+ files->setSelected( i, true );
else
ke->accept(); // strangely, means to ignore that event
}
@@ -4961,7 +4961,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
ke->ignore();
}
- d->ignoreNextKeyPress = FALSE;
+ d->ignoreNextKeyPress = false;
if ( !ke->isAccepted() ) {
TQDialog::keyPressEvent( ke );
@@ -5230,7 +5230,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi )
return pixmap(TQFileInfo(real));
}
- TQString ext = fi.extension( FALSE ).upper();
+ TQString ext = fi.extension( false ).upper();
TQString key = ext;
ext.prepend( "." );
TQMap< TQString, TQPixmap >::Iterator it;
@@ -5386,38 +5386,38 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F5 ) {
rereadDir();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == files || o == files->viewport() ) ) {
if ( files->isVisible() && files->currentItem() ) {
if ( TQUrlInfo( d->url, "." ).isWritable() && files->currentItem()->text( 0 ) != ".." ) {
files->renameItem = files->currentItem();
- files->startRename( TRUE );
+ files->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == d->moreFiles || o == d->moreFiles->viewport() ) ) {
if ( d->moreFiles->isVisible() && d->moreFiles->currentItem() != -1 ) {
if ( TQUrlInfo( d->url, "." ).isWritable() &&
d->moreFiles->item( d->moreFiles->currentItem() )->text() != ".." ) {
d->moreFiles->renameItem = d->moreFiles->item( d->moreFiles->currentItem() );
- d->moreFiles->startRename( TRUE );
+ d->moreFiles->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && d->moreFiles->renaming ) {
d->moreFiles->lined->setFocus();
TQApplication::sendEvent( d->moreFiles->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && files->renaming ) {
files->lined->setFocus();
TQApplication::sendEvent( files->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Backspace &&
( o == files ||
@@ -5426,7 +5426,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
o == d->moreFiles->viewport() ) ) {
cdUpClicked();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == files ||
@@ -5434,7 +5434,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( files->currentItem() )
deleteFile( files->currentItem()->text( 0 ) );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == d->moreFiles ||
@@ -5443,7 +5443,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( c >= 0 )
deleteFile( d->moreFiles->item( c )->text() );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( o == files && e->type() == TQEvent::FocusOut && files->currentItem() ) {
} else if ( o == files && e->type() == TQEvent::KeyPress ) {
TQTimer::singleShot( 0, this, TQ_SLOT(fixupNameEdit()) );
@@ -5468,23 +5468,23 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
nt = i->text( 0 );
int cp = nameEdit->cursorPosition()+1;
nameEdit->validateAndSet( nt, cp, cp, nt.length() );
- return TRUE;
+ return true;
}
}
} else if ( o == nameEdit && e->type() == TQEvent::FocusIn ) {
fileNameEditDone();
} else if ( d->moreFiles->renaming && o != d->moreFiles->lined && e->type() == TQEvent::FocusIn ) {
d->moreFiles->lined->setFocus();
- return TRUE;
+ return true;
} else if ( files->renaming && o != files->lined && e->type() == TQEvent::FocusIn ) {
files->lined->setFocus();
- return TRUE;
+ return true;
} else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) &&
e->type() == TQEvent::FocusIn ) {
if ( ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ) ||
( o == d->moreFiles && !d->moreFiles->hasFocus() ) )
((TQWidget*)o)->setFocus();
- return FALSE;
+ return false;
}
return TQDialog::eventFilter( o, e );
@@ -5640,7 +5640,7 @@ void TQFileDialog::modeButtonsDestroyed()
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Note that if you want to iterate over the list of files, you should
@@ -5707,7 +5707,7 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter,
}
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -5761,21 +5761,21 @@ static bool isRoot( const TQUrl &u )
#if defined(Q_OS_MAC9)
TQString p = TQDir::convertSeparators(u.path());
if(p.contains(':') == 1)
- return TRUE;
+ return true;
#elif defined(Q_OS_UNIX)
if ( u.path() == "/" )
- return TRUE;
+ return true;
#elif defined(Q_OS_WIN32)
TQString p = u.path();
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;
}
#else
#if defined(Q_CC_GNU)
@@ -5784,9 +5784,9 @@ static bool isRoot( const TQUrl &u )
#endif
if ( !u.isLocalFile() && u.path() == "/" )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void TQFileDialog::urlStart( TQNetworkOperation *op )
@@ -5801,13 +5801,13 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
if ( isRoot( d->url ) )
- d->cdToParent->setEnabled( FALSE );
+ d->cdToParent->setEnabled( false );
else
- d->cdToParent->setEnabled( TRUE );
+ d->cdToParent->setEnabled( true );
d->mimeTypeTimer->stop();
d->sortedList.clear();
d->pendingItems.clear();
@@ -5817,15 +5817,15 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
files->clear();
files->setSorting( -1 );
- TQString s = d->url.toString( FALSE, FALSE );
- bool found = FALSE;
+ TQString s = d->url.toString( false, false );
+ bool found = false;
for ( int i = 0; i < d->paths->count(); ++i ) {
#if defined(TQ_WS_WIN)
if ( d->paths->text( i ).lower() == s.lower() ) {
#else
if ( d->paths->text( i ) == s ) {
#endif
- found = TRUE;
+ found = true;
d->paths->setCurrentItem( i );
break;
}
@@ -5835,12 +5835,12 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
d->paths->setCurrentItem( d->paths->count() - 1 );
}
d->last = 0;
- d->hadDotDot = FALSE;
+ d->hadDotDot = false;
if ( d->goBack && d->history.last() != d->url.toString() ) {
d->history.append( d->url.toString() );
if ( d->history.count() > 1 )
- d->goBack->setEnabled( TRUE );
+ d->goBack->setEnabled( true );
}
}
}
@@ -5854,16 +5854,16 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
if ( op->operation() == TQNetworkProtocol::OpListChildren &&
d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
if ( op->state() == TQNetworkProtocol::StFailed ) {
if ( d->paths->hasFocus() )
- d->ignoreNextKeyPress = TRUE;
+ d->ignoreNextKeyPress = true;
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
delete d->progressDia;
d->progressDia = 0;
@@ -5886,17 +5886,17 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpListChildren &&
op == d->currListChildren ) {
if ( !d->hadDotDot && !isRoot( d->url ) ) {
- bool ok = TRUE;
+ bool ok = true;
#if defined(TQ_WS_WIN)
if ( d->url.path().left( 2 ) == "//" )
- ok = FALSE;
+ ok = false;
#endif
if ( ok ) {
TQUrlInfo ui( d->url, ".." );
ui.setName( ".." );
- ui.setDir( TRUE );
- ui.setFile( FALSE );
- ui.setSymLink( FALSE );
+ ui.setDir( true );
+ ui.setFile( false );
+ ui.setSymLink( false );
ui.setSize( 0 );
TQValueList<TQUrlInfo> lst;
lst << ui;
@@ -5908,7 +5908,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpPut ) {
rereadDir();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
}
delete d->progressDia;
@@ -5937,7 +5937,7 @@ void TQFileDialog::dataTransferProgress( int bytesDone, int bytesTotal, TQNetwor
if ( !d->progressDia ) {
if ( bytesDone < bytesTotal) {
- d->ignoreStop = FALSE;
+ d->ignoreStop = false;
d->progressDia = new TQFDProgressDialog( this, label, bytesTotal );
connect( d->progressDia, TQ_SIGNAL( cancelled() ),
this, TQ_SLOT( stopCopy() ) );
@@ -5973,7 +5973,7 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( d->mode == DirectoryOnly && !inf.isDir() )
continue;
if ( inf.name() == ".." ) {
- d->hadDotDot = TRUE;
+ d->hadDotDot = true;
if ( isRoot( d->url ) )
continue;
#if defined(TQ_WS_WIN)
@@ -6018,8 +6018,8 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( ( d->mode == ExistingFiles && inf.isDir() ) ||
( isDirectoryMode( d->mode ) && inf.isFile() ) ) {
- i->setSelectable( FALSE );
- i2->setSelectable( FALSE );
+ i->setSelectable( false );
+ i2->setSelectable( false );
}
i->i = i2;
@@ -6036,7 +6036,7 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
TQString encName = TQFileDialogPrivate::encodeFileName(
( (TQFileDialogPrivate::File*)it.current() )->info.name() );
@@ -6044,12 +6044,12 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
d->pendingItems.removeRef( (TQFileDialogPrivate::File*)it.current() );
delete ( (TQFileDialogPrivate::File*)it.current() )->i;
delete it.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6063,18 +6063,18 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it1( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
// first check whether the new file replaces an existing file.
for ( i = d->sortedList.first(); it1.current(); ++it1, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it1.current() )->info.name() == op->arg( 1 ) ) {
delete ( (TQFileDialogPrivate::File*)it1.current() )->i;
delete it1.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 1 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6082,16 +6082,16 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
i = 0;
TQListViewItemIterator it( files );
- ok1 = FALSE;
- ok2 = FALSE;
+ ok1 = false;
+ ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it.current() )->info.name() == op->arg( 0 ) ) {
( (TQFileDialogPrivate::File*)it.current() )->info.setName( op->arg( 1 ) );
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
i->setName( op->arg( 1 ) );
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6106,7 +6106,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
\brief whether the file dialog can provide preview information about
the currently selected file
- The default is FALSE.
+ The default is false.
*/
bool TQFileDialog::isInfoPreviewEnabled() const
{
@@ -6117,7 +6117,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
{
if ( info == d->infoPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->infoPreview = info;
updateGeometries();
}
@@ -6129,7 +6129,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
\brief whether the file dialog can provide a contents preview of the
currently selected file
- The default is FALSE.
+ The default is false.
\sa setContentsPreview() setInfoPreviewEnabled()
*/
@@ -6145,7 +6145,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
{
if ( contents == d->contentsPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->contentsPreview = contents;
updateGeometries();
}
@@ -6185,7 +6185,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setInfoPreviewEnabled( TRUE );
+ fd->setInfoPreviewEnabled( true );
fd->setInfoPreview( p, p );
fd->setPreviewMode( TQFileDialog::Info );
fd->show();
@@ -6245,7 +6245,7 @@ void TQFileDialog::setInfoPreview( TQWidget *w, TQFilePreview *preview )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
@@ -6300,8 +6300,8 @@ void TQFileDialog::resortDir()
d->pendingItems.append( item );
if ( ( d->mode == ExistingFiles && item->info.isDir() ) ||
( isDirectoryMode( d->mode ) && item->info.isFile() ) ) {
- item->setSelectable( FALSE );
- item2->setSelectable( FALSE );
+ item->setSelectable( false );
+ item2->setSelectable( false );
}
}
@@ -6323,13 +6323,13 @@ void TQFileDialog::stopCopy()
if ( d->ignoreStop )
return;
- d->url.blockSignals( TRUE );
+ d->url.blockSignals( true );
d->url.stop();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
TQTimer::singleShot( 100, this, TQ_SLOT( removeProgressDia() ) );
}
- d->url.blockSignals( FALSE );
+ d->url.blockSignals( false );
}
/*!
@@ -6365,30 +6365,30 @@ void TQFileDialog::doMimeTypeLookup()
if ( item ) {
TQFileInfo fi;
if ( d->url.isLocalFile() ) {
- fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( FALSE ) );
+ fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( false ) );
} else
fi.setFile( item->info.name() ); // #####
const TQPixmap *p = iconProvider()->pixmap( fi );
if ( p && p != item->pixmap( 0 ) &&
( !item->pixmap( 0 ) || p->serialNumber() != item->pixmap( 0 )->serialNumber() ) &&
p != fifteenTransparentPixels ) {
- item->hasMimePixmap = TRUE;
+ item->hasMimePixmap = true;
// evil hack to avoid much too much repaints!
TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( FALSE );
- files->viewport()->setUpdatesEnabled( FALSE );
+ files->setUpdatesEnabled( false );
+ files->viewport()->setUpdatesEnabled( false );
if ( item != d->pendingItems.first() )
return;
item->setPixmap( 0, *p );
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( TRUE );
- files->viewport()->setUpdatesEnabled( TRUE );
+ files->setUpdatesEnabled( true );
+ files->viewport()->setUpdatesEnabled( true );
if ( files->isVisible() ) {
TQRect ir( files->itemRect( item ) );
@@ -6407,19 +6407,19 @@ void TQFileDialog::doMimeTypeLookup()
}
if ( d->moreFiles->isVisible() ) {
- d->moreFiles->viewport()->repaint( r, FALSE );
+ d->moreFiles->viewport()->repaint( r, false );
} else {
- files->viewport()->repaint( r, FALSE );
+ files->viewport()->repaint( r, false );
}
if ( d->pendingItems.count() )
d->mimeTypeTimer->start( 0 );
else if ( d->moreFiles->isVisible() )
- d->moreFiles->triggerUpdate( TRUE );
+ d->moreFiles->triggerUpdate( true );
}
/*!
- If \a b is TRUE then all the files in the current directory are selected;
+ If \a b is true then all the files in the current directory are selected;
otherwise, they are deselected.
*/
@@ -6437,7 +6437,7 @@ void TQFileDialog::goBack()
return;
d->history.remove( d->history.last() );
if ( d->history.count() < 2 )
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
setUrl( d->history.last() );
}
diff --git a/src/dialogs/tqfiledialog.h b/src/dialogs/tqfiledialog.h
index 23cd5476e..912c9a557 100644
--- a/src/dialogs/tqfiledialog.h
+++ b/src/dialogs/tqfiledialog.h
@@ -108,8 +108,8 @@ class TQ_EXPORT TQFileDialog : public TQDialog
public:
TQFileDialog( const TQString& dirName, const TQString& filter = TQString::null,
- TQWidget* parent=0, const char* name=0, bool modal = FALSE );
- TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = FALSE );
+ TQWidget* parent=0, const char* name=0, bool modal = false );
+ TQFileDialog( TQWidget* parent=0, const char* name=0, bool modal = false );
~TQFileDialog();
// recommended static functions
@@ -119,26 +119,26 @@ public:
TQWidget *parent = 0, const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
static TQString getSaveFileName( const TQString &initially = TQString::null,
const TQString &filter = TQString::null,
TQWidget *parent = 0, const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
static TQString getExistingDirectory( const TQString &dir = TQString::null,
TQWidget *parent = 0,
const char* name = 0,
const TQString &caption = TQString::null,
- bool dirOnly = TRUE,
- bool resolveSymlinks = TRUE);
+ bool dirOnly = true,
+ bool resolveSymlinks = true);
static TQStringList getOpenFileNames( const TQString &filter= TQString::null,
const TQString &dir = TQString::null,
TQWidget *parent = 0,
const char* name = 0,
const TQString &caption = TQString::null,
TQString *selectedFilter = 0,
- bool resolveSymlinks = TRUE);
+ bool resolveSymlinks = true);
// other static functions
@@ -208,7 +208,7 @@ protected:
void keyPressEvent( TQKeyEvent * );
void addWidgets( TQLabel *, TQWidget *, TQPushButton * );
- void addToolButton( TQButton *b, bool separator = FALSE );
+ void addToolButton( TQButton *b, bool separator = false );
void addLeftWidget( TQWidget *w );
void addRightWidget( TQWidget *w );
@@ -331,7 +331,7 @@ private:
static TQStringList macGetOpenFileNames( const TQString &, TQString*,
TQWidget *, const char *,
const TQString&, TQString *,
- bool = TRUE, bool = FALSE );
+ bool = true, bool = false );
#endif
diff --git a/src/dialogs/tqfontdialog.cpp b/src/dialogs/tqfontdialog.cpp
index 40c9f3de5..37d9b75da 100644
--- a/src/dialogs/tqfontdialog.cpp
+++ b/src/dialogs/tqfontdialog.cpp
@@ -160,11 +160,11 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
bool modal, WFlags f )
: TQDialog( parent, name, modal, f )
{
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
d = new TQFontDialogPrivate;
// grid
d->familyEdit = new TQLineEdit( this, "font family I" );
- d->familyEdit->setReadOnly( TRUE );
+ d->familyEdit->setReadOnly( true );
d->familyList = new TQListBox( this, "font family II" );
d->familyEdit->setFocusProxy( d->familyList );
@@ -173,7 +173,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
d->familyAccel->setIndent( 2 );
d->styleEdit = new TQLineEdit( this, "font style I" );
- d->styleEdit->setReadOnly( TRUE );
+ d->styleEdit->setReadOnly( true );
d->styleList = new TQListBox( this, "font style II" );
d->styleEdit->setFocusProxy( d->styleList );
@@ -206,14 +206,14 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
// characters used depend on the charset encoding.
d->sampleEdit->setText( "AaBbYyZz" );
- d->scriptCombo = new TQComboBox( FALSE, this, "font encoding" );
+ d->scriptCombo = new TQComboBox( false, this, "font encoding" );
d->scriptAccel
= new TQLabel( d->scriptCombo, tr("Scr&ipt"), this,"encoding label");
d->scriptAccel->setIndent( 2 );
d->size = 0;
- d->smoothScalable = FALSE;
+ d->smoothScalable = false;
connect( d->scriptCombo, TQ_SIGNAL(activated(int)),
TQ_SLOT(scriptHighlighted(int)) );
@@ -289,7 +289,7 @@ TQFontDialog::TQFontDialog( TQWidget *parent, const char *name,
buttonBox->addWidget( d->ok );
if ( modal )
connect( d->ok, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
buttonBox->addSpacing( 12 );
@@ -327,8 +327,8 @@ TQFontDialog::~TQFontDialog()
The dialog is called \a name, with the parent \a parent.
\a initial is the initially selected font.
- If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the
- user clicked OK, and set to FALSE if the user clicked Cancel.
+ If the \a ok parameter is not-null, \e *\a ok is set to true if the
+ user clicked OK, and set to false if the user clicked Cancel.
This static function is less flexible than the full TQFontDialog
object, but is convenient and easy to use.
@@ -367,8 +367,8 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont &initial,
clicks Cancel, the TQt default font is returned.
The dialog is called \a name, with parent \a parent.
- If the \a ok parameter is not-null, \e *\a ok is set to TRUE if the
- user clicked OK, and FALSE if the user clicked Cancel.
+ If the \a ok parameter is not-null, \e *\a ok is set to true if the
+ user clicked OK, and false if the user clicked Cancel.
This static function is less functional than the full TQFontDialog
object, but is convenient and easy to use.
@@ -404,7 +404,7 @@ TQFont TQFontDialog::getFont( bool *ok, const TQFont *def,
if ( def )
result = *def;
- TQFontDialog *dlg = new TQFontDialog( parent, name, TRUE );
+ TQFontDialog *dlg = new TQFontDialog( parent, name, true );
dlg->setFont( ( def ? *def : TQFont() ) );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -444,12 +444,12 @@ bool TQFontDialog::eventFilter( TQObject * o , TQEvent * e )
if ( ci != d->sizeList->currentItem() &&
style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this))
d->sizeEdit->selectAll();
- return TRUE;
+ return true;
} else if ( ( o == d->familyList || o == d->styleList ) &&
( k->key() == Key_Return || k->key() == Key_Enter) ) {
k->accept();
accept();
- return TRUE;
+ return true;
}
} else if ( e->type() == TQEvent::FocusIn &&
style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) ) {
@@ -522,7 +522,7 @@ void TQListBoxFontText::paint( TQPainter *painter )
void TQFontDialog::updateFamilies()
{
- d->familyList->blockSignals( TRUE );
+ d->familyList->blockSignals( true );
enum match_t { MATCH_NONE=0, MATCH_LAST_RESORT=1, MATCH_APP=2, MATCH_FALLBACK, MATCH_FAMILY=3 };
@@ -598,7 +598,7 @@ void TQFontDialog::updateFamilies()
d->familyList->hasFocus() )
d->familyEdit->selectAll();
- d->familyList->blockSignals( FALSE );
+ d->familyList->blockSignals( false );
updateStyles();
}
@@ -610,7 +610,7 @@ void TQFontDialog::updateFamilies()
void TQFontDialog::updateStyles()
{
- d->styleList->blockSignals( TRUE );
+ d->styleList->blockSignals( true );
d->styleList->clear();
@@ -618,30 +618,30 @@ void TQFontDialog::updateStyles()
if ( styles.isEmpty() ) {
d->styleEdit->clear();
- d->smoothScalable = FALSE;
+ d->smoothScalable = false;
} else {
d->styleList->insertStringList( styles );
if ( !d->style.isEmpty() ) {
- bool found = FALSE;
- bool first = TRUE;
+ bool found = false;
+ bool first = true;
TQString cstyle = d->style;
redo:
for ( int i = 0 ; i < (int)d->styleList->count() ; i++ ) {
if ( cstyle == d->styleList->text(i) ) {
d->styleList->setCurrentItem( i );
- found = TRUE;
+ found = true;
break;
}
}
if (!found && first) {
if (cstyle.contains("Italic")) {
cstyle.replace("Italic", "Oblique");
- first = FALSE;
+ first = false;
goto redo;
} else if (cstyle.contains("Oblique")) {
cstyle.replace("Oblique", "Italic");
- first = FALSE;
+ first = false;
goto redo;
}
}
@@ -657,7 +657,7 @@ void TQFontDialog::updateStyles()
d->smoothScalable = d->fdb.isSmoothlyScalable( d->familyList->currentText(), d->styleList->currentText() );
}
- d->styleList->blockSignals( FALSE );
+ d->styleList->blockSignals( false );
updateSizes();
}
@@ -670,7 +670,7 @@ void TQFontDialog::updateStyles()
void TQFontDialog::updateSizes()
{
- d->sizeList->blockSignals( TRUE );
+ d->sizeList->blockSignals( true );
d->sizeList->clear();
@@ -678,12 +678,12 @@ void TQFontDialog::updateSizes()
TQValueList<int> sizes = d->fdb.pointSizes( d->familyList->currentText(), d->styleList->currentText() );
int i = 0;
- bool found = FALSE;
+ bool found = false;
for( TQValueList<int>::iterator it = sizes.begin() ; it != sizes.end(); ++it ) {
d->sizeList->insertItem( TQString::number( *it ) );
if ( !found && *it >= d->size ) {
d->sizeList->setCurrentItem( i );
- found = TRUE;
+ found = true;
}
++i;
}
@@ -692,17 +692,17 @@ void TQFontDialog::updateSizes()
d->sizeList->setCurrentItem( d->sizeList->count() - 1 );
}
- d->sizeEdit->blockSignals( TRUE );
+ d->sizeEdit->blockSignals( true );
d->sizeEdit->setText( ( d->smoothScalable ? TQString::number( d->size ) : d->sizeList->currentText() ) );
if ( style().styleHint(TQStyle::SH_FontDialog_SelectAssociatedText, this) &&
d->sizeList->hasFocus() )
d->sizeEdit->selectAll();
- d->sizeEdit->blockSignals( FALSE );
+ d->sizeEdit->blockSignals( false );
} else {
d->sizeEdit->clear();
}
- d->sizeList->blockSignals( FALSE );
+ d->sizeList->blockSignals( false );
updateSample();
}
@@ -792,9 +792,9 @@ void TQFontDialog::sizeChanged( const TQString &s )
if ( d->sizeList->text(i).toInt() >= d->size )
break;
}
- d->sizeList->blockSignals( TRUE );
+ d->sizeList->blockSignals( true );
d->sizeList->setCurrentItem( i );
- d->sizeList->blockSignals( FALSE );
+ d->sizeList->blockSignals( false );
}
updateSample();
}
diff --git a/src/dialogs/tqfontdialog.h b/src/dialogs/tqfontdialog.h
index bb19b7676..178781ee7 100644
--- a/src/dialogs/tqfontdialog.h
+++ b/src/dialogs/tqfontdialog.h
@@ -75,7 +75,7 @@ private:
static TQFont getFont( bool *ok, const TQFont *def,
TQWidget* parent=0, const char* name=0);
- TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQFontDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQFontDialog();
diff --git a/src/dialogs/tqinputdialog.cpp b/src/dialogs/tqinputdialog.cpp
index a58d9a2dc..fb1d0823b 100644
--- a/src/dialogs/tqinputdialog.cpp
+++ b/src/dialogs/tqinputdialog.cpp
@@ -118,7 +118,7 @@ public:
Constructs the dialog. The \a label is the text which is shown to the user
(it should tell the user what they are expected to enter). The \a parent
is the dialog's parent widget. The widget is called \a name. If \a
- modal is TRUE (the default) the dialog will be modal. The \a type
+ modal is true (the default) the dialog will be modal. The \a type
parameter is used to specify which type of dialog to construct.
\sa getText(), getInteger(), getDouble(), getItem()
@@ -142,14 +142,14 @@ TQInputDialog::TQInputDialog( const TQString &label, TQWidget* parent,
vbox->addWidget( d->stack );
d->lineEdit = new TQLineEdit( d->stack, "qt_inputdlg_le" );
d->spinBox = new TQSpinBox( d->stack, "qt_inputdlg_sb" );
- d->comboBox = new TQComboBox( FALSE, d->stack, "qt_inputdlg_cb" );
- d->editComboBox = new TQComboBox( TRUE, d->stack, "qt_inputdlg_editcb" );
+ d->comboBox = new TQComboBox( false, d->stack, "qt_inputdlg_cb" );
+ d->editComboBox = new TQComboBox( true, d->stack, "qt_inputdlg_editcb" );
TQHBoxLayout *hbox = new TQHBoxLayout( 6 );
vbox->addLayout( hbox, AlignRight );
d->ok = new TQPushButton( tr( "OK" ), this, "qt_ok_btn" );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
TQPushButton *cancel = new TQPushButton( tr( "Cancel" ), this, "qt_cancel_btn" );
TQSize bs = d->ok->sizeHint().expandedTo( cancel->sizeHint() );
@@ -273,8 +273,8 @@ TQInputDialog::~TQInputDialog()
dialog. \a label is the text which is shown to the user (it should
say what should be entered). \a text is the default text which is
placed in the line edit. The \a mode is the echo mode the line edit
- will use. If \a ok is not-null \e *\a ok will be set to TRUE if the
- user pressed OK and to FALSE if the user pressed Cancel. The
+ will use. If \a ok is not-null \e *\a ok will be set to true if the
+ user pressed OK and to false if the user pressed Cancel. The
dialog's parent is \a parent; the dialog is called \a name. The
dialog will be modal.
@@ -302,7 +302,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
{
TQInputDialog *dlg = new TQInputDialog( label, parent,
name ? name : "qt_inputdlg_gettext",
- TRUE, LineEdit );
+ true, LineEdit );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
@@ -310,7 +310,7 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
dlg->lineEdit()->setText( text );
dlg->lineEdit()->setEchoMode( mode );
- bool ok_ = FALSE;
+ bool ok_ = false;
TQString result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -332,8 +332,8 @@ TQString TQInputDialog::getText( const TQString &caption, const TQString &label,
and \a step is the amount by which the values change as the user
presses the arrow buttons to increment or decrement the value.
- If \a ok is not-null *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
@@ -360,7 +360,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
{
TQInputDialog *dlg = new TQInputDialog( label, parent,
name ? name : "qt_inputdlg_getint",
- TRUE, SpinBox );
+ true, SpinBox );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
#endif
@@ -368,7 +368,7 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
dlg->spinBox()->setSteps( step, 0 );
dlg->spinBox()->setValue( value );
- bool ok_ = FALSE;
+ bool ok_ = false;
int result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -389,8 +389,8 @@ int TQInputDialog::getInteger( const TQString &caption, const TQString &label,
user may choose, and \a decimals is the maximum number of decimal
places the number may have.
- If \a ok is not-null \e *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null \e *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
@@ -418,7 +418,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
const char *name )
{
TQInputDialog dlg( label, parent,
- name ? name : "qt_inputdlg_getdbl", TRUE, LineEdit );
+ name ? name : "qt_inputdlg_getdbl", true, LineEdit );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg.setCaption( caption );
#endif
@@ -438,17 +438,17 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
bar of the dialog. \a label is the text which is shown to the user (it
should say what should be entered). \a list is the
string list which is inserted into the combobox, and \a current is the number
- of the item which should be the current item. If \a editable is TRUE
- the user can enter their own text; if \a editable is FALSE the user
+ of the item which should be the current item. If \a editable is true
+ the user can enter their own text; if \a editable is false the user
may only select one of the existing items.
- If \a ok is not-null \e *\a ok will be set to TRUE if the user
- pressed OK and to FALSE if the user pressed Cancel. The dialog's
+ If \a ok is not-null \e *\a ok will be set to true if the user
+ pressed OK and to false if the user pressed Cancel. The dialog's
parent is \a parent; the dialog is called \a name. The dialog will
be modal.
This function returns the text of the current item, or if \a
- editable is TRUE, the current text of the combobox.
+ editable is true, the current text of the combobox.
Use this static function like this:
@@ -457,7 +457,7 @@ double TQInputDialog::getDouble( const TQString &caption, const TQString &label,
lst << "First" << "Second" << "Third" << "Fourth" << "Fifth";
bool ok;
TQString res = TQInputDialog::getItem(
- "MyApp 3000", "Select an item:", lst, 1, TRUE, &ok,
+ "MyApp 3000", "Select an item:", lst, 1, true, &ok,
this );
if ( ok ) {
// user selected an item and pressed OK
@@ -471,7 +471,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
int current, bool editable,
bool *ok, TQWidget *parent, const char *name )
{
- TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", TRUE, editable ? EditableComboBox : ComboBox );
+ TQInputDialog *dlg = new TQInputDialog( label, parent, name ? name : "qt_inputdlg_getitem", true, editable ? EditableComboBox : ComboBox );
#ifndef TQT_NO_WIDGET_TOPEXTRA
dlg->setCaption( caption );
#endif
@@ -483,7 +483,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
dlg->comboBox()->setCurrentItem( current );
}
- bool ok_ = FALSE;
+ bool ok_ = false;
TQString result;
ok_ = dlg->exec() == TQDialog::Accepted;
if ( ok )
@@ -506,7 +506,7 @@ TQString TQInputDialog::getItem( const TQString &caption, const TQString &label,
void TQInputDialog::textChanged( const TQString &s )
{
- bool on = TRUE;
+ bool on = true;
if ( d->lineEdit->validator() ) {
TQString str = d->lineEdit->text();
diff --git a/src/dialogs/tqinputdialog.h b/src/dialogs/tqinputdialog.h
index 67434b3ae..0347efee9 100644
--- a/src/dialogs/tqinputdialog.h
+++ b/src/dialogs/tqinputdialog.h
@@ -61,7 +61,7 @@ private:
enum Type { LineEdit, SpinBox, ComboBox, EditableComboBox };
TQInputDialog( const TQString &label, TQWidget* parent=0, const char* name=0,
- bool modal = TRUE, Type type = LineEdit ); //### 4.0: widget flag!
+ bool modal = true, Type type = LineEdit ); //### 4.0: widget flag!
~TQInputDialog();
TQLineEdit *lineEdit() const;
@@ -83,7 +83,7 @@ public:
double minValue = -2147483647, double maxValue = 2147483647,
int decimals = 1, bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
static TQString getItem( const TQString &caption, const TQString &label, const TQStringList &list,
- int current = 0, bool editable = TRUE,
+ int current = 0, bool editable = true,
bool *ok = 0, TQWidget *parent = 0, const char *name = 0 );
private slots:
diff --git a/src/dialogs/tqmessagebox.cpp b/src/dialogs/tqmessagebox.cpp
index b90840cf7..436194325 100644
--- a/src/dialogs/tqmessagebox.cpp
+++ b/src/dialogs/tqmessagebox.cpp
@@ -483,7 +483,7 @@ const char * mb_texts[] = {
*/
TQMessageBox::TQMessageBox( TQWidget *parent, const char *name )
- : TQDialog( parent, name, TRUE, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu )
+ : TQDialog( parent, name, true, WStyle_Customize | WStyle_DialogBorder | WStyle_Title | WStyle_SysMenu )
{
init( Ok, 0, 0 );
}
@@ -545,7 +545,7 @@ TQMessageBox::TQMessageBox( TQWidget *parent, const char *name )
modal dialog box. If \a parent is a widget, the message box
becomes modal relative to \a parent.
- If \a modal is TRUE the message box is modal; otherwise it
+ If \a modal is true the message box is modal; otherwise it
is modeless.
The \a parent, \a name, \a modal, and \a f arguments are passed to
@@ -674,10 +674,10 @@ void TQMessageBox::init( int button0, int button1, int button2 )
tr(mb_texts[mbd->button[i]]),
this, buttonName );
if ( mbd->defButton == i ) {
- mbd->pb[i]->setDefault( TRUE );
+ mbd->pb[i]->setDefault( true );
mbd->pb[i]->setFocus();
}
- mbd->pb[i]->setAutoDefault( TRUE );
+ mbd->pb[i]->setAutoDefault( true );
mbd->pb[i]->setFocusPolicy( TQWidget::StrongFocus );
connect( mbd->pb[i], TQ_SIGNAL(clicked()), TQ_SLOT(buttonClicked()) );
}
@@ -1116,7 +1116,7 @@ int TQMessageBox::information( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Information,
button0, button1, button2,
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1167,7 +1167,7 @@ int TQMessageBox::question( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Question,
button0, button1, button2,
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1219,7 +1219,7 @@ int TQMessageBox::warning( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Warning,
button0, button1, button2,
- parent, "qt_msgbox_warning", TRUE,
+ parent, "qt_msgbox_warning", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1271,7 +1271,7 @@ int TQMessageBox::critical( TQWidget *parent,
#endif
TQMessageBox *mb = new TQMessageBox( caption, text, Critical,
button0, button1, button2,
- parent, "qt_msgbox_critical", TRUE,
+ parent, "qt_msgbox_critical", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
return mb->exec();
@@ -1302,7 +1302,7 @@ void TQMessageBox::about( TQWidget *parent, const TQString &caption,
TQMessageBox *mb = new TQMessageBox( caption, text,
Information,
Ok + Default, 0, 0,
- parent, "qt_msgbox_simple_about_box", TRUE,
+ parent, "qt_msgbox_simple_about_box", true,
WDestructiveClose);
TQ_CHECK_PTR( mb );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1359,7 +1359,7 @@ static int textBox( TQWidget *parent, TQMessageBox::Icon severity,
TQMessageBox *mb = new TQMessageBox( caption, text, severity,
b[0], b[1], b[2],
- parent, "qt_msgbox_information", TRUE,
+ parent, "qt_msgbox_information", true,
TQt::WDestructiveClose);
TQ_CHECK_PTR( mb );
if ( button0Text.isEmpty() )
@@ -1616,9 +1616,9 @@ void TQMessageBox::aboutTQt( TQWidget *parent, const TQString &caption )
#endif
mb->setButtonText( 0, tr("OK") );
if ( mb->mbd && mb->mbd->pb[0] ) {
- mb->mbd->pb[0]->setAutoDefault( TRUE );
+ mb->mbd->pb[0]->setAutoDefault( true );
mb->mbd->pb[0]->setFocusPolicy( TQWidget::StrongFocus );
- mb->mbd->pb[0]->setDefault( TRUE );
+ mb->mbd->pb[0]->setDefault( true );
mb->mbd->pb[0]->setFocus();
}
mb->exec();
diff --git a/src/dialogs/tqmessagebox.h b/src/dialogs/tqmessagebox.h
index cb0933f81..86a96fc2d 100644
--- a/src/dialogs/tqmessagebox.h
+++ b/src/dialogs/tqmessagebox.h
@@ -67,7 +67,7 @@ public:
TQMessageBox( TQWidget* parent=0, const char* name=0 );
TQMessageBox( const TQString& caption, const TQString &text, Icon icon,
int button0, int button1, int button2,
- TQWidget* parent=0, const char* name=0, bool modal=TRUE,
+ TQWidget* parent=0, const char* name=0, bool modal=true,
WFlags f=WStyle_DialogBorder );
~TQMessageBox();
diff --git a/src/dialogs/tqprintdialog.cpp b/src/dialogs/tqprintdialog.cpp
index 8430f2cbc..4cd57a02c 100644
--- a/src/dialogs/tqprintdialog.cpp
+++ b/src/dialogs/tqprintdialog.cpp
@@ -251,11 +251,11 @@ static int parsePrintcap( TQListView * printers, const TQString& fileName )
line_ascii[1024] = '\0';
TQString printerDesc;
- bool atEnd = FALSE;
+ bool atEnd = false;
while ( !atEnd ) {
if ( printcap.atEnd() || printcap.readLine( line_ascii, 1024 ) <= 0 )
- atEnd = TRUE;
+ atEnd = true;
TQString line = line_ascii;
line = line.stripWhiteSpace();
if ( line.length() >= 1 && line[int(line.length()) - 1] == '\\' )
@@ -300,7 +300,7 @@ static void parseEtcLpPrinters( TQListView * printers )
TQString remote( TQString::fromLatin1("Remote:") );
TQString contentType( TQString::fromLatin1("Content types:") );
TQString printerHost;
- bool canPrintPostscript = FALSE;
+ bool canPrintPostscript = false;
if ( configuration.open( IO_ReadOnly ) ) {
while ( !configuration.atEnd() &&
configuration.readLine( line, 1024 ) > 0 ) {
@@ -331,7 +331,7 @@ static void parseEtcLpPrinters( TQListView * printers )
*e = '\0';
if ( !qstrcmp( p, "postscript" ) ||
!qstrcmp( p, "any" ) )
- canPrintPostscript = TRUE;
+ canPrintPostscript = true;
*e = s;
if ( s == ',' )
e++;
@@ -356,11 +356,11 @@ static char * parsePrintersConf( TQListView * printers, bool *found = 0 )
TQFile pc( TQString::fromLatin1("/etc/printers.conf") );
if ( !pc.open( IO_ReadOnly ) ) {
if ( found )
- *found = FALSE;
+ *found = false;
return 0;
}
if ( found )
- *found = TRUE;
+ *found = true;
char * line = new char[1025];
line[1024] = '\0';
@@ -519,7 +519,7 @@ static char *parseNsswitchPrintersEntry( TQListView * printers, char *line )
k++
char *defaultPrinter = 0;
- bool stop = FALSE;
+ bool stop = false;
int lastStatus = NotFound;
int k = 8;
@@ -698,7 +698,7 @@ static void parseSpoolInterface( TQListView * printers )
configFile.close();
printerType = printerType.stripWhiteSpace();
- if ( printerType.find("postscript", 0, FALSE) < 0 )
+ if ( printerType.find("postscript", 0, false) < 0 )
continue;
int ii = 0;
@@ -732,7 +732,7 @@ static void parseQconfig( TQListView * printers )
TQString line;
TQString stanzaName; // either a queue or a device name
- bool up = TRUE; // queue up? default TRUE, can be FALSE
+ bool up = true; // queue up? default true, can be false
TQString remoteHost; // null if local
TQString deviceName; // null if remote
@@ -776,7 +776,7 @@ static void parseQconfig( TQListView * printers )
line.truncate( line.length()-1 );
if ( line.length() >= 1 && line.length() <= 20 )
stanzaName = line;
- up = TRUE;
+ up = true;
remoteHost = TQString::null;
deviceName = TQString::null;
} else {
@@ -865,7 +865,7 @@ static void qpd_cleanup_globaldialog()
*/
TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name )
- : TQDialog( parent, name, TRUE )
+ : TQDialog( parent, name, true )
{
d = new TQPrintDialogPrivate;
d->numCopies = 1;
@@ -917,7 +917,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name
d->ok = new TQPushButton( this, "ok" );
d->ok->setText( tr("OK") );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
horiz->addWidget( d->ok );
if (! rightalign)
horiz->addStretch( 1 );
@@ -948,7 +948,7 @@ TQPrintDialog::TQPrintDialog( TQPrinter *prn, TQWidget *parent, const char *name
ms.setHeight( 460 );
resize( ms );
- setPrinter( prn, TRUE );
+ setPrinter( prn, true );
d->printers->setFocus();
}
@@ -1000,7 +1000,7 @@ TQGroupBox * TQPrintDialog::setupPrinterSettings()
rb = new TQRadioButton( tr( "Print in color if available" ),
g, "color" );
d->colorMode->insert( rb, TQPrinter::Color );
- rb->setChecked( TRUE );
+ rb->setChecked( true );
rb = new TQRadioButton( tr("Print in grayscale"),
g, "graysacle" );
@@ -1026,15 +1026,15 @@ TQGroupBox * TQPrintDialog::setupDestination()
"printer" );
tll->addWidget( rb );
d->printerOrFile->insert( rb, 0 );
- rb->setChecked( TRUE );
- d->outputToFile = FALSE;
+ rb->setChecked( true );
+ d->outputToFile = false;
TQBoxLayout * horiz = new TQBoxLayout( TQBoxLayout::LeftToRight );
tll->addLayout( horiz, 3 );
horiz->addSpacing( 19 );
d->printers = new TQListView( g, "list of printers" );
- d->printers->setAllColumnsShowFocus( TRUE );
+ d->printers->setAllColumnsShowFocus( true );
d->printers->addColumn( tr("Printer"), 125 );
d->printers->addColumn( tr("Host"), 125 );
d->printers->addColumn( tr("Comment"), 150 );
@@ -1135,7 +1135,7 @@ TQGroupBox * TQPrintDialog::setupDestination()
}
if ( d->printers->currentItem() )
- d->printers->setSelected( d->printers->currentItem(), TRUE );
+ d->printers->setSelected( d->printers->currentItem(), true );
if ( etcLpDefault ) // Avoid purify complaint
delete[] etcLpDefault;
@@ -1166,16 +1166,16 @@ TQGroupBox * TQPrintDialog::setupDestination()
horiz->addWidget( d->fileName, 1 );
horiz->addSpacing( 6 );
d->browse = new TQPushButton( tr("Browse..."), g, "browse files" );
- d->browse->setAutoDefault( FALSE );
+ d->browse->setAutoDefault( false );
#ifdef TQT_NO_FILEDIALOG
- d->browse->setEnabled( FALSE );
+ d->browse->setEnabled( false );
#endif
connect( d->browse, TQ_SIGNAL(clicked()),
this, TQ_SLOT(browseClicked()) );
horiz->addWidget( d->browse );
- d->fileName->setEnabled( FALSE );
- d->browse->setEnabled( FALSE );
+ d->fileName->setEnabled( false );
+ d->browse->setEnabled( false );
tll->activate();
@@ -1253,7 +1253,7 @@ TQGroupBox * TQPrintDialog::setupOptions()
g, "first page first" );
tll->addWidget( rb );
d->pageOrder->insert( rb, TQPrinter::FirstPageFirst );
- rb->setChecked( TRUE );
+ rb->setChecked( true );
rb = new TQRadioButton( tr("Print last page first"),
g, "last page first" );
@@ -1308,7 +1308,7 @@ TQGroupBox * TQPrintDialog::setupPaper()
d->pageSize = TQPrinter::A4;
// page orientation
- d->orientationCombo = new TQComboBox( FALSE, g );
+ d->orientationCombo = new TQComboBox( false, g );
d->orientationCombo->insertItem( tr( "Portrait" ), -1 );
d->orientationCombo->insertItem( tr( "Landscape" ), -1 );
@@ -1320,7 +1320,7 @@ TQGroupBox * TQPrintDialog::setupPaper()
this, TQ_SLOT( orientSelected(int) ) );
// paper size
- d->sizeCombo = new TQComboBox( FALSE, g );
+ d->sizeCombo = new TQComboBox( false, g );
int n;
for( n=0; n<TQPrinter::NPageSize; n++ )
@@ -1366,8 +1366,8 @@ TQGroupBox * TQPrintDialog::setupPaper()
/*!
Display a dialog and allow the user to configure the TQPrinter \a
- p for an optional widget \a w. Returns TRUE if the user clicks OK or
- presses Enter, FALSE if the user clicks Cancel or presses Esc.
+ p for an optional widget \a w. Returns true if the user clicks OK or
+ presses Enter, false if the user clicks Cancel or presses Esc.
getPrinterSetup() remembers the settings and provides the same
settings the next time the dialog is shown.
@@ -1381,10 +1381,10 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w )
globalPrintDialog->setCaption( TQPrintDialog::tr( "Setup Printer" ) );
#endif
tqAddPostRoutine( qpd_cleanup_globaldialog );
- globalPrintDialog->setPrinter( p, TRUE );
+ globalPrintDialog->setPrinter( p, true );
globalPrintDialog->adjustSize();
} else {
- globalPrintDialog->setPrinter( p, TRUE );
+ globalPrintDialog->setPrinter( p, true );
}
globalPrintDialog->adjustPosition( w );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -1408,9 +1408,9 @@ bool TQPrintDialog::getPrinterSetup( TQPrinter * p, TQWidget* w )
void TQPrintDialog::printerOrFileSelected( int id )
{
- d->outputToFile = id ? TRUE : FALSE;
+ d->outputToFile = (id != 0);
if ( d->outputToFile ) {
- d->ok->setEnabled( TRUE );
+ d->ok->setEnabled( true );
fileNameEditChanged( d->fileName->text() );
if ( !d->fileName->edited() && d->fileName->text().isEmpty() ) {
TQString home = TQString::fromLatin1( ::getenv( "HOME" ) );
@@ -1428,17 +1428,17 @@ void TQPrintDialog::printerOrFileSelected( int id )
d->fileName->setCursorPosition( cur.length() );
d->fileName->selectAll();
}
- d->browse->setEnabled( TRUE );
- d->fileName->setEnabled( TRUE );
+ d->browse->setEnabled( true );
+ d->fileName->setEnabled( true );
d->fileName->setFocus();
- d->printers->setEnabled( FALSE );
+ d->printers->setEnabled( false );
} else {
d->ok->setEnabled( d->printers->childCount() != 0 );
- d->printers->setEnabled( TRUE );
+ d->printers->setEnabled( true );
if ( d->fileName->hasFocus() || d->browse->hasFocus() )
d->printers->setFocus();
- d->browse->setEnabled( FALSE );
- d->fileName->setEnabled( FALSE );
+ d->browse->setEnabled( false );
+ d->fileName->setEnabled( false );
}
}
@@ -1490,10 +1490,10 @@ void TQPrintDialog::okClicked()
d->firstPage->interpretText();
d->copies->interpretText();
if ( d->outputToFile ) {
- d->printer->setOutputToFile( TRUE );
+ d->printer->setOutputToFile( true );
d->printer->setOutputFileName( d->fileName->text() );
} else {
- d->printer->setOutputToFile( FALSE );
+ d->printer->setOutputToFile( false );
TQListViewItem * l = d->printers->currentItem();
if ( l )
d->printer->setPrinterName( l->text( 0 ) );
@@ -1521,7 +1521,7 @@ void TQPrintDialog::okClicked()
void TQPrintDialog::printRangeSelected( int id )
{
- bool enable = id == 2 ? TRUE : FALSE;
+ bool enable = (id == 2);
d->firstPage->setEnabled( enable );
d->lastPage->setEnabled( enable );
d->firstPageLabel->setEnabled( enable );
@@ -1545,8 +1545,8 @@ void TQPrintDialog::setLastPage( int lp )
/*!
Sets this dialog to configure printer \a p, or no printer if \a p
- is null. If \a pickUpSettings is TRUE, the dialog reads most of
- its settings from \a p. If \a pickUpSettings is FALSE (the
+ is null. If \a pickUpSettings is true, the dialog reads most of
+ its settings from \a p. If \a pickUpSettings is false (the
default) the dialog keeps its old settings.
*/
@@ -1566,8 +1566,8 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
while ( i && i->text( 0 ) != p->printerName() )
i = i->nextSibling();
if ( i ) {
- d->printers->setSelected( i, TRUE );
- d->ok->setEnabled( TRUE );
+ d->printers->setSelected( i, true );
+ d->ok->setEnabled( true );
} else if ( d->fileName->text().isEmpty() ) {
d->ok->setEnabled( d->printers->childCount() != 0 );
}
@@ -1607,7 +1607,7 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
}
if( p ) {
- d->printAllButton->setEnabled( TRUE );
+ d->printAllButton->setEnabled( true );
d->printSelectionButton
->setEnabled( d->printer->isOptionEnabled( TQPrinter::PrintSelection ) );
d->printRangeButton
@@ -1616,15 +1616,15 @@ void TQPrintDialog::setPrinter( TQPrinter * p, bool pickUpSettings )
TQPrinter::PrintRange range = p->printRange();
switch ( range ) {
case TQPrinter::AllPages:
- d->printAllButton->setChecked(TRUE);
+ d->printAllButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printAllButton ) );
break;
case TQPrinter::Selection:
- d->printSelectionButton->setChecked(TRUE);
+ d->printSelectionButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printSelectionButton ) );
break;
case TQPrinter::PageRange:
- d->printRangeButton->setChecked(TRUE);
+ d->printRangeButton->setChecked(true);
printRangeSelected( d->printRange->id( d->printRangeButton ) );
break;
}
diff --git a/src/dialogs/tqprintdialog.h b/src/dialogs/tqprintdialog.h
index 29824416a..fa7ef36bb 100644
--- a/src/dialogs/tqprintdialog.h
+++ b/src/dialogs/tqprintdialog.h
@@ -61,7 +61,7 @@ public:
static bool getPrinterSetup( TQPrinter *, TQWidget* = 0 );
static void setGlobalPrintDialog( TQPrintDialog * );
- void setPrinter( TQPrinter *, bool = FALSE );
+ void setPrinter( TQPrinter *, bool = false );
TQPrinter * printer() const;
void addButton( TQPushButton *but );
diff --git a/src/dialogs/tqprogressdialog.cpp b/src/dialogs/tqprogressdialog.cpp
index 262dbd85b..4f4319827 100644
--- a/src/dialogs/tqprogressdialog.cpp
+++ b/src/dialogs/tqprogressdialog.cpp
@@ -75,8 +75,8 @@ public:
label( new TQLabel(labelText,that,"label") ),
cancel( 0 ),
bar( new TQProgressBar(totalSteps,that,"bar") ),
- shown_once( FALSE ),
- cancellation_flag( FALSE ),
+ shown_once( false ),
+ cancellation_flag( false ),
showTime( defaultShowTime )
{
label->setAlignment(that->style().styleHint(TQStyle::SH_ProgressDialog_TextLabelAlignment, that));
@@ -140,7 +140,7 @@ public:
for cancellation with wasCanceled(). For example:
\code
TQProgressDialog progress( "Copying files...", "Abort Copy", numFiles,
- this, "progress", TRUE );
+ this, "progress", true );
for ( int i = 0; i < numFiles; i++ ) {
progress.setProgress( i );
tqApp->processEvents();
@@ -238,9 +238,9 @@ TQProgressBar *TQProgressDialog::bar() const
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and the widget flags, \a f, are
- passed to the TQDialog::TQDialog() constructor. If \a modal is FALSE (the
+ passed to the TQDialog::TQDialog() constructor. If \a modal is false (the
default), you must have an event loop proceeding for any redrawing
- of the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ of the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
\sa setLabelText(), setLabel(), setCancelButtonText(), setCancelButton(),
@@ -271,9 +271,9 @@ TQProgressDialog::TQProgressDialog( TQWidget *creator, const char *name,
The \a creator argument is the widget to use as the dialog's parent.
The \a name, \a modal, and widget flags, \a f, are passed to the
- TQDialog::TQDialog() constructor. If \a modal is FALSE (the default),
+ TQDialog::TQDialog() constructor. If \a modal is false (the default),
you will must have an event loop proceeding for any redrawing of
- the dialog to occur. If \a modal is TRUE, the dialog ensures that
+ the dialog to occur. If \a modal is true, the dialog ensures that
events are processed when needed.
@@ -310,9 +310,9 @@ void TQProgressDialog::init( TQWidget *creator,
int totstps)
{
d = new TQProgressDialogData(this, creator, lbl, totstps);
- d->autoClose = TRUE;
- d->autoReset = TRUE;
- d->forceHide = FALSE;
+ d->autoClose = true;
+ d->autoReset = true;
+ d->forceHide = false;
setCancelButtonText( canc );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SIGNAL(cancelled()) );
connect( this, TQ_SIGNAL(canceled()), this, TQ_SLOT(cancel()) );
@@ -355,7 +355,7 @@ void TQProgressDialog::setLabel( TQLabel *label )
if ( label->parentWidget() == this ) {
label->hide(); // until we resize
} else {
- label->reparent( this, 0, TQPoint(0,0), FALSE );
+ label->reparent( this, 0, TQPoint(0,0), false );
}
}
int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() );
@@ -408,7 +408,7 @@ void TQProgressDialog::setCancelButton( TQPushButton *cancelButton )
if ( cancelButton->parentWidget() == this ) {
cancelButton->hide(); // until we resize
} else {
- cancelButton->reparent( this, 0, TQPoint(0,0), FALSE );
+ cancelButton->reparent( this, 0, TQPoint(0,0), false );
}
connect( d->cancel, TQ_SIGNAL(clicked()), this, TQ_SIGNAL(canceled()) );
#ifndef TQT_NO_ACCEL
@@ -512,7 +512,7 @@ void TQProgressDialog::setTotalSteps( int totalSteps )
/*!
Resets the progress dialog.
- The progress dialog becomes hidden if autoClose() is TRUE.
+ The progress dialog becomes hidden if autoClose() is true.
\sa setAutoClose(), setAutoReset()
*/
@@ -528,23 +528,23 @@ void TQProgressDialog::reset()
if ( d->autoClose || d->forceHide )
hide();
bar()->reset();
- d->cancellation_flag = FALSE;
- d->shown_once = FALSE;
+ d->cancellation_flag = false;
+ d->shown_once = false;
forceTimer->stop();
}
/*!
- Resets the progress dialog. wasCanceled() becomes TRUE until
+ Resets the progress dialog. wasCanceled() becomes true until
the progress dialog is reset.
The progress dialog becomes hidden.
*/
void TQProgressDialog::cancel()
{
- d->forceHide = TRUE;
+ d->forceHide = true;
reset();
- d->forceHide = FALSE;
- d->cancellation_flag = TRUE;
+ d->forceHide = false;
+ d->cancellation_flag = true;
}
/*!
@@ -596,7 +596,7 @@ void TQProgressDialog::setProgress( int progress )
bool need_show;
int elapsed = d->starttime.elapsed();
if ( elapsed >= d->showTime ) {
- need_show = TRUE;
+ need_show = true;
} else {
if ( elapsed > minWaitTime ) {
int estimate;
@@ -606,7 +606,7 @@ void TQProgressDialog::setProgress( int progress )
estimate = elapsed * (totalSteps() - progress) / progress;
need_show = estimate >= d->showTime;
} else {
- need_show = FALSE;
+ need_show = false;
}
}
if ( need_show ) {
@@ -614,7 +614,7 @@ void TQProgressDialog::setProgress( int progress )
int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() );
resize( w, h );
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}
}
#ifdef TQ_WS_MACX
@@ -759,7 +759,7 @@ void TQProgressDialog::closeEvent( TQCloseEvent *e )
\property TQProgressDialog::autoReset
\brief whether the progress dialog calls reset() as soon as progress() equals totalSteps()
- The default is TRUE.
+ The default is true.
\sa setAutoClose()
*/
@@ -778,7 +778,7 @@ bool TQProgressDialog::autoReset() const
\property TQProgressDialog::autoClose
\brief whether the dialog gets hidden by reset()
- The default is TRUE.
+ The default is true.
\sa setAutoReset()
*/
@@ -819,7 +819,7 @@ void TQProgressDialog::forceShow()
return;
show();
- d->shown_once = TRUE;
+ d->shown_once = true;
}
diff --git a/src/dialogs/tqprogressdialog.h b/src/dialogs/tqprogressdialog.h
index 628d6de19..6f65a7425 100644
--- a/src/dialogs/tqprogressdialog.h
+++ b/src/dialogs/tqprogressdialog.h
@@ -66,11 +66,11 @@ class TQ_EXPORT TQProgressDialog : public TQDialog
TQ_PROPERTY( TQString labelText READ labelText WRITE setLabelText )
public:
- TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQProgressDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
TQProgressDialog( const TQString& labelText, const TQString &cancelButtonText,
int totalSteps, TQWidget* parent=0, const char* name=0,
- bool modal=FALSE, WFlags f=0 );
+ bool modal=false, WFlags f=0 );
~TQProgressDialog();
void setLabel( TQLabel * );
diff --git a/src/dialogs/tqtabdialog.cpp b/src/dialogs/tqtabdialog.cpp
index b312ccc64..c0ad02698 100644
--- a/src/dialogs/tqtabdialog.cpp
+++ b/src/dialogs/tqtabdialog.cpp
@@ -196,7 +196,7 @@ TQTabDialog::TQTabDialog( TQWidget *parent, const char *name, bool modal,
d->ok = new TQPushButton( this, "ok" );
TQ_CHECK_PTR( d->ok );
d->ok->setText( tr("OK") );
- d->ok->setDefault( TRUE );
+ d->ok->setDefault( true );
connect( d->ok, TQ_SIGNAL(clicked()),
this, TQ_SIGNAL(applyButtonPressed()) );
connect( d->ok, TQ_SIGNAL(clicked()),
@@ -242,8 +242,8 @@ void TQTabDialog::setFont( const TQFont & font )
/*!
- Returns TRUE if the tab dialog has a Defaults button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has a Defaults button; otherwise
+ returns false.
\sa setDefaultButton() defaultButtonPressed() hasApplyButton()
hasCancelButton()
@@ -256,8 +256,8 @@ bool TQTabDialog::hasDefaultButton() const
/*!
- Returns TRUE if the tab dialog has a Help button; otherwise returns
- FALSE.
+ Returns true if the tab dialog has a Help button; otherwise returns
+ false.
\sa setHelpButton() helpButtonPressed() hasApplyButton()
hasCancelButton()
@@ -284,8 +284,8 @@ bool TQTabDialog::hasHelpButton() const
/*!
- Returns TRUE if the tab dialog has a Cancel button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has a Cancel button; otherwise
+ returns false.
\sa setCancelButton() cancelButtonPressed() hasApplyButton()
hasDefaultButton()
@@ -322,8 +322,8 @@ bool TQTabDialog::hasCancelButton() const
/*!
- Returns TRUE if the tab dialog has an Apply button; otherwise
- returns FALSE.
+ Returns true if the tab dialog has an Apply button; otherwise
+ returns false.
\sa setApplyButton() applyButtonPressed() hasCancelButton()
hasDefaultButton()
@@ -336,8 +336,8 @@ bool TQTabDialog::hasApplyButton() const
/*!
- Returns TRUE if the tab dialog has an OK button; otherwise returns
- FALSE.
+ Returns true if the tab dialog has an OK button; otherwise returns
+ false.
\sa setOkButton() hasApplyButton() hasCancelButton()
hasDefaultButton()
@@ -543,11 +543,11 @@ void TQTabDialog::showPage( TQWidget * w )
/*! \obsolete
- Returns TRUE if the page with object name \a name is enabled and
- FALSE if it is disabled.
+ Returns true if the page with object name \a name is enabled and
+ false if it is disabled.
If \a name is 0 or not the name of any of the pages, isTabEnabled()
- returns FALSE.
+ returns false.
\sa setTabEnabled(), TQWidget::isEnabled()
*/
@@ -555,9 +555,9 @@ void TQTabDialog::showPage( TQWidget * w )
bool TQTabDialog::isTabEnabled( const char* name ) const
{
if ( !name )
- return FALSE;
+ return false;
TQObjectList * l
- = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE );
+ = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true );
if ( l && l->first() ) {
TQWidget * w;
while( l->current() ) {
@@ -572,7 +572,7 @@ bool TQTabDialog::isTabEnabled( const char* name ) const
}
}
delete l;
- return FALSE;
+ return false;
}
@@ -600,7 +600,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable )
if ( !name )
return;
TQObjectList * l
- = ((TQTabDialog *)this)->queryList( "TQWidget", name, FALSE, TRUE );
+ = ((TQTabDialog *)this)->queryList( "TQWidget", name, false, true );
if ( l && l->first() ) {
TQObjectListIt it(*l);
TQObject *o;
@@ -632,7 +632,7 @@ void TQTabDialog::setTabEnabled( const char* name, bool enable )
/*!
- Returns TRUE if the page \a w is enabled; otherwise returns FALSE.
+ Returns true if the page \a w is enabled; otherwise returns false.
\sa setTabEnabled(), TQWidget::isEnabled()
*/
@@ -643,7 +643,7 @@ bool TQTabDialog::isTabEnabled( TQWidget* w ) const
}
/*!
- If \a enable is TRUE the page \a w is enabled; otherwise \a w is
+ If \a enable is true the page \a w is enabled; otherwise \a w is
disabled. The page's tab is redrawn appropriately.
TQTabWidget uses TQWidget::setEnabled() internally, rather than keeping a
diff --git a/src/dialogs/tqtabdialog.h b/src/dialogs/tqtabdialog.h
index 61e4287c6..de6d8bc2c 100644
--- a/src/dialogs/tqtabdialog.h
+++ b/src/dialogs/tqtabdialog.h
@@ -56,7 +56,7 @@ class TQ_EXPORT TQTabDialog : public TQDialog
{
TQ_OBJECT
public:
- TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQTabDialog( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQTabDialog();
diff --git a/src/dialogs/tqwizard.cpp b/src/dialogs/tqwizard.cpp
index 78b7431b2..5e2ebaff8 100644
--- a/src/dialogs/tqwizard.cpp
+++ b/src/dialogs/tqwizard.cpp
@@ -112,9 +112,9 @@ public:
struct Page {
Page( TQWidget * widget, const TQString & title ):
w( widget ), t( title ),
- backEnabled( TRUE ), nextEnabled( TRUE ), finishEnabled( FALSE ),
- helpEnabled( TRUE ),
- appropriate( TRUE )
+ backEnabled( true ), nextEnabled( true ), finishEnabled( false ),
+ helpEnabled( true ),
+ appropriate( true )
{}
TQWidget * w;
TQString t;
@@ -168,7 +168,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
d = new TQWizardPrivate();
d->current = 0; // not quite true, but...
d->ws = new TQWidgetStack( this, "qt_widgetstack" );
- d->pages.setAutoDelete( TRUE );
+ d->pages.setAutoDelete( true );
d->title = new TQLabel( this, "title label" );
// create in nice tab order
@@ -190,7 +190,7 @@ TQWizard::TQWizard( TQWidget *parent, const char *name, bool modal,
d->finishButton->setText( tr( "&Finish" ) );
d->helpButton->setText( tr( "&Help" ) );
- d->nextButton->setDefault( TRUE );
+ d->nextButton->setDefault( true );
connect( d->backButton, TQ_SIGNAL(clicked()),
this, TQ_SLOT(back()) );
@@ -273,7 +273,7 @@ void TQWizard::addPage( TQWidget * page, const TQString & title )
int i = d->pages.count();
if( i > 0 )
- d->pages.at( i - 1 )->nextEnabled = TRUE;
+ d->pages.at( i - 1 )->nextEnabled = true;
TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title );
p->backEnabled = ( i > 0 );
@@ -304,7 +304,7 @@ void TQWizard::insertPage( TQWidget * page, const TQString & title, int index )
index = d->pages.count();
if( index > 0 && ( index == (int)d->pages.count() ) )
- d->pages.at( index - 1 )->nextEnabled = TRUE;
+ d->pages.at( index - 1 )->nextEnabled = true;
TQWizardPrivate::Page * p = new TQWizardPrivate::Page( page, title );
p->backEnabled = ( index > 0 );
@@ -337,7 +337,7 @@ void TQWizard::showPage( TQWidget * page )
if ( p ) {
int i;
for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != p; i++ );
- bool notFirst( FALSE );
+ bool notFirst( false );
if( i ) {
i--;
@@ -347,7 +347,7 @@ void TQWizard::showPage( TQWidget * page )
}
}
setBackEnabled( notFirst );
- setNextEnabled( TRUE );
+ setNextEnabled( true );
d->ws->raiseWidget( page );
d->current = p;
}
@@ -486,7 +486,7 @@ void TQWizard::setHelpEnabled( bool enable )
*/
/*!
- If \a enable is TRUE, page \a page has a Back button; otherwise \a
+ If \a enable is true, page \a page has a Back button; otherwise \a
page has no Back button. By default all pages have this button.
*/
void TQWizard::setBackEnabled( TQWidget * page, bool enable )
@@ -501,7 +501,7 @@ void TQWizard::setBackEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Next button; otherwise
+ If \a enable is true, page \a page has a Next button; otherwise
the Next button on \a page is disabled. By default all pages have
this button.
*/
@@ -518,7 +518,7 @@ void TQWizard::setNextEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Finish button; otherwise
+ If \a enable is true, page \a page has a Finish button; otherwise
\a page has no Finish button. By default \e no page has this
button.
*/
@@ -534,7 +534,7 @@ void TQWizard::setFinishEnabled( TQWidget * page, bool enable )
/*!
- If \a enable is TRUE, page \a page has a Help button; otherwise \a
+ If \a enable is true, page \a page has a Help button; otherwise \a
page has no Help button. By default all pages have this button.
*/
void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
@@ -550,10 +550,10 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
/*!
Called when the Next button is clicked; this virtual function
- returns TRUE if \a page is relevant for display in the current
- context; otherwise it is ignored by TQWizard and returns FALSE. The
+ returns true if \a page is relevant for display in the current
+ context; otherwise it is ignored by TQWizard and returns false. The
default implementation returns the value set using
- setAppropriate(). The ultimate default is TRUE.
+ setAppropriate(). The ultimate default is true.
\warning The last page of the wizard will be displayed if no page
is relevant in the current context.
@@ -562,12 +562,12 @@ void TQWizard::setHelpEnabled( TQWidget * page, bool enable )
bool TQWizard::appropriate( TQWidget * page ) const
{
TQWizardPrivate::Page * p = d->page( page );
- return p ? p->appropriate : TRUE;
+ return p ? p->appropriate : true;
}
/*!
- If \a appropriate is TRUE then page \a page is considered relevant
+ If \a appropriate is true then page \a page is considered relevant
in the current context and should be displayed in the page
sequence; otherwise \a page should not be displayed in the page
sequence.
@@ -589,7 +589,7 @@ void TQWizard::updateButtons()
int i;
for( i = 0; i < (int)d->pages.count() && d->pages.at( i ) != d->current; i++ );
- bool notFirst( FALSE );
+ bool notFirst( false );
if( i ) {
i--;
while( ( i >= 0 ) && !notFirst ) {
@@ -736,19 +736,19 @@ TQPushButton * TQWizard::helpButton() const
void TQWizard::layOutButtonRow( TQHBoxLayout * layout )
{
- bool hasHelp = FALSE;
- bool hasEarlyFinish = FALSE;
+ bool hasHelp = false;
+ bool hasEarlyFinish = false;
int i = d->pages.count() - 2;
while ( !hasEarlyFinish && i >= 0 ) {
if ( d->pages.at( i ) && d->pages.at( i )->finishEnabled )
- hasEarlyFinish = TRUE;
+ hasEarlyFinish = true;
i--;
}
i = 0;
while ( !hasHelp && i < (int)d->pages.count() ) {
if ( d->pages.at( i ) && d->pages.at( i )->helpEnabled )
- hasHelp = TRUE;
+ hasHelp = true;
i++;
}
@@ -767,7 +767,7 @@ void TQWizard::layOutButtonRow( TQHBoxLayout * layout )
h->addSpacing( 6 );
if (d->current == d->pages.at( d->pages.count()-1 ))
- hasEarlyFinish = FALSE;
+ hasEarlyFinish = false;
if ( hasEarlyFinish ) {
d->nextButton->show();
diff --git a/src/dialogs/tqwizard.h b/src/dialogs/tqwizard.h
index c680e2860..b9bb060f1 100644
--- a/src/dialogs/tqwizard.h
+++ b/src/dialogs/tqwizard.h
@@ -57,7 +57,7 @@ class TQ_EXPORT TQWizard : public TQDialog
TQ_PROPERTY( TQFont titleFont READ titleFont WRITE setTitleFont )
public:
- TQWizard( TQWidget* parent=0, const char* name=0, bool modal=FALSE,
+ TQWizard( TQWidget* parent=0, const char* name=0, bool modal=false,
WFlags f=0 );
~TQWizard();
diff --git a/src/network/tqdns.cpp b/src/network/tqdns.cpp
index fa248533c..b44f43433 100644
--- a/src/network/tqdns.cpp
+++ b/src/network/tqdns.cpp
@@ -109,7 +109,7 @@ static TQ_UINT32 now()
static TQPtrList<TQHostAddress> * ns = 0;
static TQStrList * domains = 0;
-static bool ipv6support = FALSE;
+static bool ipv6support = false;
#if defined(Q_MODERN_RES_API)
#else
@@ -135,13 +135,13 @@ static int tqdns_res_init()
class TQDnsPrivate {
public:
- TQDnsPrivate() : queryTimer( 0 ), noNames(FALSE)
+ TQDnsPrivate() : queryTimer( 0 ), noNames(false)
{
#if defined(Q_DNS_SYNCHRONOUS)
#if defined(Q_OS_UNIX)
noEventLoop = tqApp==0 || tqApp->loopLevel()==0;
#else
- noEventLoop = FALSE;
+ noEventLoop = false;
#endif
#endif
}
@@ -267,7 +267,7 @@ private:
TQString label;
TQDnsRR * rr;
- TQString readString(bool multipleLabels = TRUE);
+ TQString readString(bool multipleLabels = true);
void parseA();
void parseAaaa();
void parseMx();
@@ -281,7 +281,7 @@ private:
TQDnsRR::TQDnsRR( const TQString & label )
: domain( 0 ), t( TQDns::None ),
- nxdomain( FALSE ), current( FALSE ),
+ nxdomain( false ), current( false ),
expireTime( 0 ), deleteTime( 0 ),
priority( 0 ), weight( 0 ), port( 0 )
{
@@ -299,14 +299,14 @@ TQDnsRR::~TQDnsRR()
// this one just sticks in a NXDomain
TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
{
- ok = TRUE;
+ ok = true;
answer = 0;
size = 0;
query = query_;
pp = 0;
rrs = new TQPtrList<TQDnsRR>;
- rrs->setAutoDelete( FALSE );
+ rrs->setAutoDelete( false );
next = size;
ttl = 0;
label = TQString::null;
@@ -316,8 +316,8 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
newrr->t = query->t;
newrr->deleteTime = query->started + 10;
newrr->expireTime = query->started + 10;
- newrr->nxdomain = TRUE;
- newrr->current = TRUE;
+ newrr->nxdomain = true;
+ newrr->current = true;
rrs->append( newrr );
}
@@ -325,14 +325,14 @@ TQDnsAnswer::TQDnsAnswer( TQDnsQuery * query_ )
TQDnsAnswer::TQDnsAnswer( const TQByteArray& answer_,
TQDnsQuery * query_ )
{
- ok = TRUE;
+ ok = true;
answer = (TQ_UINT8 *)(answer_.data());
size = (int)answer_.size();
query = query_;
pp = 0;
rrs = new TQPtrList<TQDnsRR>;
- rrs->setAutoDelete( FALSE );
+ rrs->setAutoDelete( false );
next = size;
ttl = 0;
label = TQString::null;
@@ -408,7 +408,7 @@ TQString TQDnsAnswer::readString(bool multipleLabels)
}
}
not_ok:
- ok = FALSE;
+ ok = false;
return TQString::null;
}
@@ -577,7 +577,7 @@ void TQDnsAnswer::parsePtr()
void TQDnsAnswer::parseTxt()
{
- TQString text = readString(FALSE);
+ TQString text = readString(false);
if ( !ok ) {
#if defined(TQDNS_DEBUG)
tqDebug( "TQDns: saw bad TXT for for %s", label.ascii() );
@@ -602,7 +602,7 @@ void TQDnsAnswer::parse()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: answer to wrong query type (%d)", answer[1] );
#endif
- ok = FALSE;
+ ok = false;
return;
}
@@ -631,8 +631,8 @@ void TQDnsAnswer::parse()
rr->t = query->t;
rr->deleteTime = query->started + 60;
rr->expireTime = query->started + 60;
- rr->nxdomain = TRUE;
- rr->current = TRUE;
+ rr->nxdomain = true;
+ rr->current = true;
rrs->append( rr );
return;
}
@@ -641,7 +641,7 @@ void TQDnsAnswer::parse()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: error code %d", answer[3] & 0x0f );
#endif
- ok = FALSE;
+ ok = false;
return;
}
@@ -745,7 +745,7 @@ void TQDnsAnswer::parse()
answers++;
rr->deleteTime = rr->expireTime;
}
- rr->current = TRUE;
+ rr->current = true;
rrs->append( rr );
}
}
@@ -766,7 +766,7 @@ void TQDnsAnswer::parse()
// by something we care about. we want to cache such As.
rrs->first();
TQDict<void> used( 17 );
- used.setAutoDelete( FALSE );
+ used.setAutoDelete( false );
while( (rr=rrs->current()) != 0 ) {
rrs->next();
if ( rr->target.length() && rr->deleteTime > 0 && rr->current )
@@ -822,7 +822,7 @@ void TQDnsAnswer::parse()
class TQDnsUgleHack: public TQDns {
public:
- void ugle( bool emitAnyway=FALSE );
+ void ugle( bool emitAnyway=false );
};
@@ -832,7 +832,7 @@ void TQDnsAnswer::notify()
return;
TQPtrDict<void> notified;
- notified.setAutoDelete( FALSE );
+ notified.setAutoDelete( false );
TQPtrDictIterator<void> it( *query->dns );
TQDns * dns;
@@ -845,8 +845,8 @@ void TQDnsAnswer::notify()
#if defined(TQDNS_DEBUG)
tqDebug( "DNS Manager: found no answers!" );
#endif
- dns->d->noNames = TRUE;
- ((TQDnsUgleHack*)dns)->ugle( TRUE );
+ dns->d->noNames = true;
+ ((TQDnsUgleHack*)dns)->ugle( true );
} else {
TQStringList n = dns->qualifiedNames();
if ( query && n.contains(query->l) )
@@ -931,13 +931,13 @@ void TQDnsUgleHack::ugle( bool emitAnyway)
TQDnsManager::TQDnsManager()
: TQDnsSocket( tqApp, "Internal DNS manager" ),
queries( TQPtrVector<TQDnsQuery>( 0 ) ),
- cache( TQDict<TQDnsDomain>( 83, FALSE ) ),
+ cache( TQDict<TQDnsDomain>( 83, false ) ),
ipv4Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv4, 0 ) )
#if !defined (TQT_NO_IPV6)
, ipv6Socket( new TQSocketDevice( TQSocketDevice::Datagram, TQSocketDevice::IPv6, 0 ) )
#endif
{
- cache.setAutoDelete( TRUE );
+ cache.setAutoDelete( true );
globalManager = this;
TQTimer * sweepTimer = new TQTimer( this );
@@ -948,8 +948,8 @@ TQDnsManager::TQDnsManager()
TQSocketNotifier * rn4 = new TQSocketNotifier( ipv4Socket->socket(),
TQSocketNotifier::Read,
this, "dns IPv4 socket watcher" );
- ipv4Socket->setAddressReusable( FALSE );
- ipv4Socket->setBlocking( FALSE );
+ ipv4Socket->setAddressReusable( false );
+ ipv4Socket->setBlocking( false );
connect( rn4, TQ_SIGNAL(activated(int)), TQ_SLOT(answer()) );
#if !defined (TQT_NO_IPV6)
@@ -960,9 +960,9 @@ TQDnsManager::TQDnsManager()
TQSocketNotifier::Read,
this, "dns IPv6 socket watcher" );
- ipv6support = TRUE;
- ipv6Socket->setAddressReusable( FALSE );
- ipv6Socket->setBlocking( FALSE );
+ ipv6support = true;
+ ipv6Socket->setAddressReusable( false );
+ ipv6Socket->setBlocking( false );
connect( rn6, TQ_SIGNAL(activated(int)), TQ_SLOT(answer()) );
}
#endif
@@ -994,9 +994,9 @@ TQDnsManager::TQDnsManager()
delete ::ns;
::ns = ns;
- ::ns->setAutoDelete( TRUE );
+ ::ns->setAutoDelete( true );
- TQStrList * domains = new TQStrList( TRUE );
+ TQStrList * domains = new TQStrList( true );
::domains->first();
const char * s;
@@ -1017,7 +1017,7 @@ TQDnsManager::TQDnsManager()
delete ::domains;
::domains = domains;
- ::domains->setAutoDelete( TRUE );
+ ::domains->setAutoDelete( true );
}
@@ -1025,8 +1025,8 @@ TQDnsManager::~TQDnsManager()
{
if ( globalManager )
globalManager = 0;
- queries.setAutoDelete( TRUE );
- cache.setAutoDelete( TRUE );
+ queries.setAutoDelete( true );
+ cache.setAutoDelete( true );
delete ipv4Socket;
#if !defined (TQT_NO_IPV6)
delete ipv6Socket;
@@ -1037,7 +1037,7 @@ static TQ_UINT32 lastSweep = 0;
void TQDnsManager::cleanCache()
{
- bool again = FALSE;
+ bool again = false;
TQDictIterator<TQDnsDomain> it( cache );
TQDnsDomain * d;
TQ_UINT32 thisSweep = now();
@@ -1305,7 +1305,7 @@ void TQDnsManager::transmitQuery( int i )
// seconds. the graph becomes steep around that point, and the
// number of errors rises... so it seems good to retry at that
// point.
- q->start( q->step < ns->count() ? 800 : 1500, TRUE );
+ q->start( q->step < ns->count() ? 800 : 1500, true );
}
@@ -1350,7 +1350,7 @@ void TQDnsDomain::add( const TQString & label, TQDnsRR * rr )
TQDnsDomain * d = TQDnsManager::manager()->domain( label );
if ( !d->rrs ) {
d->rrs = new TQPtrList<TQDnsRR>;
- d->rrs->setAutoDelete( TRUE );
+ d->rrs->setAutoDelete( true );
}
d->rrs->append( rr );
rr->domain = d;
@@ -1370,7 +1370,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
TQDnsRR *rrTmp = new TQDnsRR( r->label() );
rrTmp->t = TQDns::A;
rrTmp->address = TQHostAddress( 0x7f000001 );
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
return l;
}
@@ -1380,10 +1380,10 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( tmp.isIPv4Address() ) {
rrTmp->t = TQDns::A;
rrTmp->address = tmp;
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
} else {
- rrTmp->nxdomain = TRUE;
+ rrTmp->nxdomain = true;
}
return l;
}
@@ -1395,10 +1395,10 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( tmp.isIPv6Address() ) {
rrTmp->t = TQDns::Aaaa;
rrTmp->address = tmp;
- rrTmp->current = TRUE;
+ rrTmp->current = true;
l->append( rrTmp );
} else {
- rrTmp->nxdomain = TRUE;
+ rrTmp->nxdomain = true;
}
return l;
}
@@ -1413,7 +1413,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
int cnamecount = 0;
while( it != end ) {
TQString s = *it++;
- nxdomain = FALSE;
+ nxdomain = false;
#if defined(TQDNS_DEBUG)
tqDebug( "looking at cache for %s (%s %d)",
s.ascii(), r->label().ascii(), r->recordType() );
@@ -1425,7 +1425,7 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
if ( d->rrs )
d->rrs->first();
TQDnsRR * rr;
- bool answer = FALSE;
+ bool answer = false;
while( d->rrs && (rr=d->rrs->current()) != 0 ) {
if ( rr->t == TQDns::Cname && r->recordType() != TQDns::Cname &&
!rr->nxdomain && cnamecount < 16 ) {
@@ -1448,9 +1448,9 @@ TQPtrList<TQDnsRR> * TQDnsDomain::cached( const TQDns * r )
} else {
if ( rr->t == r->recordType() ) {
if ( rr->nxdomain )
- nxdomain = TRUE;
+ nxdomain = true;
else
- answer = TRUE;
+ answer = true;
l->append( rr );
if ( rr->deleteTime <= lastSweep ) {
// we're returning something that'll be
@@ -1551,7 +1551,7 @@ void TQDnsDomain::sweep( TQ_UINT32 thisSweep )
rr->expireTime, rr->deleteTime,
rr->target.latin1(), rr->address.toString().latin1());
#endif
- if ( rr->current == FALSE ||
+ if ( rr->current == false ||
rr->t == TQDns::None ||
rr->deleteTime <= thisSweep ||
rr->expireTime <= thisSweep )
@@ -1746,7 +1746,7 @@ TQDns::~TQDns()
void TQDns::setLabel( const TQString & label )
{
l = label;
- d->noNames = FALSE;
+ d->noNames = false;
// construct a list of qualified names
n.clear();
@@ -1877,7 +1877,7 @@ void TQDns::setLabel( const TQHostAddress & address )
void TQDns::setRecordType( RecordType rr )
{
t = rr;
- d->noNames = FALSE;
+ d->noNames = false;
setStartQueryTimer(); // start query the next time we enter event loop
}
@@ -1910,7 +1910,7 @@ void TQDns::setStartQueryTimer()
d->queryTimer = new TQTimer( this );
connect( d->queryTimer, TQ_SIGNAL(timeout()),
this, TQ_SLOT(startQuery()) );
- d->queryTimer->start( 0, TRUE );
+ d->queryTimer->start( 0, true );
}
}
@@ -1962,11 +1962,11 @@ TQString TQDns::toInAddrArpaDomain( const TQHostAddress &address )
*/
/*!
- Returns TRUE if TQDns is doing a lookup for this object (i.e. if it
+ Returns true if TQDns is doing a lookup for this object (i.e. if it
does not already have the necessary information); otherwise
- returns FALSE.
+ returns false.
- TQDns emits the resultsReady() signal when the status changes to FALSE.
+ TQDns emits the resultsReady() signal when the status changes to false.
*/
bool TQDns::isWorking() const
@@ -1975,11 +1975,11 @@ bool TQDns::isWorking() const
tqDebug( "TQDns::isWorking (%s, %d)", l.ascii(), t );
#endif
if ( t == None )
- return FALSE;
+ return false;
#if defined(Q_DNS_SYNCHRONOUS)
if ( d->noEventLoop )
- return TRUE;
+ return true;
#endif
TQPtrList<TQDnsRR> * ll = TQDnsDomain::cached( this );
@@ -1989,17 +1989,17 @@ bool TQDns::isWorking() const
queries--;
} else {
delete ll;
- return FALSE;
+ return false;
}
ll->next();
}
delete ll;
if ( queries <= 0 )
- return FALSE;
+ return false;
if ( d->noNames )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
@@ -2392,13 +2392,13 @@ void TQDns::doResInit()
if ( ns )
delete ns;
ns = new TQPtrList<TQHostAddress>;
- ns->setAutoDelete( TRUE );
- domains = new TQStrList( TRUE );
- domains->setAutoDelete( TRUE );
+ ns->setAutoDelete( true );
+ domains = new TQStrList( true );
+ domains->setAutoDelete( true );
TQString domainName, nameServer, searchList;
- bool gotNetworkParams = FALSE;
+ bool gotNetworkParams = false;
// try the API call GetNetworkParams() first and use registry lookup only
// as a fallback
#ifdef Q_OS_TEMP
@@ -2431,7 +2431,7 @@ void TQDns::doResInit()
}
searchList = "";
separator = ' ';
- gotNetworkParams = TRUE;
+ gotNetworkParams = true;
}
delete[] finfo;
}
@@ -2551,9 +2551,9 @@ void TQDns::doResInit()
if ( ns )
return;
ns = new TQPtrList<TQHostAddress>;
- ns->setAutoDelete( TRUE );
- domains = new TQStrList( TRUE );
- domains->setAutoDelete( TRUE );
+ ns->setAutoDelete( true );
+ domains = new TQStrList( true );
+ domains->setAutoDelete( true );
// read resolv.conf manually.
TQFile resolvConf("/etc/resolv.conf");
@@ -2659,7 +2659,7 @@ void TQDns::doResInit()
TQHostAddress a;
a.setAddress( ip );
if ( ( a.isIPv4Address() || a.isIPv6Address() ) && !a.isNull() ) {
- bool first = TRUE;
+ bool first = true;
line = line.mid( n+1 );
n = 0;
while( n < line.length() && !line[(int)n].isSpace() )
@@ -2675,15 +2675,15 @@ void TQDns::doResInit()
rr->address = a;
rr->deleteTime = UINT_MAX;
rr->expireTime = UINT_MAX;
- rr->current = TRUE;
+ rr->current = true;
if ( first ) {
- first = FALSE;
+ first = false;
TQDnsRR * ptr = new TQDnsRR( TQDns::toInAddrArpaDomain( a ) );
ptr->t = TQDns::Ptr;
ptr->target = hostname;
ptr->deleteTime = UINT_MAX;
ptr->expireTime = UINT_MAX;
- ptr->current = TRUE;
+ ptr->current = true;
}
}
}
diff --git a/src/network/tqftp.cpp b/src/network/tqftp.cpp
index 8c7dbb184..93bdfc6fb 100644
--- a/src/network/tqftp.cpp
+++ b/src/network/tqftp.cpp
@@ -136,7 +136,7 @@ private slots:
private:
void clearData()
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = 0;
}
@@ -147,7 +147,7 @@ private:
int bytesTotal;
bool callWriteData;
- // If is_ba is TRUE, ba is used; ba is never 0.
+ // If is_ba is true, ba is used; ba is never 0.
// Otherwise dev is used; dev can be 0 or not.
union {
TQByteArray *ba;
@@ -244,7 +244,7 @@ public:
TQFtp::Command command;
TQStringList rawCmds;
- // If is_ba is TRUE, ba is used; ba is never 0.
+ // If is_ba is true, ba is used; ba is never 0.
// Otherwise dev is used; dev can be 0 or not.
union {
TQByteArray *ba;
@@ -258,21 +258,21 @@ public:
int TQFtpCommand::idCounter = 0;
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw )
- : command(cmd), rawCmds(raw), is_ba(FALSE)
+ : command(cmd), rawCmds(raw), is_ba(false)
{
id = ++idCounter;
data.dev = 0;
}
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw, const TQByteArray &ba )
- : command(cmd), rawCmds(raw), is_ba(TRUE)
+ : command(cmd), rawCmds(raw), is_ba(true)
{
id = ++idCounter;
data.ba = new TQByteArray( ba );
}
TQFtpCommand::TQFtpCommand( TQFtp::Command cmd, TQStringList raw, TQIODevice *dev )
- : command(cmd), rawCmds(raw), is_ba(FALSE)
+ : command(cmd), rawCmds(raw), is_ba(false)
{
id = ++idCounter;
data.dev = dev;
@@ -293,7 +293,7 @@ TQFtpDTP::TQFtpDTP( TQFtpPI *p, TQObject *parent, const char *name ) :
TQObject( parent, name ),
socket( 0, "TQFtpDTP_socket" ),
pi( p ),
- callWriteData( FALSE )
+ callWriteData( false )
{
clearData();
@@ -311,13 +311,13 @@ TQFtpDTP::TQFtpDTP( TQFtpPI *p, TQObject *parent, const char *name ) :
void TQFtpDTP::setData( TQByteArray *ba )
{
- is_ba = TRUE;
+ is_ba = true;
data.ba = ba;
}
void TQFtpDTP::setDevice( TQIODevice *dev )
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = dev;
}
@@ -334,7 +334,7 @@ void TQFtpDTP::writeData()
socket.close();
clearData();
} else if ( data.dev ) {
- callWriteData = FALSE;
+ callWriteData = false;
const int blockSize = 16*1024;
char buf[blockSize];
while ( !data.dev->atEnd() && socket.bytesToWrite()==0 ) {
@@ -352,7 +352,7 @@ void TQFtpDTP::writeData()
socket.close();
clearData();
} else {
- callWriteData = TRUE;
+ callWriteData = true;
}
}
}
@@ -377,7 +377,7 @@ void TQFtpDTP::abortConnection()
#if defined(TQFTPDTP_DEBUG)
tqDebug( "TQFtpDTP::abortConnection" );
#endif
- callWriteData = FALSE;
+ callWriteData = false;
clearData();
socket.clearPendingData();
@@ -389,7 +389,7 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
TQStringList lst = TQStringList::split( " ", buffer );
if ( lst.count() < 9 )
- return FALSE;
+ return false;
TQString tmp;
@@ -397,19 +397,19 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
tmp = lst[ 0 ];
if ( tmp[ 0 ] == TQChar( 'd' ) ) {
- info->setDir( TRUE );
- info->setFile( FALSE );
- info->setSymLink( FALSE );
+ info->setDir( true );
+ info->setFile( false );
+ info->setSymLink( false );
} else if ( tmp[ 0 ] == TQChar( '-' ) ) {
- info->setDir( FALSE );
- info->setFile( TRUE );
- info->setSymLink( FALSE );
+ info->setDir( false );
+ info->setFile( true );
+ info->setSymLink( false );
} else if ( tmp[ 0 ] == TQChar( 'l' ) ) {
- info->setDir( TRUE ); // #### todo
- info->setFile( FALSE );
- info->setSymLink( TRUE );
+ info->setDir( true ); // #### todo
+ info->setFile( false );
+ info->setSymLink( true );
} else {
- return FALSE;
+ return false;
}
static int user = 0;
@@ -510,7 +510,7 @@ bool TQFtpDTP::parseDir( const TQString &buffer, const TQString &userName, TQUrl
n = n.stripWhiteSpace();
info->setName( n );
}
- return TRUE;
+ return true;
}
void TQFtpDTP::socketConnected()
@@ -627,13 +627,13 @@ void TQFtpDTP::socketBytesWritten( int bytes )
*********************************************************************/
TQFtpPI::TQFtpPI( TQObject *parent ) :
TQObject( parent ),
- rawCommand(FALSE),
+ rawCommand(false),
dtp( this ),
commandSocket( 0, "TQFtpPI_socket" ),
state( Begin ), abortState( None ),
currentCmd( TQString::null ),
- waitForDtpToConnect( FALSE ),
- waitForDtpToClose( FALSE )
+ waitForDtpToConnect( false ),
+ waitForDtpToClose( false )
{
connect( &commandSocket, TQ_SIGNAL(hostFound()),
TQ_SLOT(hostFound()) );
@@ -663,22 +663,22 @@ void TQFtpPI::connectToHost( const TQString &host, TQ_UINT16 port )
are all done the finished() signal is emitted. When an error occurs, the
error() signal is emitted.
- If there are pending commands in the queue this functions returns FALSE and
- the \a cmds are not added to the queue; otherwise it returns TRUE.
+ If there are pending commands in the queue this functions returns false and
+ the \a cmds are not added to the queue; otherwise it returns true.
*/
bool TQFtpPI::sendCommands( const TQStringList &cmds )
{
if ( !pendingCommands.isEmpty() )
- return FALSE;
+ return false;
if ( commandSocket.state()!=TQSocket::Connected || state!=Idle ) {
emit error( TQFtp::NotConnected, TQFtp::tr( "Not connected" ) );
- return TRUE; // there are no pending commands
+ return true; // there are no pending commands
}
pendingCommands = cmds;
startNextCmd();
- return TRUE;
+ return true;
}
void TQFtpPI::clearPendingCommands()
@@ -799,7 +799,7 @@ void TQFtpPI::readyRead()
/*
Process a reply from the FTP server.
- Returns TRUE if the reply was processed or FALSE if the reply has to be
+ Returns true if the reply was processed or false if the reply has to be
processed at a later point.
*/
bool TQFtpPI::processReply()
@@ -816,8 +816,8 @@ bool TQFtpPI::processReply()
// connection is really closed to avoid short reads of the DTP
if ( 100*replyCode[0]+10*replyCode[1]+replyCode[2] == 226 ) {
if ( dtp.socketState() != TQSocket::Idle ) {
- waitForDtpToClose = TRUE;
- return FALSE;
+ waitForDtpToClose = true;
+ return false;
}
}
@@ -827,7 +827,7 @@ bool TQFtpPI::processReply()
break;
case WaitForAbortToFinish:
abortState = None;
- return TRUE;
+ return true;
default:
break;
}
@@ -840,14 +840,14 @@ bool TQFtpPI::processReply()
switch ( state ) {
case Begin:
if ( replyCode[0] == 1 ) {
- return TRUE;
+ return true;
} else if ( replyCode[0] == 2 ) {
state = Idle;
emit finished( TQFtp::tr( "Connected to host %1" ).arg( commandSocket.peerName() ) );
break;
}
// ### error handling
- return TRUE;
+ return true;
case Waiting:
if ( replyCode[0]<0 || replyCode[0]>5 )
state = Failure;
@@ -856,7 +856,7 @@ bool TQFtpPI::processReply()
break;
default:
// ### spontaneous message
- return TRUE;
+ return true;
}
#if defined(TQFTPPI_DEBUG)
// tqDebug( "TQFtpPI state: %d [processReply() intermediate]", state );
@@ -866,7 +866,7 @@ bool TQFtpPI::processReply()
int replyCodeInt = 100*replyCode[0] + 10*replyCode[1] + replyCode[2];
emit rawFtpReply( replyCodeInt, replyText );
if ( rawCommand ) {
- rawCommand = FALSE;
+ rawCommand = false;
} else if ( replyCodeInt == 227 ) {
// 227 Entering Passive Mode (h1,h2,h3,h4,p1,p2)
// rfc959 does not define this response precisely, and gives
@@ -883,7 +883,7 @@ bool TQFtpPI::processReply()
TQStringList lst = addrPortPattern.capturedTexts();
TQString host = lst[1] + "." + lst[2] + "." + lst[3] + "." + lst[4];
TQ_UINT16 port = ( lst[5].toUInt() << 8 ) + lst[6].toUInt();
- waitForDtpToConnect = TRUE;
+ waitForDtpToConnect = true;
dtp.connectToHost( host, port );
}
} else if ( replyCodeInt == 230 ) {
@@ -930,7 +930,7 @@ bool TQFtpPI::processReply()
#if defined(TQFTPPI_DEBUG)
// tqDebug( "TQFtpPI state: %d [processReply() end]", state );
#endif
- return TRUE;
+ return true;
}
#ifndef TQT_NO_TEXTCODEC
@@ -938,14 +938,14 @@ TQM_EXPORT_FTP TQTextCodec *tqt_ftp_filename_codec = 0;
#endif
/*
- Starts next pending command. Returns FALSE if there are no pending commands,
- otherwise it returns TRUE.
+ Starts next pending command. Returns false if there are no pending commands,
+ otherwise it returns true.
*/
bool TQFtpPI::startNextCmd()
{
if ( waitForDtpToConnect )
// don't process any new commands until we are connected
- return TRUE;
+ return true;
#if defined(TQFTPPI_DEBUG)
if ( state != Idle )
@@ -954,7 +954,7 @@ bool TQFtpPI::startNextCmd()
if ( pendingCommands.isEmpty() ) {
currentCmd = TQString::null;
emit finished( replyText );
- return FALSE;
+ return false;
}
currentCmd = pendingCommands.first();
pendingCommands.pop_front();
@@ -972,7 +972,7 @@ bool TQFtpPI::startNextCmd()
{
commandSocket.writeBlock( currentCmd.latin1(), currentCmd.length() );
}
- return TRUE;
+ return true;
}
void TQFtpPI::dtpConnectState( int s )
@@ -986,11 +986,11 @@ void TQFtpPI::dtpConnectState( int s )
else
return;
}
- waitForDtpToClose = FALSE;
+ waitForDtpToClose = false;
readyRead();
return;
case TQFtpDTP::CsConnected:
- waitForDtpToConnect = FALSE;
+ waitForDtpToConnect = false;
startNextCmd();
return;
case TQFtpDTP::CsHostNotFound:
@@ -1013,11 +1013,11 @@ class TQFtpPrivate
{
public:
TQFtpPrivate() :
- close_waitForStateChange(FALSE),
+ close_waitForStateChange(false),
state( TQFtp::Unconnected ),
error( TQFtp::NoError ),
- npWaitForLoginDone( FALSE )
- { pending.setAutoDelete( TRUE ); }
+ npWaitForLoginDone( false )
+ { pending.setAutoDelete( true ); }
TQFtpPI pi;
TQPtrList<TQFtpCommand> pending;
@@ -1039,7 +1039,7 @@ static TQFtpPrivate* d( const TQFtp* foo )
{
if ( !d_ptr ) {
d_ptr = new TQPtrDict<TQFtpPrivate>;
- d_ptr->setAutoDelete( TRUE );
+ d_ptr->setAutoDelete( true );
tqAddPostRoutine( cleanup_d_ptr );
}
TQFtpPrivate* ret = d_ptr->find( (void*)foo );
@@ -1158,14 +1158,14 @@ static void delete_d( const TQFtp* foo )
stateChanged( HostLookup )
stateChanged( Connecting )
stateChanged( Connected )
- finished( 1, FALSE )
+ finished( 1, false )
start( 2 )
stateChanged( LoggedIn )
- finished( 2, FALSE )
+ finished( 2, false )
start( 3 )
- finished( 3, FALSE )
+ finished( 3, false )
start( 4 )
dataTransferProgress( 0, 3798 )
@@ -1173,14 +1173,14 @@ static void delete_d( const TQFtp* foo )
readyRead()
dataTransferProgress( 3798, 3798 )
readyRead()
- finished( 4, FALSE )
+ finished( 4, false )
start( 5 )
stateChanged( Closing )
stateChanged( Unconnected )
- finished( 5, FALSE )
+ finished( 5, false )
- done( FALSE )
+ done( false )
\endcode
The dataTransferProgress() signal in the above example is useful
@@ -1199,12 +1199,12 @@ static void delete_d( const TQFtp* foo )
stateChanged( HostLookup )
stateChanged( Connecting )
stateChanged( Connected )
- finished( 1, FALSE )
+ finished( 1, false )
start( 2 )
- finished( 2, TRUE )
+ finished( 2, true )
- done( TRUE )
+ done( true )
\endcode
You can then get details about the error with the error() and
@@ -1361,8 +1361,8 @@ void TQFtp::init()
\fn void TQFtp::commandFinished( int id, bool error )
This signal is emitted when processing the command identified by
- \a id has finished. \a error is TRUE if an error occurred during
- the processing; otherwise \a error is FALSE.
+ \a id has finished. \a error is true if an error occurred during
+ the processing; otherwise \a error is false.
\sa commandStarted() done() error() errorString()
*/
@@ -1372,8 +1372,8 @@ void TQFtp::init()
This signal is emitted when the last pending command has finished;
(it is emitted after the last command's commandFinished() signal).
- \a error is TRUE if an error occurred during the processing;
- otherwise \a error is FALSE.
+ \a error is true if an error occurred during the processing;
+ otherwise \a error is false.
\sa commandFinished() error() errorString()
*/
@@ -1797,11 +1797,11 @@ TQByteArray TQFtp::readAll()
commandFinished() signal has not been emitted), this function
sends an \c ABORT command to the server. When the server replies
that the command is aborted, the commandFinished() signal with the
- \c error argument set to \c TRUE is emitted for the command. Due
+ \c error argument set to \c true is emitted for the command. Due
to timing issues, it is possible that the command had already
finished before the abort request reached the server, in which
case, the commandFinished() signal is emitted with the \c error
- argument set to \c FALSE.
+ argument set to \c false.
For all other commands that are affected by the abort(), no
signals are emitted.
@@ -1813,7 +1813,7 @@ TQByteArray TQFtp::readAll()
\warning Some FTP servers, for example the BSD FTP daemon (version
0.3), wrongly return a positive reply even when an abort has
occurred. For these servers the commandFinished() signal has its
- error flag set to \c FALSE, even though the command did not
+ error flag set to \c false, even though the command did not
complete successfully.
\sa clearPendingCommands()
@@ -1880,8 +1880,8 @@ TQIODevice* TQFtp::currentDevice() const
}
/*!
- Returns TRUE if there are any commands scheduled that have not yet
- been executed; otherwise returns FALSE.
+ Returns true if there are any commands scheduled that have not yet
+ been executed; otherwise returns false.
The command that is being executed is \e not considered as a
scheduled command.
@@ -1927,7 +1927,7 @@ TQFtp::State TQFtp::state() const
/*!
Returns the last error that occurred. This is useful to find out
what when wrong when receiving a commandFinished() or a done()
- signal with the \c error argument set to \c TRUE.
+ signal with the \c error argument set to \c true.
If you start a new command, the error status is reset to \c NoError.
*/
@@ -1941,7 +1941,7 @@ TQFtp::Error TQFtp::error() const
Returns a human-readable description of the last error that
occurred. This is useful for presenting a error message to the
user when receiving a commandFinished() or a done() signal with
- the \c error argument set to \c TRUE.
+ the \c error argument set to \c true.
The error string is often (but not always) the reply from the
server, so it is not always possible to translate the string. If
@@ -2022,15 +2022,15 @@ void TQFtp::piFinished( const TQString& )
// don't get the commandFinished() signal before the stateChanged()
// signal.
if ( d->state != TQFtp::Unconnected ) {
- d->close_waitForStateChange = TRUE;
+ d->close_waitForStateChange = true;
return;
}
}
- emit commandFinished( c->id, FALSE );
+ emit commandFinished( c->id, false );
d->pending.removeFirst();
if ( d->pending.isEmpty() ) {
- emit done( FALSE );
+ emit done( false );
} else {
startNextCommand();
}
@@ -2085,11 +2085,11 @@ void TQFtp::piError( int errorCode, const TQString &text )
d->pi.clearPendingCommands();
clearPendingCommands();
- emit commandFinished( c->id, TRUE );
+ emit commandFinished( c->id, true );
d->pending.removeFirst();
if ( d->pending.isEmpty() )
- emit done( TRUE );
+ emit done( true );
else
startNextCommand();
}
@@ -2100,7 +2100,7 @@ void TQFtp::piConnectState( int state )
d->state = (State)state;
emit stateChanged( d->state );
if ( d->close_waitForStateChange ) {
- d->close_waitForStateChange = FALSE;
+ d->close_waitForStateChange = false;
piFinished( tr( "Connection closed" ) );
}
}
@@ -2109,7 +2109,7 @@ void TQFtp::piFtpReply( int code, const TQString &text )
{
if ( currentCommand() == RawCommand ) {
TQFtpPrivate *d = ::d( this );
- d->pi.rawCommand = TRUE;
+ d->pi.rawCommand = true;
emit rawCommandReply( code, text );
}
}
@@ -2206,7 +2206,7 @@ bool TQFtp::checkConnection( TQNetworkOperation *op )
connect( this, TQ_SIGNAL(readyRead()),
this, TQ_SLOT(npReadyRead()) );
- d->npWaitForLoginDone = TRUE;
+ d->npWaitForLoginDone = true;
switch ( op->operation() ) {
case OpGet:
case OpPut:
@@ -2225,8 +2225,8 @@ bool TQFtp::checkConnection( TQNetworkOperation *op )
}
if ( state() == LoggedIn )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
/*! \reimp
@@ -2249,7 +2249,7 @@ void TQFtp::parseDir( const TQString &buffer, TQUrlInfo &info )
void TQFtp::npListInfo( const TQUrlInfo & i )
{
if ( url() ) {
- TQRegExp filt( url()->nameFilter(), FALSE, TRUE );
+ TQRegExp filt( url()->nameFilter(), false, true );
if ( i.isDir() || filt.search( i.name() ) != -1 ) {
emit newChild( i, operationInProgress() );
}
@@ -2262,7 +2262,7 @@ void TQFtp::npDone( bool err )
{
TQFtpPrivate *d = ::d( this );
- bool emitFinishedSignal = FALSE;
+ bool emitFinishedSignal = false;
TQNetworkOperation *op = operationInProgress();
if ( op ) {
if ( err ) {
@@ -2292,7 +2292,7 @@ void TQFtp::npDone( bool err )
break;
}
}
- emitFinishedSignal = TRUE;
+ emitFinishedSignal = true;
} else if ( !d->npWaitForLoginDone ) {
switch ( op->operation() ) {
case OpRemove:
@@ -2301,7 +2301,7 @@ void TQFtp::npDone( bool err )
case OpMkDir:
{
TQUrlInfo inf( op->arg( 0 ), 0, "", "", 0, TQDateTime(),
- TQDateTime(), TRUE, FALSE, FALSE, TRUE, TRUE, TRUE );
+ TQDateTime(), true, false, false, true, true, true );
emit newChild( inf, op );
emit createdDirectory( inf, op );
}
@@ -2313,10 +2313,10 @@ void TQFtp::npDone( bool err )
break;
}
op->setState( StDone );
- emitFinishedSignal = TRUE;
+ emitFinishedSignal = true;
}
}
- d->npWaitForLoginDone = FALSE;
+ d->npWaitForLoginDone = false;
if ( state() == Unconnected ) {
disconnect( this, TQ_SIGNAL(listInfo(const TQUrlInfo&)),
diff --git a/src/network/tqhostaddress.cpp b/src/network/tqhostaddress.cpp
index 07d08c492..766ca006f 100644
--- a/src/network/tqhostaddress.cpp
+++ b/src/network/tqhostaddress.cpp
@@ -45,7 +45,7 @@
class TQHostAddressPrivate
{
public:
- TQHostAddressPrivate( TQ_UINT32 a_=0 ) : a(a_), isIp4(TRUE)
+ TQHostAddressPrivate( TQ_UINT32 a_=0 ) : a(a_), isIp4(true)
{
}
TQHostAddressPrivate( TQ_UINT8 *a_ );
@@ -70,14 +70,14 @@ private:
friend class TQHostAddress;
};
-TQHostAddressPrivate::TQHostAddressPrivate(TQ_UINT8 *a_) : a(0), isIp4(FALSE)
+TQHostAddressPrivate::TQHostAddressPrivate(TQ_UINT8 *a_) : a(0), isIp4(false)
{
for ( int i=0; i<16; i++ ) {
a6.c[i] = a_[i];
}
}
-TQHostAddressPrivate::TQHostAddressPrivate(const Q_IPV6ADDR &a_) : a(0), isIp4(FALSE)
+TQHostAddressPrivate::TQHostAddressPrivate(const Q_IPV6ADDR &a_) : a(0), isIp4(false)
{
a6 = a_;
}
@@ -212,31 +212,31 @@ void TQHostAddress::setAddress( TQ_UINT8 *ip6Addr )
#ifndef TQT_NO_STRINGLIST
static bool parseIp4(const TQString& address, TQ_UINT32 *addr)
{
- TQStringList ipv4 = TQStringList::split(".", address, FALSE);
+ TQStringList ipv4 = TQStringList::split(".", address, false);
if (ipv4.count() == 4) {
int i = 0;
- bool ok = TRUE;
+ bool ok = true;
while(ok && i < 4) {
uint byteValue = ipv4[i].toUInt(&ok);
if (byteValue > 255)
- ok = FALSE;
+ ok = false;
if (ok)
*addr = (*addr << 8) + byteValue;
++i;
}
if (ok)
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/*!
\overload
Sets the IPv4 or IPv6 address specified by the string
- representation \a address (e.g. "127.0.0.1"). Returns TRUE and
+ representation \a address (e.g. "127.0.0.1"). Returns true and
sets the address if the address was successfully parsed; otherwise
- returns FALSE and leaves the address unchanged.
+ returns false and leaves the address unchanged.
*/
bool TQHostAddress::setAddress(const TQString& address)
{
@@ -246,46 +246,46 @@ bool TQHostAddress::setAddress(const TQString& address)
TQ_UINT32 maybeIp4 = 0;
if (parseIp4(address, &maybeIp4)) {
setAddress(maybeIp4);
- return TRUE;
+ return true;
}
// try ipv6
- TQStringList ipv6 = TQStringList::split(":", a, TRUE);
+ TQStringList ipv6 = TQStringList::split(":", a, true);
int count = (int)ipv6.count();
if (count < 3)
- return FALSE; // there must be at least two ":"
+ return false; // there must be at least two ":"
if (count > 8)
- return FALSE; // maximum of seven ":" exceeded
+ return false; // maximum of seven ":" exceeded
TQ_UINT8 maybeIp6[16];
int mc = 16;
int fillCount = 9 - count;
for (int i=count-1; i>=0; --i) {
if ( mc <= 0 )
- return FALSE;
+ return false;
if (ipv6[i].isEmpty()) {
if (i==count-1) {
// special case: ":" is last character
if (!ipv6[i-1].isEmpty())
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
} else if (i==0) {
// special case: ":" is first character
if (!ipv6[i+1].isEmpty())
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
} else {
for (int j=0; j<fillCount; ++j) {
if ( mc <= 0 )
- return FALSE;
+ return false;
maybeIp6[--mc] = 0;
maybeIp6[--mc] = 0;
}
}
} else {
- bool ok = FALSE;
+ bool ok = false;
uint byteValue = ipv6[i].toUInt(&ok, 16);
if (ok && byteValue <= 0xffff) {
maybeIp6[--mc] = byteValue & 0xff;
@@ -294,24 +294,24 @@ bool TQHostAddress::setAddress(const TQString& address)
if (i == count-1) {
// parse the ipv4 part of a mixed type
if (!parseIp4(ipv6[i], &maybeIp4))
- return FALSE;
+ return false;
maybeIp6[--mc] = maybeIp4 & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 8) & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 16) & 0xff;
maybeIp6[--mc] = (maybeIp4 >> 24) & 0xff;
--fillCount;
} else {
- return FALSE;
+ return false;
}
}
}
}
if (mc == 0) {
setAddress(maybeIp6);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif
@@ -326,8 +326,8 @@ bool TQHostAddress::isIp4Addr() const
}
/*!
- Returns TRUE if the host address represents an IPv4 address;
- otherwise returns FALSE.
+ Returns true if the host address represents an IPv4 address;
+ otherwise returns false.
*/
bool TQHostAddress::isIPv4Address() const
{
@@ -350,7 +350,7 @@ TQ_UINT32 TQHostAddress::ip4Addr() const
For example, if the address is 127.0.0.1, the returned value is
2130706433 (i.e. 0x7f000001).
- This value is only valid when isIp4Addr() returns TRUE.
+ This value is only valid when isIp4Addr() returns true.
\sa toString()
*/
@@ -360,8 +360,8 @@ TQ_UINT32 TQHostAddress::toIPv4Address() const
}
/*!
- Returns TRUE if the host address represents an IPv6 address;
- otherwise returns FALSE.
+ Returns true if the host address represents an IPv6 address;
+ otherwise returns false.
*/
bool TQHostAddress::isIPv6Address() const
{
@@ -381,7 +381,7 @@ bool TQHostAddress::isIPv6Address() const
}
\endcode
- This value is only valid when isIPv6Address() returns TRUE.
+ This value is only valid when isIPv6Address() returns true.
\sa toString()
*/
@@ -424,8 +424,8 @@ TQString TQHostAddress::toString() const
/*!
- Returns TRUE if this host address is the same as \a other;
- otherwise returns FALSE.
+ Returns true if this host address is the same as \a other;
+ otherwise returns false.
*/
bool TQHostAddress::operator==( const TQHostAddress & other ) const
{
@@ -434,7 +434,7 @@ bool TQHostAddress::operator==( const TQHostAddress & other ) const
/*!
- Returns TRUE if this host address is null (INADDR_ANY or in6addr_any). The
+ Returns true if this host address is null (INADDR_ANY or in6addr_any). The
default constructor creates a null address, and that address isn't valid
for any particular host or interface.
*/
@@ -445,9 +445,9 @@ bool TQHostAddress::isNull() const
int i = 0;
while( i < 16 ) {
if ( d->a6.c[i++] != 0 )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif //TQT_NO_NETWORK
diff --git a/src/network/tqhttp.cpp b/src/network/tqhttp.cpp
index 389a731c7..bea20e42b 100644
--- a/src/network/tqhttp.cpp
+++ b/src/network/tqhttp.cpp
@@ -69,7 +69,7 @@ public:
chunkedSize( -1 ),
idleTimer( 0 )
{
- pending.setAutoDelete( TRUE );
+ pending.setAutoDelete( true );
}
TQSocket socket;
@@ -128,7 +128,7 @@ int TQHttpRequest::idCounter = 0;
bool TQHttpRequest::hasRequestHeader()
{
- return FALSE;
+ return false;
}
TQHttpRequestHeader TQHttpRequest::requestHeader()
@@ -148,14 +148,14 @@ public:
TQHttpNormalRequest( const TQHttpRequestHeader &h, TQIODevice *d, TQIODevice *t ) :
header(h), to(t)
{
- is_ba = FALSE;
+ is_ba = false;
data.dev = d;
}
TQHttpNormalRequest( const TQHttpRequestHeader &h, TQByteArray *d, TQIODevice *t ) :
header(h), to(t)
{
- is_ba = TRUE;
+ is_ba = true;
data.ba = d;
}
@@ -216,7 +216,7 @@ void TQHttpNormalRequest::start( TQHttp *http )
bool TQHttpNormalRequest::hasRequestHeader()
{
- return TRUE;
+ return true;
}
TQHttpRequestHeader TQHttpNormalRequest::requestHeader()
@@ -389,7 +389,7 @@ void TQHttpCloseRequest::start( TQHttp *http )
Constructs an empty HTTP header.
*/
TQHttpHeader::TQHttpHeader()
- : valid( TRUE )
+ : valid( true )
{
}
@@ -411,7 +411,7 @@ TQHttpHeader::TQHttpHeader( const TQHttpHeader& header )
key, colon, space, value.
*/
TQHttpHeader::TQHttpHeader( const TQString& str )
- : valid( TRUE )
+ : valid( true )
{
parse( str );
}
@@ -434,7 +434,7 @@ TQHttpHeader& TQHttpHeader::operator=( const TQHttpHeader& h )
}
/*!
- Returns TRUE if the HTTP header is valid; otherwise returns FALSE.
+ Returns true if the HTTP header is valid; otherwise returns false.
A TQHttpHeader is invalid if it was created by parsing a malformed string.
*/
@@ -448,7 +448,7 @@ bool TQHttpHeader::isValid() const
the keys/values it finds. If the string is not parsed successfully
the TQHttpHeader becomes \link isValid() invalid\endlink.
- Returns TRUE if \a str was successfully parsed; otherwise returns FALSE.
+ Returns true if \a str was successfully parsed; otherwise returns false.
\sa toString()
*/
@@ -457,12 +457,12 @@ bool TQHttpHeader::parse( const TQString& str )
TQStringList lst;
int pos = str.find( '\n' );
if ( pos > 0 && str.at( pos - 1 ) == '\r' )
- lst = TQStringList::split( "\r\n", str.stripWhiteSpace(), FALSE );
+ lst = TQStringList::split( "\r\n", str.stripWhiteSpace(), false );
else
- lst = TQStringList::split( "\n", str.stripWhiteSpace(), FALSE );
+ lst = TQStringList::split( "\n", str.stripWhiteSpace(), false );
if ( lst.isEmpty() )
- return TRUE;
+ return true;
TQStringList lines;
TQStringList::Iterator it = lst.begin();
@@ -483,11 +483,11 @@ bool TQHttpHeader::parse( const TQString& str )
it = lines.begin();
for( ; it != lines.end(); ++it ) {
if ( !parseLine( *it, number++ ) ) {
- valid = FALSE;
- return FALSE;
+ valid = false;
+ return false;
}
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -519,8 +519,8 @@ TQStringList TQHttpHeader::keys() const
}
/*!
- Returns TRUE if the HTTP header has an entry with the given \a
- key; otherwise returns FALSE.
+ Returns true if the HTTP header has an entry with the given \a
+ key; otherwise returns false.
\sa value() setValue() keys()
*/
@@ -557,8 +557,8 @@ void TQHttpHeader::removeValue( const TQString& key )
/*! \internal
Parses the single HTTP header line \a line which has the format
key, colon, space, value, and adds key/value to the headers. The
- linenumber is \a number. Returns TRUE if the line was successfully
- parsed and the key/value added; otherwise returns FALSE.
+ linenumber is \a number. Returns true if the line was successfully
+ parsed and the key/value added; otherwise returns false.
\sa parse()
*/
@@ -566,11 +566,11 @@ bool TQHttpHeader::parseLine( const TQString& line, int )
{
int i = line.find( ":" );
if ( i == -1 )
- return FALSE;
+ return false;
values.insert( line.left( i ).stripWhiteSpace().lower(), line.mid( i + 1 ).stripWhiteSpace() );
- return TRUE;
+ return true;
}
/*!
@@ -595,8 +595,8 @@ TQString TQHttpHeader::toString() const
}
/*!
- Returns TRUE if the header has an entry for the special HTTP
- header field \c content-length; otherwise returns FALSE.
+ Returns true if the header has an entry for the special HTTP
+ header field \c content-length; otherwise returns false.
\sa contentLength() setContentLength()
*/
@@ -628,8 +628,8 @@ void TQHttpHeader::setContentLength( int len )
}
/*!
- Returns TRUE if the header has an entry for the the special HTTP
- header field \c content-type; otherwise returns FALSE.
+ Returns true if the header has an entry for the the special HTTP
+ header field \c content-type; otherwise returns false.
\sa contentType() setContentType()
*/
@@ -701,7 +701,7 @@ void TQHttpHeader::setContentType( const TQString& type )
*/
TQHttpResponseHeader::TQHttpResponseHeader()
{
- setValid( FALSE );
+ setValid( false );
}
/*!
@@ -744,7 +744,7 @@ TQHttpResponseHeader::TQHttpResponseHeader( const TQString& str )
*/
void TQHttpResponseHeader::setStatusLine( int code, const TQString& text, int majorVer, int minorVer )
{
- setValid( TRUE );
+ setValid( true );
statCode = code;
reasonPhr = text;
majVer = majorVer;
@@ -800,7 +800,7 @@ bool TQHttpResponseHeader::parseLine( const TQString& line, int number )
TQString l = line.simplifyWhiteSpace();
if ( l.length() < 10 )
- return FALSE;
+ return false;
if ( l.left( 5 ) == "HTTP/" && l[5].isDigit() && l[6] == '.' &&
l[7].isDigit() && l[8] == ' ' && l[9].isDigit() ) {
@@ -816,10 +816,10 @@ bool TQHttpResponseHeader::parseLine( const TQString& line, int number )
reasonPhr = TQString::null;
}
} else {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*! \reimp
@@ -878,7 +878,7 @@ TQString TQHttpResponseHeader::toString() const
TQHttpRequestHeader::TQHttpRequestHeader()
: TQHttpHeader()
{
- setValid( FALSE );
+ setValid( false );
}
/*!
@@ -920,7 +920,7 @@ TQHttpRequestHeader::TQHttpRequestHeader( const TQString& str )
*/
void TQHttpRequestHeader::setRequest( const TQString& method, const TQString& path, int majorVer, int minorVer )
{
- setValid( TRUE );
+ setValid( true );
m = method;
p = path;
majVer = majorVer;
@@ -985,13 +985,13 @@ bool TQHttpRequestHeader::parseLine( const TQString& line, int number )
v[5].isDigit() && v[6] == '.' && v[7].isDigit() ) {
majVer = v[5].latin1() - '0';
minVer = v[7].latin1() - '0';
- return TRUE;
+ return true;
}
}
}
}
- return FALSE;
+ return false;
}
/*! \reimp
@@ -1096,7 +1096,7 @@ TQString TQHttpRequestHeader::toString() const
\code
requestStarted( 1 )
- requestFinished( 1, FALSE )
+ requestFinished( 1, false )
requestStarted( 2 )
stateChanged( Connecting )
@@ -1109,9 +1109,9 @@ TQString TQHttpRequestHeader::toString() const
dataReadProgress( 18300, 0 )
readyRead( responseheader )
stateChanged( Connected )
- requestFinished( 2, FALSE )
+ requestFinished( 2, false )
- done( FALSE )
+ done( false )
stateChanged( Closing )
stateChanged( Unconnected )
@@ -1152,13 +1152,13 @@ TQString TQHttpRequestHeader::toString() const
\code
requestStarted( 1 )
- requestFinished( 1, FALSE )
+ requestFinished( 1, false )
requestStarted( 2 )
stateChanged( HostLookup )
- requestFinished( 2, TRUE )
+ requestFinished( 2, true )
- done( TRUE )
+ done( true )
stateChanged( Unconnected )
\endcode
@@ -1384,8 +1384,8 @@ TQHttp::~TQHttp()
\fn void TQHttp::requestFinished( int id, bool error )
This signal is emitted when processing the request identified by
- \a id has finished. \a error is TRUE if an error occurred during
- the processing; otherwise \a error is FALSE.
+ \a id has finished. \a error is true if an error occurred during
+ the processing; otherwise \a error is false.
\sa requestStarted() done() error() errorString()
*/
@@ -1395,8 +1395,8 @@ TQHttp::~TQHttp()
This signal is emitted when the last pending request has finished;
(it is emitted after the last request's requestFinished() signal).
- \a error is TRUE if an error occurred during the processing;
- otherwise \a error is FALSE.
+ \a error is true if an error occurred during the processing;
+ otherwise \a error is false.
\sa requestFinished() error() errorString()
*/
@@ -1405,12 +1405,12 @@ TQHttp::~TQHttp()
Aborts the current request and deletes all scheduled requests.
For the current request, the requestFinished() signal with the \c
- error argument \c TRUE is emitted. For all other requests that are
+ error argument \c true is emitted. For all other requests that are
affected by the abort(), no signals are emitted.
Since this slot also deletes the scheduled requests, there are no
requests left and the done() signal is emitted (with the \c error
- argument \c TRUE).
+ argument \c true).
\sa clearPendingRequests()
*/
@@ -1497,7 +1497,7 @@ int TQHttp::currentId() const
Returns the request header of the HTTP request being executed. If
the request is one issued by setHost() or closeConnection(), it
returns an invalid request header, i.e.
- TQHttpRequestHeader::isValid() returns FALSE.
+ TQHttpRequestHeader::isValid() returns false.
\sa currentId()
*/
@@ -1546,8 +1546,8 @@ TQIODevice* TQHttp::currentDestinationDevice() const
}
/*!
- Returns TRUE if there are any requests scheduled that have not yet
- been executed; otherwise returns FALSE.
+ Returns true if there are any requests scheduled that have not yet
+ been executed; otherwise returns false.
The request that is being executed is \e not considered as a
scheduled request.
@@ -1825,10 +1825,10 @@ void TQHttp::finishedWithSuccess()
if ( r == 0 )
return;
- emit requestFinished( r->id, FALSE );
+ emit requestFinished( r->id, false );
d->pending.removeFirst();
if ( d->pending.isEmpty() ) {
- emit done( FALSE );
+ emit done( false );
} else {
startNextRequest();
}
@@ -1842,10 +1842,10 @@ void TQHttp::finishedWithError( const TQString& detail, int errorCode )
d->error = (Error)errorCode;
d->errorString = detail;
- emit requestFinished( r->id, TRUE );
+ emit requestFinished( r->id, true );
d->pending.clear();
- emit done( TRUE );
+ emit done( true );
}
void TQHttp::slotClosed()
@@ -1944,19 +1944,19 @@ void TQHttp::slotReadyRead()
if ( d->state != Reading ) {
setState( Reading );
d->buffer = TQByteArray();
- d->readHeader = TRUE;
+ d->readHeader = true;
d->headerStr = "";
d->bytesDone = 0;
d->chunkedSize = -1;
}
while ( d->readHeader ) {
- bool end = FALSE;
+ bool end = false;
TQString tmp;
while ( !end && d->socket.canReadLine() ) {
tmp = d->socket.readLine();
if ( tmp == "\r\n" || tmp == "\n" )
- end = TRUE;
+ end = true;
else
d->headerStr += tmp;
}
@@ -1983,7 +1983,7 @@ void TQHttp::slotReadyRead()
// POST method, we send both the request header and data in
// one chunk.
if (d->response.statusCode() != 100) {
- d->readHeader = FALSE;
+ d->readHeader = false;
if ( d->response.hasKey( "transfer-encoding" ) &&
d->response.value( "transfer-encoding" ).lower().contains( "chunked" ) )
d->chunkedSize = 0;
@@ -1993,10 +1993,10 @@ void TQHttp::slotReadyRead()
}
if ( !d->readHeader ) {
- bool everythingRead = FALSE;
+ bool everythingRead = false;
if ( currentRequest().method() == "HEAD" ) {
- everythingRead = TRUE;
+ everythingRead = true;
} else {
TQ_ULONG n = d->socket.bytesAvailable();
TQByteArray *arr = 0;
@@ -2030,7 +2030,7 @@ void TQHttp::slotReadyRead()
d->chunkedSize = -1;
}
if ( d->chunkedSize == -1 ) {
- everythingRead = TRUE;
+ everythingRead = true;
break;
}
@@ -2075,7 +2075,7 @@ void TQHttp::slotReadyRead()
arr->resize( read );
}
if ( d->bytesDone + bytesAvailable() + n == d->response.contentLength() )
- everythingRead = TRUE;
+ everythingRead = true;
} else if ( n > 0 ) {
// workaround for VC++ bug
TQByteArray temp = d->socket.readAll();
@@ -2137,7 +2137,7 @@ TQHttp::State TQHttp::state() const
/*!
Returns the last error that occurred. This is useful to find out
what happened when receiving a requestFinished() or a done()
- signal with the \c error argument \c TRUE.
+ signal with the \c error argument \c true.
If you start a new request, the error status is reset to \c NoError.
*/
@@ -2150,7 +2150,7 @@ TQHttp::Error TQHttp::error() const
Returns a human-readable description of the last error that
occurred. This is useful to present a error message to the user
when receiving a requestFinished() or a done() signal with the \c
- error argument \c TRUE.
+ error argument \c true.
*/
TQString TQHttp::errorString() const
{
diff --git a/src/network/tqserversocket.cpp b/src/network/tqserversocket.cpp
index 456add216..d65eac0ad 100644
--- a/src/network/tqserversocket.cpp
+++ b/src/network/tqserversocket.cpp
@@ -147,7 +147,7 @@ TQServerSocket::TQServerSocket( TQObject *parent, const char *name )
/*!
- Returns TRUE if the construction succeeded; otherwise returns FALSE.
+ Returns true if the construction succeeded; otherwise returns false.
*/
bool TQServerSocket::ok() const
{
@@ -166,7 +166,7 @@ void TQServerSocket::init( const TQHostAddress & address, TQ_UINT16 port, int ba
// same address-port is in TIME_WAIT. Under Windows this is possible anyway
// -- furthermore, the meaning of reusable is different: it means that you
// can use the same address-port for multiple listening sockets.
- d->s->setAddressReusable( TRUE );
+ d->s->setAddressReusable( true );
#endif
if ( d->s->bind( address, port )
&& d->s->listen( backlog ) )
@@ -219,7 +219,7 @@ void TQServerSocket::incomingConnection( int )
/*!
Returns the port number on which this server socket listens. This
is always non-zero; if you specify 0 in the constructor,
- TQServerSocket will pick a non-zero port itself. ok() must be TRUE
+ TQServerSocket will pick a non-zero port itself. ok() must be true
before calling this function.
\sa address() TQSocketDevice::port()
@@ -245,7 +245,7 @@ int TQServerSocket::socket() const
/*!
Returns the address on which this object listens, or 0.0.0.0 if
- this object listens on more than one address. ok() must be TRUE
+ this object listens on more than one address. ok() must be true
before calling this function.
\sa port() TQSocketDevice::address()
diff --git a/src/network/tqsocket.cpp b/src/network/tqsocket.cpp
index 9314318d1..91d48cec2 100644
--- a/src/network/tqsocket.cpp
+++ b/src/network/tqsocket.cpp
@@ -152,7 +152,7 @@ TQSocketPrivate::TQSocketPrivate()
dns4 = 0;
dns6 = 0;
#endif
- wba.setAutoDelete( TRUE );
+ wba.setAutoDelete( true );
}
TQSocketPrivate::~TQSocketPrivate()
@@ -208,8 +208,8 @@ void TQSocketPrivate::setSocketDevice( TQSocket *q, TQSocketDevice *device )
( addr.isIPv4Address() ?
TQSocketDevice::IPv4 :
TQSocketDevice::IPv6 ), 0 );
- socket->setBlocking( FALSE );
- socket->setAddressReusable( TRUE );
+ socket->setBlocking( false );
+ socket->setAddressReusable( true );
}
rsn = new TQSocketNotifier( socket->socket(),
@@ -218,9 +218,9 @@ void TQSocketPrivate::setSocketDevice( TQSocket *q, TQSocketDevice *device )
TQSocketNotifier::Write, q, "write" );
TQObject::connect( rsn, TQ_SIGNAL(activated(int)), q, TQ_SLOT(sn_read()) );
- rsn->setEnabled( FALSE );
+ rsn->setEnabled( false );
TQObject::connect( wsn, TQ_SIGNAL(activated(int)), q, TQ_SLOT(sn_write()) );
- wsn->setEnabled( FALSE );
+ wsn->setEnabled( false );
}
/*!
@@ -504,14 +504,14 @@ void TQSocket::tryConnecting()
// or do multiple TCP-level connects at a time, with staggered
// starts to avoid bandwidth waste and cause fewer
// "connect-and-abort" errors. but that later.)
- bool stuck = TRUE;
+ bool stuck = true;
while( stuck ) {
- stuck = FALSE;
+ stuck = false;
if ( d->socket &&
- d->socket->connect( d->addr, d->port ) == FALSE ) {
+ !d->socket->connect( d->addr, d->port ) ) {
if ( d->socket->error() == TQSocketDevice::NoError ) {
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
return; // not serious, try again later
}
@@ -537,7 +537,7 @@ void TQSocket::tryConnecting()
d->addr = *d->addresses.begin();
d->addresses.remove( d->addresses.begin() );
d->setSocketDevice( this, 0 );
- stuck = TRUE;
+ stuck = true;
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s)::tryConnecting: Trying IP address %s",
name(), d->addr.toString().ascii() );
@@ -547,7 +547,7 @@ void TQSocket::tryConnecting()
// The socket write notifier will fire when the connection succeeds
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
}
#endif
}
@@ -656,11 +656,11 @@ bool TQSocket::open( int m )
#if defined(QT_CHECK_STATE)
tqWarning( "TQSocket::open: Already open" );
#endif
- return FALSE;
+ return false;
}
TQIODevice::setMode( m & IO_ReadWrite );
setState( IO_Open );
- return TRUE;
+ return true;
}
@@ -697,9 +697,9 @@ void TQSocket::close()
if ( d->socket && d->wsize ) { // there's data to be written
d->state = Closing;
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
d->rba.clear(); // clear incoming data
return;
}
@@ -719,7 +719,7 @@ void TQSocket::close()
bool TQSocket::consumeWriteBuf( TQ_ULONG nbytes )
{
if ( nbytes <= 0 || nbytes > d->wsize )
- return FALSE;
+ return false;
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s): skipWriteBuf %d bytes", name(), (int)nbytes );
#endif
@@ -737,7 +737,7 @@ bool TQSocket::consumeWriteBuf( TQ_ULONG nbytes )
break;
}
}
- return TRUE;
+ return true;
}
@@ -750,7 +750,7 @@ void TQSocket::flush()
{
if ( !d->socket )
return;
- bool osBufferFull = FALSE;
+ bool osBufferFull = false;
int consumed = 0;
while ( !osBufferFull && d->state >= Connecting && d->wsize > 0 ) {
#if defined(TQSOCKET_DEBUG)
@@ -781,20 +781,20 @@ void TQSocket::flush()
}
nwritten = d->socket->writeBlock( out.data(), i );
if ( d->wsn )
- d->wsn->setEnabled( FALSE ); // the TQSocketNotifier documentation says so
+ d->wsn->setEnabled( false ); // the TQSocketNotifier documentation says so
} else {
// Big block, write it immediately
i = a->size() - d->windex;
nwritten = d->socket->writeBlock( a->data() + d->windex, i );
if ( d->wsn )
- d->wsn->setEnabled( FALSE ); // the TQSocketNotifier documentation says so
+ d->wsn->setEnabled( false ); // the TQSocketNotifier documentation says so
}
if ( nwritten > 0 ) {
if ( consumeWriteBuf( nwritten ) )
consumed += nwritten;
}
if ( nwritten < i )
- osBufferFull = TRUE;
+ osBufferFull = true;
}
if ( consumed > 0 ) {
#if defined(TQSOCKET_DEBUG)
@@ -851,15 +851,15 @@ TQIODevice::Offset TQSocket::at() const
/*!
\overload
- Moves the read index forward to \a index and returns TRUE if the
- operation was successful; otherwise returns FALSE. Moving the
+ Moves the read index forward to \a index and returns true if the
+ operation was successful; otherwise returns false. Moving the
index forward means skipping incoming data.
*/
bool TQSocket::at( Offset index )
{
if ( index > d->rba.size() )
- return FALSE;
+ return false;
d->rba.consumeBytes( (TQ_ULONG)index, 0 ); // throw away data 0..index-1
// After we read data from our internal buffer, if we use the
// setReadBufferSize() to limit our buffer, we might now be able to
@@ -869,19 +869,19 @@ bool TQSocket::at( Offset index )
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
- return TRUE;
+ d->rsn->setEnabled( true );
+ return true;
}
/*!
- Returns TRUE if there is no more data to read; otherwise returns FALSE.
+ Returns true if there is no more data to read; otherwise returns false.
*/
bool TQSocket::atEnd() const
{
if ( d->socket == 0 )
- return TRUE;
+ return true;
TQSocket * that = (TQSocket *)this;
if ( that->d->socket->bytesAvailable() ) // a little slow, perhaps...
that->sn_read();
@@ -918,9 +918,9 @@ TQ_ULONG TQSocket::bytesAvailable() const
Returns the number of bytes available.
If \a timeout is non-null and no error occurred (i.e. it does not
- return -1): this function sets \a *timeout to TRUE, if the reason
+ return -1): this function sets \a *timeout to true, if the reason
for returning was that the timeout was reached; otherwise it sets
- \a *timeout to FALSE. This is useful to find out if the peer
+ \a *timeout to false. This is useful to find out if the peer
closed the connection.
\warning This is a blocking call and should be avoided in event
@@ -935,7 +935,7 @@ TQ_ULONG TQSocket::waitForMore( int msecs, bool *timeout ) const
return 0;
TQSocket * that = (TQSocket *)this;
if ( that->d->socket->waitForMore( msecs, timeout ) > 0 )
- (void)that->sn_read( TRUE );
+ (void)that->sn_read( true );
return that->d->rba.size();
}
@@ -1005,7 +1005,7 @@ TQ_LONG TQSocket::readBlock( char *data, TQ_ULONG maxlen )
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
return maxlen;
}
@@ -1059,7 +1059,7 @@ TQ_LONG TQSocket::writeBlock( const char *data, TQ_ULONG len )
if ( writeNow )
flush();
else if ( d->wsn )
- d->wsn->setEnabled( TRUE );
+ d->wsn->setEnabled( true );
#if defined(TQSOCKET_DEBUG)
tqDebug( "TQSocket (%s): writeBlock %d bytes", name(), (int)len );
#endif
@@ -1088,7 +1088,7 @@ int TQSocket::getch()
// We can test for this condition by looking at the
// sn_read_alreadyCalled flag.
if ( d->rsn && TQSocketPrivate::sn_read_alreadyCalled.findRef(this) == -1 )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
return c;
}
return -1;
@@ -1130,11 +1130,11 @@ int TQSocket::ungetch( int ch )
/*!
- Returns TRUE if it's possible to read an entire line of text from
- this socket at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ this socket at this time; otherwise returns false.
Note that if the peer closes the connection unexpectedly, this
- function returns FALSE. This means that loops such as this won't
+ function returns false. This means that loops such as this won't
work:
\code
@@ -1148,7 +1148,7 @@ int TQSocket::ungetch( int ch )
bool TQSocket::canReadLine() const
{
if ( ((TQSocket*)this)->d->rba.scanNewline( 0 ) )
- return TRUE;
+ return true;
return ( bytesAvailable() > 0 &&
((TQSocket*)this)->d->rba.scanNewline( 0 ) );
}
@@ -1165,7 +1165,7 @@ TQ_LONG TQSocket::readLine( char *data, TQ_ULONG maxlen )
/*!
Returns a line of text including a terminating newline character
- (\n). Returns "" if canReadLine() returns FALSE.
+ (\n). Returns "" if canReadLine() returns false.
\sa canReadLine()
*/
@@ -1187,7 +1187,7 @@ TQString TQSocket::readLine()
Internal slot for handling socket read notifications.
This function has can usually only be entered once (i.e. no
- recursive calls). If the argument \a force is TRUE, the function
+ recursive calls). If the argument \a force is true, the function
is executed, but no readyRead() signals are emitted. This
behaviour is useful for the waitForMore() function, so that it is
possible to call waitForMore() in a slot connected to the
@@ -1201,7 +1201,7 @@ void TQSocket::sn_read( bool force )
maxToRead = d->readBufferSize - d->rba.size();
if ( maxToRead <= 0 ) {
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
return;
}
}
@@ -1261,7 +1261,7 @@ void TQSocket::sn_read( bool force )
tqWarning( "TQSocket::sn_read (%s): Close error", name() );
#endif
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit error( ErrSocketRead );
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
return;
@@ -1309,7 +1309,7 @@ void TQSocket::sn_read( bool force )
tqWarning( "TQSocket::sn_read: Read error" );
#endif
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit error( ErrSocketRead );
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
return;
@@ -1324,10 +1324,10 @@ void TQSocket::sn_read( bool force )
d->rba.append( a );
if ( !force ) {
if ( d->rsn )
- d->rsn->setEnabled( FALSE );
+ d->rsn->setEnabled( false );
emit readyRead();
if ( d->rsn )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
}
TQSocketPrivate::sn_read_alreadyCalled.removeRef( this );
@@ -1360,7 +1360,7 @@ void TQSocket::tryConnection()
name(), peerName().ascii() );
#endif
if ( d->rsn )
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
emit connected();
} else {
d->state = Idle;
@@ -1393,7 +1393,7 @@ void TQSocket::setSocket( int socket )
{
setSocketIntern( socket );
d->state = Connection;
- d->rsn->setEnabled( TRUE );
+ d->rsn->setEnabled( true );
}
@@ -1416,8 +1416,8 @@ void TQSocket::setSocketIntern( int socket )
d->readBufferSize = oldBufferSize;
if ( socket >= 0 ) {
TQSocketDevice *sd = new TQSocketDevice( socket, TQSocketDevice::Stream );
- sd->setBlocking( FALSE );
- sd->setAddressReusable( TRUE );
+ sd->setBlocking( false );
+ sd->setAddressReusable( true );
d->setSocketDevice( this, sd );
}
d->state = Idle;
diff --git a/src/network/tqsocket.h b/src/network/tqsocket.h
index 5af4a21ab..b6e050051 100644
--- a/src/network/tqsocket.h
+++ b/src/network/tqsocket.h
@@ -131,7 +131,7 @@ signals:
void error( int );
protected slots:
- virtual void sn_read( bool force=FALSE );
+ virtual void sn_read( bool force=false );
virtual void sn_write();
private slots:
diff --git a/src/network/tqsocketdevice.cpp b/src/network/tqsocketdevice.cpp
index f82d1625f..8ae73f61a 100644
--- a/src/network/tqsocketdevice.cpp
+++ b/src/network/tqsocketdevice.cpp
@@ -237,7 +237,7 @@ TQSocketDevice::~TQSocketDevice()
/*!
- Returns TRUE if this is a valid socket; otherwise returns FALSE.
+ Returns true if this is a valid socket; otherwise returns false.
\sa socket()
*/
@@ -333,13 +333,13 @@ void TQSocketDevice::setSocket( int socket, Type type )
bool TQSocketDevice::open( int mode )
{
if ( isOpen() || !isValid() )
- return FALSE;
+ return false;
#if defined(TQSOCKETDEVICE_DEBUG)
tqDebug( "TQSocketDevice::open: mode %x", mode );
#endif
setMode( mode & IO_ReadWrite );
setState( IO_Open );
- return TRUE;
+ return true;
}
@@ -381,19 +381,19 @@ TQIODevice::Offset TQSocketDevice::at() const
\reimp
The read/write index is meaningless for a socket, therefore this
- function does nothing and returns TRUE.
+ function does nothing and returns true.
*/
bool TQSocketDevice::at( Offset )
{
- return TRUE;
+ return true;
}
/*!
\reimp
- Returns TRUE if no data is currently available at the socket;
- otherwise returns FALSE.
+ Returns true if no data is currently available at the socket;
+ otherwise returns false.
*/
bool TQSocketDevice::atEnd() const
{
@@ -445,8 +445,8 @@ int TQSocketDevice::ungetch( int )
/*!
- Returns TRUE if the address of this socket can be used by other
- sockets at the same time, and FALSE if this socket claims
+ Returns true if the address of this socket can be used by other
+ sockets at the same time, and false if this socket claims
exclusive ownership.
\sa setAddressReusable()
@@ -459,8 +459,8 @@ bool TQSocketDevice::addressReusable() const
/*!
Sets the address of this socket to be usable by other sockets too
- if \a enable is TRUE, and to be used exclusively by this socket if
- \a enable is FALSE.
+ if \a enable is true, and to be used exclusively by this socket if
+ \a enable is false.
When a socket is reusable, other sockets can use the same port
number (and IP address), which is generally useful. Of course
diff --git a/src/network/tqsocketdevice_unix.cpp b/src/network/tqsocketdevice_unix.cpp
index 39a9560dd..eaf9e1bf3 100644
--- a/src/network/tqsocketdevice_unix.cpp
+++ b/src/network/tqsocketdevice_unix.cpp
@@ -232,12 +232,12 @@ void TQSocketDevice::close()
/*!
- Returns TRUE if the socket is valid and in blocking mode;
- otherwise returns FALSE.
+ Returns true if the socket is valid and in blocking mode;
+ otherwise returns false.
Note that this function does not set error().
- \warning On Windows, this function always returns TRUE since the
+ \warning On Windows, this function always returns true since the
ioctlsocket() function is broken.
\sa setBlocking(), isValid()
@@ -245,15 +245,15 @@ void TQSocketDevice::close()
bool TQSocketDevice::blocking() const
{
if ( !isValid() )
- return TRUE;
+ return true;
int s = fcntl(fd, F_GETFL, 0);
return !(s >= 0 && ((s & O_NDELAY) != 0));
}
/*!
- Makes the socket blocking if \a enable is TRUE or nonblocking if
- \a enable is FALSE.
+ Makes the socket blocking if \a enable is true or nonblocking if
+ \a enable is false.
Sockets are blocking by default, but we recommend using
nonblocking socket operations, especially for GUI programs that
@@ -395,8 +395,8 @@ void TQSocketDevice::setOption( Option opt, int v )
/*!
Connects to the IP address and port specified by \a addr and \a
- port. Returns TRUE if it establishes a connection; otherwise returns FALSE.
- If it returns FALSE, error() explains why.
+ port. Returns true if it establishes a connection; otherwise returns false.
+ If it returns false, error() explains why.
Note that error() commonly returns NoError for non-blocking
sockets; this just means that you can call connect() again in a
@@ -405,7 +405,7 @@ void TQSocketDevice::setOption( Option opt, int v )
bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
{
if ( !isValid() )
- return FALSE;
+ return false;
pa = addr;
pp = port;
@@ -438,20 +438,20 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
aa = (struct sockaddr *)&a4;
} else {
e = Impossible;
- return FALSE;
+ return false;
}
int r = qt_socket_connect( fd, aa, aalen );
if ( r == 0 ) {
fetchConnectionParameters();
- return TRUE;
+ return true;
}
if ( errno == EISCONN || errno == EALREADY || errno == EINPROGRESS ) {
fetchConnectionParameters();
- return TRUE;
+ return true;
}
if ( e != NoError || errno == EAGAIN || errno == EWOULDBLOCK ) {
- return FALSE;
+ return false;
}
switch( errno ) {
case EBADF:
@@ -480,14 +480,14 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
e = UnknownError;
break;
}
- return FALSE;
+ return false;
}
/*!
Assigns a name to an unnamed socket. The name is the host address
\a address and the port number \a port. If the operation succeeds,
- bind() returns TRUE; otherwise it returns FALSE without changing
+ bind() returns true; otherwise it returns false without changing
what port() and address() return.
bind() is used by servers for setting up incoming connections.
@@ -496,7 +496,7 @@ bool TQSocketDevice::connect( const TQHostAddress &addr, TQ_UINT16 port )
bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
{
if ( !isValid() )
- return FALSE;
+ return false;
int r;
struct sockaddr_in a4;
#if !defined(TQT_NO_IPV6)
@@ -521,7 +521,7 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
r = qt_socket_bind( fd, (struct sockaddr*)&a4, sizeof(a4) );
} else {
e = Impossible;
- return FALSE;
+ return false;
}
if ( r < 0 ) {
@@ -551,17 +551,17 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
e = UnknownError;
break;
}
- return FALSE;
+ return false;
}
fetchConnectionParameters();
- return TRUE;
+ return true;
}
/*!
Specifies how many pending connections a server socket can have.
- Returns TRUE if the operation was successful; otherwise returns
- FALSE. A \a backlog value of 50 is quite common.
+ Returns true if the operation was successful; otherwise returns
+ false. A \a backlog value of 50 is quite common.
The listen() call only applies to sockets where type() is \c
Stream, i.e. not to \c Datagram sockets. listen() must not be
@@ -572,12 +572,12 @@ bool TQSocketDevice::bind( const TQHostAddress &address, TQ_UINT16 port )
bool TQSocketDevice::listen( int backlog )
{
if ( !isValid() )
- return FALSE;
+ return false;
if ( qt_socket_listen( fd, backlog ) >= 0 )
- return TRUE;
+ return true;
if ( !e )
e = Impossible;
- return FALSE;
+ return false;
}
@@ -604,11 +604,11 @@ int TQSocketDevice::accept()
do {
s = qt_socket_accept( fd, (struct sockaddr*)&aa, &l );
// we'll blithely throw away the stuff accept() wrote to aa
- done = TRUE;
+ done = true;
if ( s < 0 && e == NoError ) {
switch( errno ) {
case EINTR:
- done = FALSE;
+ done = false;
break;
#if defined(EPROTO)
case EPROTO:
@@ -707,9 +707,9 @@ TQ_LONG TQSocketDevice::bytesAvailable() const
error occurred.
If \a timeout is non-null and no error occurred (i.e. it does not
- return -1): this function sets \a *timeout to TRUE, if the reason
+ return -1): this function sets \a *timeout to true, if the reason
for returning was that the timeout was reached; otherwise it sets
- \a *timeout to FALSE. This is useful to find out if the peer
+ \a *timeout to false. This is useful to find out if the peer
closed the connection.
\warning This is a blocking call and should be avoided in event
@@ -740,9 +740,9 @@ TQ_LONG TQSocketDevice::waitForMore( int msecs, bool *timeout ) const
if ( timeout ) {
if ( rv == 0 )
- *timeout = TRUE;
+ *timeout = true;
else
- *timeout = FALSE;
+ *timeout = false;
}
return bytesAvailable();
@@ -777,9 +777,9 @@ TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
return -1;
}
#endif
- bool done = FALSE;
+ bool done = false;
int r = 0;
- while ( done == FALSE ) {
+ while ( !done ) {
if ( t == Datagram ) {
#if !defined(TQT_NO_IPV6)
struct sockaddr_storage aa;
@@ -797,14 +797,14 @@ TQ_LONG TQSocketDevice::readBlock( char *data, TQ_ULONG maxlen )
} else {
r = ::read( fd, data, maxlen );
}
- done = TRUE;
+ done = true;
if ( r == 0 && t == Stream && maxlen > 0 ) {
// connection closed
close();
} else if ( r >= 0 || errno == EAGAIN || errno == EWOULDBLOCK ) {
// nothing
} else if ( errno == EINTR ) {
- done = FALSE;
+ done = false;
} else if ( e == NoError ) {
switch( errno ) {
case EIO:
@@ -873,17 +873,17 @@ TQ_LONG TQSocketDevice::writeBlock( const char *data, TQ_ULONG len )
#endif
return -1;
}
- bool done = FALSE;
+ bool done = false;
int r = 0;
bool timeout;
while ( !done ) {
r = ::write( fd, data, len );
- done = TRUE;
+ done = true;
if ( r < 0 && e == NoError &&
errno != EAGAIN && errno != EWOULDBLOCK ) {
switch( errno ) {
case EINTR: // signal - call read() or whatever again
- done = FALSE;
+ done = false;
break;
case EPIPE:
case ECONNRESET:
@@ -998,16 +998,16 @@ TQ_LONG TQSocketDevice::writeBlock( const char * data, TQ_ULONG len,
// we'd use MSG_DONTWAIT + MSG_NOSIGNAL if Stevens were right.
// but apparently Stevens and most implementors disagree
- bool done = FALSE;
+ bool done = false;
int r = 0;
while ( !done ) {
r = ::sendto( fd, data, len, 0, aa, slen);
- done = TRUE;
+ done = true;
if ( r < 0 && e == NoError &&
errno != EAGAIN && errno != EWOULDBLOCK ) {
switch( errno ) {
case EINTR: // signal - call read() or whatever again
- done = FALSE;
+ done = false;
break;
case ENOSPC:
case EPIPE:
diff --git a/src/opengl/tqgl.cpp b/src/opengl/tqgl.cpp
index 4ec6dec30..dab303c17 100644
--- a/src/opengl/tqgl.cpp
+++ b/src/opengl/tqgl.cpp
@@ -135,8 +135,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
default for the entire application:
\code
TQGLFormat f;
- f.setAlpha( TRUE );
- f.setStereo( TRUE );
+ f.setAlpha( true );
+ f.setStereo( true );
TQGLFormat::setDefaultFormat( f );
\endcode
@@ -144,8 +144,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
your TQGLWidget subclass:
\code
TQGLFormat f;
- f.setDoubleBuffer( FALSE ); // single buffer
- f.setDirectRendering( FALSE ); // software rendering
+ f.setDoubleBuffer( false ); // single buffer
+ f.setDirectRendering( false ); // software rendering
MyGLWidget* myWidget = new MyGLWidget( f, ... );
\endcode
@@ -153,8 +153,8 @@ static TQCleanupHandler<TQGLFormat> qgl_cleanup_format;
requested features the system was able to provide:
\code
TQGLFormat f;
- f.setOverlay( TRUE );
- f.setStereo( TRUE );
+ f.setOverlay( true );
+ f.setStereo( true );
MyGLWidget* myWidget = new MyGLWidget( f, ... );
if ( !w->format().stereo() ) {
// ok, goggles off
@@ -242,14 +242,14 @@ TQGLFormat::TQGLFormat( int options, int plane )
/*!
\fn bool TQGLFormat::doubleBuffer() const
- Returns TRUE if double buffering is enabled; otherwise returns
- FALSE. Double buffering is enabled by default.
+ Returns true if double buffering is enabled; otherwise returns
+ false. Double buffering is enabled by default.
\sa setDoubleBuffer()
*/
/*!
- If \a enable is TRUE sets double buffering; otherwise sets single
+ If \a enable is true sets double buffering; otherwise sets single
buffering.
Double buffering is enabled by default.
@@ -273,14 +273,14 @@ void TQGLFormat::setDoubleBuffer( bool enable )
/*!
\fn bool TQGLFormat::depth() const
- Returns TRUE if the depth buffer is enabled; otherwise returns
- FALSE. The depth buffer is enabled by default.
+ Returns true if the depth buffer is enabled; otherwise returns
+ false. The depth buffer is enabled by default.
\sa setDepth()
*/
/*!
- If \a enable is TRUE enables the depth buffer; otherwise disables
+ If \a enable is true enables the depth buffer; otherwise disables
the depth buffer.
The depth buffer is enabled by default.
@@ -303,14 +303,14 @@ void TQGLFormat::setDepth( bool enable )
/*!
\fn bool TQGLFormat::rgba() const
- Returns TRUE if RGBA color mode is set. Returns FALSE if color
+ Returns true if RGBA color mode is set. Returns false if color
index mode is set. The default color mode is RGBA.
\sa setRgba()
*/
/*!
- If \a enable is TRUE sets RGBA mode. If \a enable is FALSE sets
+ If \a enable is true sets RGBA mode. If \a enable is false sets
color index mode.
The default color mode is RGBA.
@@ -334,14 +334,14 @@ void TQGLFormat::setRgba( bool enable )
/*!
\fn bool TQGLFormat::alpha() const
- Returns TRUE if the alpha channel of the framebuffer is enabled;
- otherwise returns FALSE. The alpha channel is disabled by default.
+ Returns true if the alpha channel of the framebuffer is enabled;
+ otherwise returns false. The alpha channel is disabled by default.
\sa setAlpha()
*/
/*!
- If \a enable is TRUE enables the alpha channel; otherwise disables
+ If \a enable is true enables the alpha channel; otherwise disables
the alpha channel.
The alpha buffer is disabled by default.
@@ -362,14 +362,14 @@ void TQGLFormat::setAlpha( bool enable )
/*!
\fn bool TQGLFormat::accum() const
- Returns TRUE if the accumulation buffer is enabled; otherwise
- returns FALSE. The accumulation buffer is disabled by default.
+ Returns true if the accumulation buffer is enabled; otherwise
+ returns false. The accumulation buffer is disabled by default.
\sa setAccum()
*/
/*!
- If \a enable is TRUE enables the accumulation buffer; otherwise
+ If \a enable is true enables the accumulation buffer; otherwise
disables the accumulation buffer.
The accumulation buffer is disabled by default.
@@ -389,14 +389,14 @@ void TQGLFormat::setAccum( bool enable )
/*!
\fn bool TQGLFormat::stencil() const
- Returns TRUE if the stencil buffer is enabled; otherwise returns
- FALSE. The stencil buffer is disabled by default.
+ Returns true if the stencil buffer is enabled; otherwise returns
+ false. The stencil buffer is disabled by default.
\sa setStencil()
*/
/*!
- If \a enable is TRUE enables the stencil buffer; otherwise
+ If \a enable is true enables the stencil buffer; otherwise
disables the stencil buffer.
The stencil buffer is disabled by default.
@@ -416,14 +416,14 @@ void TQGLFormat::setStencil( bool enable )
/*!
\fn bool TQGLFormat::stereo() const
- Returns TRUE if stereo buffering is enabled; otherwise returns
- FALSE. Stereo buffering is disabled by default.
+ Returns true if stereo buffering is enabled; otherwise returns
+ false. Stereo buffering is disabled by default.
\sa setStereo()
*/
/*!
- If \a enable is TRUE enables stereo buffering; otherwise disables
+ If \a enable is true enables stereo buffering; otherwise disables
stereo buffering.
Stereo buffering is disabled by default.
@@ -443,8 +443,8 @@ void TQGLFormat::setStereo( bool enable )
/*!
\fn bool TQGLFormat::directRendering() const
- Returns TRUE if direct rendering is enabled; otherwise returns
- FALSE.
+ Returns true if direct rendering is enabled; otherwise returns
+ false.
Direct rendering is enabled by default.
@@ -452,7 +452,7 @@ void TQGLFormat::setStereo( bool enable )
*/
/*!
- If \a enable is TRUE enables direct rendering; otherwise disables
+ If \a enable is true enables direct rendering; otherwise disables
direct rendering.
Direct rendering is enabled by default.
@@ -473,7 +473,7 @@ void TQGLFormat::setDirectRendering( bool enable )
/*!
\fn bool TQGLFormat::hasOverlay() const
- Returns TRUE if overlay plane is enabled; otherwise returns FALSE.
+ Returns true if overlay plane is enabled; otherwise returns false.
Overlay is disabled by default.
@@ -481,7 +481,7 @@ void TQGLFormat::setDirectRendering( bool enable )
*/
/*!
- If \a enable is TRUE enables an overlay plane; otherwise disables
+ If \a enable is true enables an overlay plane; otherwise disables
the overlay plane.
Enabling the overlay plane will cause TQGLWidget to create an
@@ -543,7 +543,7 @@ void TQGLFormat::setOption( FormatOption opt )
/*!
- Returns TRUE if format option \a opt is set; otherwise returns FALSE.
+ Returns true if format option \a opt is set; otherwise returns false.
\sa setOption()
*/
@@ -561,8 +561,8 @@ bool TQGLFormat::testOption( FormatOption opt ) const
/*!
\fn bool TQGLFormat::hasOpenGL()
- Returns TRUE if the window system has any OpenGL support;
- otherwise returns FALSE.
+ Returns true if the window system has any OpenGL support;
+ otherwise returns false.
\warning This function must not be called until the TQApplication
object has been created.
@@ -573,8 +573,8 @@ bool TQGLFormat::testOption( FormatOption opt ) const
/*!
\fn bool TQGLFormat::hasOpenGLOverlays()
- Returns TRUE if the window system supports OpenGL overlays;
- otherwise returns FALSE.
+ Returns true if the window system supports OpenGL overlays;
+ otherwise returns false.
\warning This function must not be called until the TQApplication
object has been created.
@@ -608,7 +608,7 @@ TQGLFormat TQGLFormat::defaultFormat()
\code
TQApplication a(argc, argv);
TQGLFormat f;
- f.setDoubleBuffer( FALSE );
+ f.setDoubleBuffer( false );
TQGLFormat::setDefaultFormat( f );
\endcode
@@ -666,7 +666,7 @@ TQGLFormat TQGLFormat::defaultOverlayFormat()
\code
TQGLFormat f = TQGLFormat::defaultOverlayFormat();
- f.setDoubleBuffer( TRUE );
+ f.setDoubleBuffer( true );
TQGLFormat::setDefaultOverlayFormat( f );
\endcode
@@ -700,13 +700,13 @@ void TQGLFormat::setDefaultOverlayFormat( const TQGLFormat &f )
// Make sure the user doesn't request that the overlays themselves
// have overlays, since it is unlikely that the system supports
// infinitely many planes...
- qgl_default_overlay_format->setOverlay( FALSE );
+ qgl_default_overlay_format->setOverlay( false );
}
/*!
- Returns TRUE if all the options of the two TQGLFormats are equal;
- otherwise returns FALSE.
+ Returns true if all the options of the two TQGLFormats are equal;
+ otherwise returns false.
*/
bool operator==( const TQGLFormat& a, const TQGLFormat& b )
@@ -716,8 +716,8 @@ bool operator==( const TQGLFormat& a, const TQGLFormat& b )
/*!
- Returns FALSE if all the options of the two TQGLFormats are equal;
- otherwise returns TRUE.
+ Returns false if all the options of the two TQGLFormats are equal;
+ otherwise returns true.
*/
bool operator!=( const TQGLFormat& a, const TQGLFormat& b )
@@ -849,7 +849,7 @@ TQGLContext::~TQGLContext()
TQGLContext *cx;
// ...
TQGLFormat f;
- f.setStereo( TRUE );
+ f.setStereo( true );
cx->setFormat( f );
if ( !cx->create() )
exit(); // no OpenGL support, or cannot render on the specified paintdevice
@@ -885,7 +885,7 @@ void TQGLContext::setDevice( TQPaintDevice *pDev )
void TQGLContext::init( TQPaintDevice *dev )
{
d = new Private;
- d->valid = FALSE;
+ d->valid = false;
#if defined(TQ_WS_X11)
qt_resolve_gl_symbols();
gpm = 0;
@@ -900,16 +900,16 @@ void TQGLContext::init( TQPaintDevice *dev )
#if defined(TQ_WS_MAC)
d->oldR = TQRect(1, 1, 1, 1);
#endif
- d->crWin = FALSE;
- d->initDone = FALSE;
- d->sharing = FALSE;
+ d->crWin = false;
+ d->initDone = false;
+ d->sharing = false;
}
/*!
\fn bool TQGLContext::isValid() const
- Returns TRUE if a GL rendering context has been successfully
- created; otherwise returns FALSE.
+ Returns true if a GL rendering context has been successfully
+ created; otherwise returns false.
*/
/*!
@@ -922,9 +922,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::isSharing() const
- Returns TRUE if display list sharing with another context was
+ Returns true if display list sharing with another context was
requested in the create() call and the GL system was able to
- fulfill this request; otherwise returns FALSE. Note that display
+ fulfill this request; otherwise returns false. Note that display
list sharing might not be supported between contexts with
different formats.
*/
@@ -932,15 +932,15 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::deviceIsPixmap() const
- Returns TRUE if the paint device of this context is a pixmap;
- otherwise returns FALSE.
+ Returns true if the paint device of this context is a pixmap;
+ otherwise returns false.
*/
/*!
\fn bool TQGLContext::windowCreated() const
- Returns TRUE if a window has been created for this context;
- otherwise returns FALSE.
+ Returns true if a window has been created for this context;
+ otherwise returns false.
\sa setWindowCreated()
*/
@@ -948,8 +948,8 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn void TQGLContext::setWindowCreated( bool on )
- If \a on is TRUE the context has had a window created for it. If
- \a on is FALSE no window has been created for the context.
+ If \a on is true the context has had a window created for it. If
+ \a on is false no window has been created for the context.
\sa windowCreated()
*/
@@ -967,9 +967,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn bool TQGLContext::initialized() const
- Returns TRUE if this context has been initialized, i.e. if
+ Returns true if this context has been initialized, i.e. if
TQGLWidget::initializeGL() has been performed on it; otherwise
- returns FALSE.
+ returns false.
\sa setInitialized()
*/
@@ -977,9 +977,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
\fn void TQGLContext::setInitialized( bool on )
- If \a on is TRUE the context has been initialized, i.e.
+ If \a on is true the context has been initialized, i.e.
TQGLContext::setInitialized() has been called on it. If \a on is
- FALSE the context has not been initialized.
+ false the context has not been initialized.
\sa initialized()
*/
@@ -1014,9 +1014,9 @@ void TQGLContext::init( TQPaintDevice *dev )
/*!
- Creates the GL context. Returns TRUE if it was successful in
+ Creates the GL context. Returns true if it was successful in
creating a valid GL rendering context on the paint device
- specified in the constructor; otherwise returns FALSE (i.e. the
+ specified in the constructor; otherwise returns false (i.e. the
context is invalid).
After successful creation, format() returns the set of features of
@@ -1275,7 +1275,7 @@ static TQGLWidgetPrivate * qgl_d( const TQGLWidget * w )
if ( !qgl_d_ptr ) {
qgl_d_ptr = new TQPtrDict<TQGLWidgetPrivate>;
qgl_cleanup_d_ptr.set( &qgl_d_ptr );
- qgl_d_ptr->setAutoDelete( TRUE );
+ qgl_d_ptr->setAutoDelete( true );
}
TQGLWidgetPrivate * ret = qgl_d_ptr->find( (void *) w );
if ( !ret ) {
@@ -1430,8 +1430,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::doubleBuffer() const
- Returns TRUE if the contained GL rendering context has double
- buffering; otherwise returns FALSE.
+ Returns true if the contained GL rendering context has double
+ buffering; otherwise returns false.
\sa TQGLFormat::doubleBuffer()
*/
@@ -1439,10 +1439,10 @@ TQGLWidget::~TQGLWidget()
/*!
\fn void TQGLWidget::setAutoBufferSwap( bool on )
- If \a on is TRUE automatic GL buffer swapping is switched on;
+ If \a on is true automatic GL buffer swapping is switched on;
otherwise it is switched off.
- If \a on is TRUE and the widget is using a double-buffered format,
+ If \a on is true and the widget is using a double-buffered format,
the background and foreground GL buffers will automatically be
swapped after each paintGL() call.
@@ -1454,8 +1454,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::autoBufferSwap() const
- Returns TRUE if the widget is doing automatic GL buffer swapping;
- otherwise returns FALSE.
+ Returns true if the widget is doing automatic GL buffer swapping;
+ otherwise returns false.
\sa setAutoBufferSwap()
*/
@@ -1463,8 +1463,8 @@ TQGLWidget::~TQGLWidget()
/*!
\fn bool TQGLWidget::isValid() const
- Returns TRUE if the widget has a valid GL rendering context;
- otherwise returns FALSE. A widget will be invalid if the system
+ Returns true if the widget has a valid GL rendering context;
+ otherwise returns false. A widget will be invalid if the system
has no \link TQGLFormat::hasOpenGL() OpenGL support\endlink.
*/
@@ -1476,9 +1476,9 @@ bool TQGLWidget::isValid() const
/*!
\fn bool TQGLWidget::isSharing() const
- Returns TRUE if display list sharing with another TQGLWidget was
+ Returns true if display list sharing with another TQGLWidget was
requested in the constructor, and the GL system was able to
- provide it; otherwise returns FALSE. The GL system may fail to
+ provide it; otherwise returns false. The GL system may fail to
provide display list sharing if the two TQGLWidgets use different
formats.
@@ -1625,8 +1625,8 @@ void TQGLWidget::setFormat( const TQGLFormat &format )
list sharing with that context, but it may fail. Use isSharing() to
test.
- If \a deleteOldContext is TRUE (the default), the existing context
- will be deleted. You may use FALSE here if you have kept a pointer
+ If \a deleteOldContext is true (the default), the existing context
+ will be deleted. You may use false here if you have kept a pointer
to the old context (as returned by context()), and want to restore
that context later.
@@ -1803,9 +1803,9 @@ void TQGLWidget::paintEvent( TQPaintEvent * )
high unless one of these parameters is 0 (the default), in which
case the pixmap will have the same size as the widget.
- If \a useContext is TRUE, this method will try to be more
+ If \a useContext is true, this method will try to be more
efficient by using the existing GL context to render the pixmap.
- The default is FALSE. Only use TRUE if you understand the risks.
+ The default is false. Only use true if you understand the risks.
Overlays are not rendered onto the pixmap.
@@ -1830,7 +1830,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
// make sure the pixmap uses the same visual as the widget itself
if ( needConversion ) {
- TQPaintDeviceX11Data* xd = pm.getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = pm.getX11Data( true );
xd->x_depth = x11Depth();
xd->x_visual = (Visual *) x11Visual();
pm.setX11Data( xd );
@@ -1842,14 +1842,14 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
glcx->doneCurrent();
- bool success = TRUE;
+ bool success = true;
if ( useContext && isValid() && renderCxPm( &pm ) )
return pm;
TQGLFormat fmt = glcx->requestedFormat();
- fmt.setDirectRendering( FALSE ); // Direct is unlikely to work
- fmt.setDoubleBuffer( FALSE ); // We don't need dbl buf
+ fmt.setDirectRendering( false ); // Direct is unlikely to work
+ fmt.setDoubleBuffer( false ); // We don't need dbl buf
TQGLContext* ocx = glcx;
bool wasCurrent = (TQGLContext::currentContext() == ocx );
@@ -1860,7 +1860,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
if ( glcx->isValid() )
updateGL();
else
- success = FALSE;
+ success = false;
delete glcx;
glcx = ocx;
@@ -1885,7 +1885,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
/*!
- Returns an image of the frame buffer. If \a withAlpha is TRUE the
+ Returns an image of the frame buffer. If \a withAlpha is true the
alpha channel is included.
Depending on your hardware, you can explicitly select which color
@@ -1895,7 +1895,7 @@ TQPixmap TQGLWidget::renderPixmap( int w, int h, bool useContext )
TQImage TQGLWidget::grabFrameBuffer( bool withAlpha )
{
#if defined( TQ_WS_MAC )
- if(dblbuf == macInternalDoubleBuffer(FALSE) && gl_pix) //why not optimize?
+ if(dblbuf == macInternalDoubleBuffer(false) && gl_pix) //why not optimize?
return ((TQPixmap*)gl_pix)->convertToImage();
#endif
makeCurrent();
@@ -1958,7 +1958,7 @@ void TQGLWidget::glInit()
return;
makeCurrent();
initializeGL();
- glcx->setInitialized( TRUE );
+ glcx->setInitialized( true );
}
diff --git a/src/opengl/tqgl.h b/src/opengl/tqgl.h
index 53bdd0e5a..604dfee1d 100644
--- a/src/opengl/tqgl.h
+++ b/src/opengl/tqgl.h
@@ -304,12 +304,12 @@ public:
#ifndef Q_QDOC
virtual void setContext( TQGLContext* context,
const TQGLContext* shareContext = 0,
- bool deleteOldContext = TRUE );
+ bool deleteOldContext = true );
#endif
virtual TQPixmap renderPixmap( int w = 0, int h = 0,
- bool useContext = FALSE );
- virtual TQImage grabFrameBuffer( bool withAlpha = FALSE );
+ bool useContext = false );
+ virtual TQImage grabFrameBuffer( bool withAlpha = false );
virtual void makeOverlayCurrent();
const TQGLContext* overlayContext() const;
@@ -318,7 +318,7 @@ public:
void setMouseTracking( bool enable );
virtual void reparent( TQWidget* parent, WFlags f, const TQPoint& p,
- bool showIt = FALSE );
+ bool showIt = false );
const TQGLColormap & colormap() const;
void setColormap( const TQGLColormap & map );
@@ -384,8 +384,8 @@ private:
void macInternalRecreateContext( TQGLContext *ctx,
const TQGLContext* = NULL,
- bool update = TRUE );
- bool macInternalDoubleBuffer( bool fix = TRUE );
+ bool update = true );
+ bool macInternalDoubleBuffer( bool fix = true );
virtual void setRegionDirty( bool );
virtual void macWidgetChangedWindow();
#endif
diff --git a/src/opengl/tqgl_x11.cpp b/src/opengl/tqgl_x11.cpp
index 95a92e566..4c716fac2 100644
--- a/src/opengl/tqgl_x11.cpp
+++ b/src/opengl/tqgl_x11.cpp
@@ -124,19 +124,19 @@ _glXWaitX qt_glXWaitX;
bool qt_resolve_gl_symbols(bool fatal)
{
- static bool gl_syms_resolved = FALSE;
+ static bool gl_syms_resolved = false;
if (gl_syms_resolved)
- return TRUE;
+ return true;
TQLibrary gl("GL.so.1");
- gl.setAutoUnload(FALSE);
+ gl.setAutoUnload(false);
qt_glCallLists = (_glCallLists) gl.resolve("glCallLists");
if (!qt_glCallLists) { // if this fails the rest will surely fail
if (fatal)
tqFatal("Unable to resolve GL/GLX symbols - please check your GL library installation.");
- return FALSE;
+ return false;
}
qt_glClearColor = (_glClearColor) gl.resolve("glClearColor");
@@ -181,8 +181,8 @@ bool qt_resolve_gl_symbols(bool fatal)
qt_glXSwapBuffers = (_glXSwapBuffers) gl.resolve("glXSwapBuffers");
qt_glXUseXFont = (_glXUseXFont) gl.resolve("glXUseXFont");
qt_glXWaitX = (_glXWaitX) gl.resolve("glXWaitX");
- gl_syms_resolved = TRUE;
- return TRUE;
+ gl_syms_resolved = true;
+ return true;
}
#endif // QT_DLOPEN_OPENGL
@@ -206,7 +206,7 @@ struct CMapEntry {
CMapEntry::CMapEntry()
{
cmap = 0;
- alloc = FALSE;
+ alloc = false;
scmap.colormap = 0;
}
@@ -217,18 +217,18 @@ CMapEntry::~CMapEntry()
}
static TQIntDict<CMapEntry> *cmap_dict = 0;
-static bool mesa_gl = FALSE;
+static bool mesa_gl = false;
static TQIntDict< TQMap<int, TQRgb> > *qglcmap_dict = 0;
static void cleanup_cmaps()
{
if (cmap_dict) {
- cmap_dict->setAutoDelete(TRUE);
+ cmap_dict->setAutoDelete(true);
delete cmap_dict;
cmap_dict = 0;
}
if (qglcmap_dict) {
- qglcmap_dict->setAutoDelete(TRUE);
+ qglcmap_dict->setAutoDelete(true);
delete qglcmap_dict;
qglcmap_dict = 0;
}
@@ -262,7 +262,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
}
if ( mesa_gl ) { // we're using MesaGL
- Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", TRUE );
+ Atom hp_cmaps = XInternAtom( dpy, "_HP_RGB_SMOOTH_MAP_LIST", true );
if ( hp_cmaps && vi->visual->c_class == TrueColor && vi->depth == 8 ) {
if ( XGetRGBColormaps(dpy,RootWindow(dpy,vi->screen),&c,&n,
hp_cmaps) ) {
@@ -294,7 +294,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
#endif
if ( XmuLookupStandardColormap(dpy,vi->screen,vi->visualid,vi->depth,
- XA_RGB_DEFAULT_MAP,FALSE,TRUE) ) {
+ XA_RGB_DEFAULT_MAP,false,true) ) {
if ( XGetRGBColormaps(dpy,RootWindow(dpy,vi->screen),&c,&n,
XA_RGB_DEFAULT_MAP) ) {
i = 0;
@@ -314,7 +314,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi )
if ( !x->cmap ) { // no shared cmap found
x->cmap = XCreateColormap( dpy, RootWindow(dpy,vi->screen), vi->visual,
AllocNone );
- x->alloc = TRUE;
+ x->alloc = true;
// tqDebug( "Allocating cmap" );
}
@@ -331,7 +331,7 @@ struct TransColor
};
static TQMemArray<TransColor> trans_colors;
-static int trans_colors_init = FALSE;
+static int trans_colors_init = false;
static void find_trans_colors()
@@ -343,7 +343,7 @@ static void find_trans_colors()
long layer;
};
- trans_colors_init = TRUE;
+ trans_colors_init = true;
Display* appDisplay = TQPaintDevice::x11AppDisplay();
@@ -397,8 +397,8 @@ static void find_trans_colors()
bool TQGLFormat::hasOpenGL()
{
- if (!qt_resolve_gl_symbols(FALSE))
- return FALSE;
+ if (!qt_resolve_gl_symbols(false))
+ return false;
return glXQueryExtension(tqt_xdisplay(),0,0) != 0;
}
@@ -422,7 +422,7 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
Display* disp = d->paintDevice->x11Display();
vi = chooseVisual();
if ( !vi )
- return FALSE;
+ return false;
if ( deviceIsPixmap() &&
(((XVisualInfo*)vi)->depth != d->paintDevice->x11Depth() ||
@@ -436,12 +436,12 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
int nvis;
vi = XGetVisualInfo( disp, VisualIDMask | VisualScreenMask, &appVisInfo, &nvis );
if ( !vi )
- return FALSE;
+ return false;
int useGL;
glXGetConfig( disp, (XVisualInfo*)vi, GLX_USE_GL, &useGL );
if ( !useGL )
- return FALSE; //# Chickening out already...
+ return false; //# Chickening out already...
}
int res;
glXGetConfig( disp, (XVisualInfo*)vi, GLX_LEVEL, &res );
@@ -484,12 +484,12 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
cx = glXCreateContext( disp, (XVisualInfo *)vi,
(GLXContext)shareContext->cx, direct );
if ( cx )
- d->sharing = TRUE;
+ d->sharing = true;
}
if ( !cx )
cx = glXCreateContext( disp, (XVisualInfo *)vi, None, direct );
if ( !cx )
- return FALSE;
+ return false;
glFormat.setDirectRendering( glXIsDirect( disp, (GLXContext)cx ) );
if ( deviceIsPixmap() ) {
#if defined(GLX_MESA_pixmap_colormap) && defined(TQGL_USE_MESA_EXT)
@@ -501,9 +501,9 @@ bool TQGLContext::chooseContext( const TQGLContext* shareContext )
d->paintDevice->handle() );
#endif
if ( !gpm )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
@@ -525,50 +525,50 @@ void *TQGLContext::chooseVisual()
//todo: if pixmap, also make sure that vi->depth == pixmap->depth
void* vis = 0;
int i = 0;
- bool fail = FALSE;
+ bool fail = false;
TQGLFormat fmt = format();
bool tryDouble = !fmt.doubleBuffer(); // Some GL impl's only have double
- bool triedDouble = FALSE;
+ bool triedDouble = false;
while( !fail && !( vis = tryVisual( fmt, bufDepths[i] ) ) ) {
if ( !fmt.rgba() && bufDepths[i] > 1 ) {
i++;
continue;
}
if ( tryDouble ) {
- fmt.setDoubleBuffer( TRUE );
- tryDouble = FALSE;
- triedDouble = TRUE;
+ fmt.setDoubleBuffer( true );
+ tryDouble = false;
+ triedDouble = true;
continue;
}
else if ( triedDouble ) {
- fmt.setDoubleBuffer( FALSE );
- triedDouble = FALSE;
+ fmt.setDoubleBuffer( false );
+ triedDouble = false;
}
if ( fmt.stereo() ) {
- fmt.setStereo( FALSE );
+ fmt.setStereo( false );
continue;
}
if ( fmt.accum() ) {
- fmt.setAccum( FALSE );
+ fmt.setAccum( false );
continue;
}
if ( fmt.stencil() ) {
- fmt.setStencil( FALSE );
+ fmt.setStencil( false );
continue;
}
if ( fmt.alpha() ) {
- fmt.setAlpha( FALSE );
+ fmt.setAlpha( false );
continue;
}
if ( fmt.depth() ) {
- fmt.setDepth( FALSE );
+ fmt.setDepth( false );
continue;
}
if ( fmt.doubleBuffer() ) {
- fmt.setDoubleBuffer( FALSE );
+ fmt.setDoubleBuffer( false );
continue;
}
- fail = TRUE;
+ fail = true;
}
glFormat = fmt;
return vis;
@@ -594,8 +594,8 @@ void *TQGLContext::tryVisual( const TQGLFormat& f, int bufDepth )
spec[i++] = f.plane();
#if defined(GLX_VERSION_1_1) && defined(GLX_EXT_visual_info)
- static bool useTranspExt = FALSE;
- static bool useTranspExtChecked = FALSE;
+ static bool useTranspExt = false;
+ static bool useTranspExtChecked = false;
if ( f.plane() && !useTranspExtChecked && d->paintDevice ) {
TQCString estr( glXQueryExtensionsString( d->paintDevice->x11Display(),
d->paintDevice->x11Screen() ) );
@@ -615,12 +615,12 @@ void *TQGLContext::tryVisual( const TQGLFormat& f, int bufDepth )
XVisualInfo * vinf = glXChooseVisual( d->paintDevice->x11Display(),
d->paintDevice->x11Screen(), tmpSpec );
if ( !vinf ) {
- useTranspExt = FALSE;
+ useTranspExt = false;
}
}
}
- useTranspExtChecked = TRUE;
+ useTranspExtChecked = true;
}
if ( f.plane() && useTranspExt ) {
// Required to avoid non-transparent overlay visual(!) on some systems
@@ -691,11 +691,11 @@ void TQGLContext::reset()
XFree( vi );
vi = 0;
cx = 0;
- d->crWin = FALSE;
- d->sharing = FALSE;
- d->valid = FALSE;
+ d->crWin = false;
+ d->sharing = false;
+ d->valid = false;
d->transpColor = TQColor();
- d->initDone = FALSE;
+ d->initDone = false;
}
@@ -707,7 +707,7 @@ void TQGLContext::makeCurrent()
#endif
return;
}
- bool ok = TRUE;
+ bool ok = true;
if ( deviceIsPixmap() )
ok = glXMakeCurrent( d->paintDevice->x11Display(),
(GLXPixmap)gpm,
@@ -816,7 +816,7 @@ uint TQGLContext::colorIndex( const TQColor& c ) const
// need to alloc color
unsigned long plane_mask[2];
unsigned long color_map_entry;
- if (!XAllocColorCells (TQPaintDevice::x11AppDisplay(), x->cmap, TRUE, plane_mask, 0,
+ if (!XAllocColorCells (TQPaintDevice::x11AppDisplay(), x->cmap, true, plane_mask, 0,
&color_map_entry, 1))
return c.pixel(screen);
@@ -1034,7 +1034,7 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
glcx = 0;
olw = 0;
- autoSwap = TRUE;
+ autoSwap = true;
if ( !context->device() )
context->setDevice( this );
@@ -1050,13 +1050,13 @@ void TQGLWidget::init( TQGLContext *context, const TQGLWidget *shareWidget )
olw = new TQGLOverlayWidget( TQGLFormat::defaultOverlayFormat(),
this, olwName, shareWidget );
if ( olw->isValid() ) {
- olw->setAutoBufferSwap( FALSE );
+ olw->setAutoBufferSwap( false );
olw->setFocusProxy( this );
}
else {
delete olw;
olw = 0;
- glcx->glFormat.setOverlay( FALSE );
+ glcx->glFormat.setOverlay( false );
}
}
}
@@ -1067,7 +1067,7 @@ void TQGLWidget::reparent( TQWidget* parent, WFlags f, const TQPoint& p,
{
if (glcx)
glcx->doneCurrent();
- TQWidget::reparent( parent, f, p, FALSE );
+ TQWidget::reparent( parent, f, p, false );
if ( showIt )
show();
}
@@ -1138,10 +1138,10 @@ void TQGLWidget::setContext( TQGLContext *context,
TQGLContext* oldcx = glcx;
glcx = context;
- bool createFailed = FALSE;
+ bool createFailed = false;
if ( !glcx->isValid() ) {
if ( !glcx->create( shareContext ? shareContext : oldcx ) )
- createFailed = TRUE;
+ createFailed = true;
}
if ( createFailed ) {
if ( deleteOldContext )
@@ -1213,14 +1213,14 @@ void TQGLWidget::setContext( TQGLContext *context,
if ( visible )
show();
XFlush( x11Display() );
- glcx->setWindowCreated( TRUE );
+ glcx->setWindowCreated( true );
}
bool TQGLWidget::renderCxPm( TQPixmap* pm )
{
if ( ((XVisualInfo*)glcx->vi)->depth != pm->depth() )
- return FALSE;
+ return false;
GLXPixmap glPm;
#if defined(GLX_MESA_pixmap_colormap) && defined(TQGL_USE_MESA_EXT)
@@ -1237,7 +1237,7 @@ bool TQGLWidget::renderCxPm( TQPixmap* pm )
if ( !glXMakeCurrent( x11Display(), glPm, (GLXContext)glcx->cx ) ) {
glXDestroyGLXPixmap( x11Display(), glPm );
- return FALSE;
+ return false;
}
glDrawBuffer( GL_FRONT );
@@ -1249,7 +1249,7 @@ bool TQGLWidget::renderCxPm( TQPixmap* pm )
makeCurrent();
glXDestroyGLXPixmap( x11Display(), glPm );
resizeGL( width(), height() );
- return TRUE;
+ return true;
}
const TQGLColormap & TQGLWidget::colormap() const
@@ -1282,7 +1282,7 @@ static void qStoreColors( TQWidget * tlw, Colormap cmap,
*/
static bool qCanAllocColors( TQWidget * w )
{
- bool validVisual = FALSE;
+ bool validVisual = false;
int numVisuals;
long mask;
XVisualInfo templ;
@@ -1301,11 +1301,11 @@ static bool qCanAllocColors( TQWidget * w )
case StaticColor:
case StaticGray:
case GrayScale:
- validVisual = FALSE;
+ validVisual = false;
break;
case DirectColor:
case PseudoColor:
- validVisual = TRUE;
+ validVisual = true;
break;
}
break;
@@ -1314,8 +1314,8 @@ static bool qCanAllocColors( TQWidget * w )
XFree( visuals );
if ( !validVisual )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
void TQGLWidget::setColormap( const TQGLColormap & c )
diff --git a/src/opengl/tqgl_x11_p.h b/src/opengl/tqgl_x11_p.h
index cbcd741b9..076d83b8d 100644
--- a/src/opengl/tqgl_x11_p.h
+++ b/src/opengl/tqgl_x11_p.h
@@ -52,7 +52,7 @@
#ifdef QT_DLOPEN_OPENGL
// resolve the GL symbols we use ourselves
-bool qt_resolve_gl_symbols(bool = TRUE);
+bool qt_resolve_gl_symbols(bool = true);
extern "C" {
// GL symbols
typedef void (*_glCallLists)( GLsizei n, GLenum type, const GLvoid *lists );
@@ -192,6 +192,6 @@ extern _glXWaitX qt_glXWaitX;
#define glXWaitX qt_glXWaitX
#else
-inline bool qt_resolve_gl_symbols(bool = TRUE) { return TRUE; }
+inline bool qt_resolve_gl_symbols(bool = true) { return true; }
#endif // QT_DLOPEN_OPENGL
#endif // TQGL_P_H
diff --git a/src/opengl/tqglcolormap.cpp b/src/opengl/tqglcolormap.cpp
index 5f1c580f1..8765a6d55 100644
--- a/src/opengl/tqglcolormap.cpp
+++ b/src/opengl/tqglcolormap.cpp
@@ -234,7 +234,7 @@ TQColor TQGLColormap::entryColor( int idx ) const
}
/*!
- Returns TRUE if the colormap is empty; otherwise returns FALSE. A
+ Returns true if the colormap is empty; otherwise returns false. A
colormap with no color values set is considered to be empty.
*/
bool TQGLColormap::isEmpty() const