summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 15:17:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-08 19:38:03 +0900
commit7d612f7c91d55501276a385a30dbadb121e7bd9f (patch)
tree4c6f1546e16db32779dfbf5c9e107b938faee6bb
parent5a863a8932d14b99c5f838c4efa1618070d71b29 (diff)
downloadtqt-rename/true-false-8.tar.gz
tqt-rename/true-false-8.zip
Replace TRUE/FALSE with boolean values true/false - part 8rename/true-false-8
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--src/kernel/qdnd_x11.cpp136
-rw-r--r--src/kernel/tqabstractlayout.cpp140
-rw-r--r--src/kernel/tqaccel.cpp80
-rw-r--r--src/kernel/tqaccessible.cpp24
-rw-r--r--src/kernel/tqapplication.cpp312
-rw-r--r--src/kernel/tqapplication.h16
-rw-r--r--src/kernel/tqapplication_x11.cpp492
-rw-r--r--src/kernel/tqasyncimageio.cpp42
-rw-r--r--src/kernel/tqasyncio.cpp30
-rw-r--r--src/kernel/tqbitmap.cpp28
-rw-r--r--src/kernel/tqbitmap.h8
-rw-r--r--src/kernel/tqclipboard.cpp20
-rw-r--r--src/kernel/tqclipboard_x11.cpp136
-rw-r--r--src/kernel/tqcolor.cpp38
-rw-r--r--src/kernel/tqcolor_p.cpp6
-rw-r--r--src/kernel/tqcolor_x11.cpp96
-rw-r--r--src/kernel/tqcursor_x11.cpp6
-rw-r--r--src/kernel/tqdesktopwidget_x11.cpp10
-rw-r--r--src/kernel/tqdragobject.cpp116
-rw-r--r--src/kernel/tqdragobject.h2
-rw-r--r--src/kernel/tqdrawutil.cpp28
-rw-r--r--src/kernel/tqdrawutil.h20
-rw-r--r--src/kernel/tqdropsite.cpp4
-rw-r--r--src/kernel/tqevent.cpp136
-rw-r--r--src/kernel/tqevent.h74
-rw-r--r--src/kernel/tqeventloop.cpp34
-rw-r--r--src/kernel/tqeventloop_p.h6
-rw-r--r--src/kernel/tqeventloop_unix.cpp24
-rw-r--r--src/kernel/tqeventloop_unix_glib.cpp38
-rw-r--r--src/kernel/tqeventloop_x11.cpp12
-rw-r--r--src/kernel/tqeventloop_x11_glib.cpp34
-rw-r--r--src/kernel/tqfont.cpp108
-rw-r--r--src/kernel/tqfont.h4
-rw-r--r--src/kernel/tqfont_x11.cpp18
-rw-r--r--src/kernel/tqfontdata_p.h8
-rw-r--r--src/kernel/tqfontdatabase.cpp110
-rw-r--r--src/kernel/tqfontdatabase_x11.cpp138
-rw-r--r--src/kernel/tqfontengine_p.h2
-rw-r--r--src/kernel/tqfontengine_x11.cpp96
-rw-r--r--src/kernel/tqguardedptr.cpp12
-rw-r--r--src/kernel/tqiconset.cpp44
-rw-r--r--src/kernel/tqimage.cpp249
-rw-r--r--src/kernel/tqimage.h4
-rw-r--r--src/kernel/tqimageformatplugin.cpp4
-rw-r--r--src/kernel/tqinputcontext.cpp30
-rw-r--r--src/kernel/tqinputcontext_x11.cpp4
-rw-r--r--src/kernel/tqinternal.cpp54
-rw-r--r--src/kernel/tqjpegio.cpp20
-rw-r--r--src/kernel/tqkeysequence.cpp18
-rw-r--r--src/kernel/tqlayout.cpp114
-rw-r--r--src/kernel/tqlayoutengine.cpp22
-rw-r--r--src/kernel/tqlayoutengine_p.h4
-rw-r--r--src/kernel/tqlocalfs.cpp6
-rw-r--r--src/kernel/tqmetaobject.cpp132
-rw-r--r--src/kernel/tqmetaobject.h38
-rw-r--r--src/kernel/tqmime.cpp20
-rw-r--r--src/kernel/tqmngio.cpp22
-rw-r--r--src/kernel/tqmotifdnd_x11.cpp10
-rw-r--r--src/kernel/tqmovie.cpp52
-rw-r--r--src/kernel/tqnetworkprotocol.cpp40
-rw-r--r--src/kernel/tqobject.cpp314
-rw-r--r--src/kernel/tqobject.h8
-rw-r--r--src/kernel/tqobjectcleanuphandler.cpp14
-rw-r--r--src/kernel/tqobjectdict.h2
-rw-r--r--src/kernel/tqpaintdevice.h8
-rw-r--r--src/kernel/tqpaintdevice_x11.cpp60
-rw-r--r--src/kernel/tqpainter.cpp106
-rw-r--r--src/kernel/tqpainter.h16
-rw-r--r--src/kernel/tqpainter_x11.cpp132
-rw-r--r--src/kernel/tqpalette.cpp26
-rw-r--r--src/kernel/tqpicture.cpp94
-rw-r--r--src/kernel/tqpixmap.cpp74
-rw-r--r--src/kernel/tqpixmap.h12
-rw-r--r--src/kernel/tqpixmap_x11.cpp104
-rw-r--r--src/kernel/tqpixmapcache.cpp14
-rw-r--r--src/kernel/tqpngio.cpp56
-rw-r--r--src/kernel/tqpoint.cpp10
-rw-r--r--src/kernel/tqpointarray.cpp36
-rw-r--r--src/kernel/tqpointarray.h2
-rw-r--r--src/kernel/tqpolygonscanner.cpp16
-rw-r--r--src/kernel/tqprinter.cpp60
-rw-r--r--src/kernel/tqprinter_unix.cpp44
-rw-r--r--src/kernel/tqprocess.cpp74
-rw-r--r--src/kernel/tqprocess_unix.cpp102
-rw-r--r--src/kernel/tqpsprinter.cpp202
-rw-r--r--src/kernel/tqrect.cpp38
-rw-r--r--src/kernel/tqrect.h4
-rw-r--r--src/kernel/tqregion.h4
-rw-r--r--src/kernel/tqregion_x11.cpp102
-rw-r--r--src/kernel/tqrichtext.cpp622
-rw-r--r--src/kernel/tqrichtext_p.cpp56
-rw-r--r--src/kernel/tqrichtext_p.h74
-rw-r--r--src/kernel/tqscriptengine.cpp74
-rw-r--r--src/kernel/tqscriptengine_x11.cpp164
-rw-r--r--src/kernel/tqsignal.cpp4
-rw-r--r--src/kernel/tqsignalmapper.cpp2
-rw-r--r--src/kernel/tqsimplerichtext.cpp22
-rw-r--r--src/kernel/tqsimplerichtext.h2
-rw-r--r--src/kernel/tqsize.cpp18
-rw-r--r--src/kernel/tqsizegrip.cpp2
-rw-r--r--src/kernel/tqsizepolicy.h4
-rw-r--r--src/kernel/tqsocketnotifier.cpp14
-rw-r--r--src/kernel/tqsound.cpp10
-rw-r--r--src/kernel/tqsound_x11.cpp22
-rw-r--r--src/kernel/tqstyle.cpp74
-rw-r--r--src/kernel/tqstyle.h6
-rw-r--r--src/kernel/tqstylesheet.cpp82
-rw-r--r--src/kernel/tqtextengine.cpp60
-rw-r--r--src/kernel/tqtextengine_p.h4
-rw-r--r--src/kernel/tqtextengine_unix.cpp2
-rw-r--r--src/kernel/tqtextlayout.cpp4
-rw-r--r--src/kernel/tqthread.cpp14
-rw-r--r--src/kernel/tqthread_unix.cpp40
-rw-r--r--src/kernel/tqtimer.cpp18
-rw-r--r--src/kernel/tqtimer.h2
-rw-r--r--src/kernel/tqtranslator.cpp70
-rw-r--r--src/kernel/tqtranslator.h2
-rw-r--r--src/kernel/tqucomextra.cpp16
-rw-r--r--src/kernel/tqurl.cpp120
-rw-r--r--src/kernel/tqurl.h6
-rw-r--r--src/kernel/tqurlinfo.cpp76
-rw-r--r--src/kernel/tqurloperator.cpp56
-rw-r--r--src/kernel/tqurloperator.h6
-rw-r--r--src/kernel/tqvariant.cpp154
-rw-r--r--src/kernel/tqvariant.h2
-rw-r--r--src/kernel/tqwidget.cpp228
-rw-r--r--src/kernel/tqwidget.h42
-rw-r--r--src/kernel/tqwidget_x11.cpp66
-rw-r--r--src/kernel/tqwmatrix.cpp26
-rw-r--r--src/network/tqdns.cpp2
-rw-r--r--src/widgets/tqlistbox.cpp2
-rw-r--r--src/widgets/tqlistview.cpp4
132 files changed, 3769 insertions, 3770 deletions
diff --git a/src/kernel/qdnd_x11.cpp b/src/kernel/qdnd_x11.cpp
index 57bdcffd4..4f6b54ba7 100644
--- a/src/kernel/qdnd_x11.cpp
+++ b/src/kernel/qdnd_x11.cpp
@@ -204,9 +204,9 @@ static Time qt_xdnd_target_current_time;
// screen number containing the pointer... -1 means default
static int qt_xdnd_current_screen = -1;
// state of dragging... true if dragging, false if not
-bool qt_xdnd_dragging = FALSE;
+bool qt_xdnd_dragging = false;
// need to check state of keyboard modifiers
-static bool need_modifiers_check = FALSE;
+static bool need_modifiers_check = false;
// dict of payload data, sorted by type atom
static TQIntDict<TQByteArray> * qt_xdnd_target_data = 0;
@@ -219,8 +219,8 @@ extern void qt_motifdnd_enable( TQWidget *, bool );
extern TQByteArray qt_motifdnd_obtain_data( const char *format );
extern const char *qt_motifdnd_format( int n );
-bool qt_motifdnd_active = FALSE;
-static bool dndCancelled = FALSE;
+bool qt_motifdnd_active = false;
+static bool dndCancelled = false;
// Shift/Ctrl handling, and final drop status
static TQDragObject::DragMode drag_mode;
@@ -324,7 +324,7 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
TQWidget * xdnd_widget = 0;
if ( w->isDesktop() ) {
if ( desktop_proxy ) // *WE* already have one.
- return FALSE;
+ return false;
// As per Xdnd4, use XdndProxy
XGrabServer( w->x11Display() );
@@ -375,9 +375,9 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
XChangeProperty ( xdnd_widget->x11Display(), xdnd_widget->winId(),
qt_xdnd_aware, XA_ATOM, 32, PropModeReplace,
(unsigned char *)&atm, 1 );
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else {
if ( w->isDesktop() ) {
@@ -386,7 +386,7 @@ static bool qt_xdnd_enable( TQWidget* w, bool on )
delete desktop_proxy;
desktop_proxy = 0;
}
- return TRUE;
+ return true;
}
}
@@ -399,7 +399,7 @@ const char* qt_xdnd_atom_to_str( Atom a )
if ( !qt_xdnd_drag_types ) {
qt_xdnd_drag_types = new TQIntDict<TQCString>( 17 );
- qt_xdnd_drag_types->setAutoDelete( TRUE );
+ qt_xdnd_drag_types->setAutoDelete( true );
}
TQCString* result;
if ( !(result=qt_xdnd_drag_types->find( a )) ) {
@@ -419,7 +419,7 @@ Atom* qt_xdnd_str_to_atom( const char *mimeType )
return 0;
if ( !qt_xdnd_atom_numbers ) {
qt_xdnd_atom_numbers = new TQDict<Atom>( 17 );
- qt_xdnd_atom_numbers->setAutoDelete( TRUE );
+ qt_xdnd_atom_numbers->setAutoDelete( true );
}
Atom * result;
@@ -492,9 +492,9 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
TQWidget * w = tlw;
p = w->mapFromGlobal( p );
- bool done = FALSE;
+ bool done = false;
while ( !done ) {
- done = TRUE;
+ done = true;
if ( ((TQExtraWidget*)w)->extraData() &&
((TQExtraWidget*)w)->extraData()->xDndProxy != 0 )
break; // stop searching for widgets under the mouse cursor if found widget is a proxy.
@@ -509,7 +509,7 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
((TQWidget*)o)->geometry().contains( p ) &&
!((TQWidget*)o)->isTopLevel()) {
w = (TQWidget *)o;
- done = FALSE;
+ done = false;
p = w->mapFromParent( p );
break;
}
@@ -523,7 +523,7 @@ static TQWidget * find_child( TQWidget * tlw, TQPoint & p )
static bool checkEmbedded(TQWidget* w, const XEvent* xe)
{
if (!w)
- return FALSE;
+ return false;
if (current_embedding_widget != 0 && current_embedding_widget != w) {
qt_xdnd_current_target = ((TQExtraWidget*)current_embedding_widget)->extraData()->xDndProxy;
@@ -549,10 +549,10 @@ static bool checkEmbedded(TQWidget* w, const XEvent* xe)
XSendEvent( TQPaintDevice::x11AppDisplay(), extra->xDndProxy, False, NoEventMask,
(XEvent*)xe );
qt_xdnd_current_widget = w;
- return TRUE;
+ return true;
}
current_embedding_widget = 0;
- return FALSE;
+ return false;
}
void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
@@ -560,11 +560,11 @@ void qt_handle_xdnd_enter( TQWidget *, const XEvent * xe, bool /*passive*/ )
//if ( !w->neveHadAChildWithDropEventsOn() )
//return; // haven't been set up for dnd
- qt_motifdnd_active = FALSE;
+ qt_motifdnd_active = false;
last_enter_event.xclient = xe->xclient;
- qt_xdnd_target_answerwas = FALSE;
+ qt_xdnd_target_answerwas = false;
const long *l = xe->xclient.data.l;
int version = (int)(((unsigned long)(l[1])) >> 24);
@@ -650,7 +650,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
me.setAction(accepted_action);
if ( c != qt_xdnd_current_widget ) {
- qt_xdnd_target_answerwas = FALSE;
+ qt_xdnd_target_answerwas = false;
if ( qt_xdnd_current_widget ) {
TQDragLeaveEvent e;
TQApplication::sendEvent( qt_xdnd_current_widget, &e );
@@ -667,7 +667,7 @@ void qt_handle_xdnd_position( TQWidget *w, const XEvent * xe, bool passive )
if ( !de.isActionAccepted() ) // only as a copy (move if we del)
accepted_action = TQDropEvent::Copy;
else
- me.acceptAction(TRUE);
+ me.acceptAction(true);
} else {
me.ignore( de.answerRect() );
}
@@ -814,7 +814,7 @@ void qt_xdnd_send_leave()
w = 0;
if ( w )
- qt_handle_xdnd_leave( w, (const XEvent *)&leave, FALSE );
+ qt_handle_xdnd_leave( w, (const XEvent *)&leave, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
NoEventMask, (XEvent*)&leave );
@@ -862,7 +862,7 @@ void qt_handle_xdnd_drop( TQWidget *, const XEvent * xe, bool passive )
if ( !de.isAccepted() ) {
// Ignore a failed drag
global_accepted_action = TQDropEvent::Copy;
- dndCancelled = TRUE;
+ dndCancelled = true;
}
XClientMessageEvent finished;
finished.type = ClientMessage;
@@ -915,7 +915,7 @@ void TQDragManager::timerEvent( TQTimerEvent* e )
if( updateMode( (ButtonState)qt_x11_translateButtonState( mask )))
qt_xdnd_source_sameanswer = TQRect(); // force move
}
- need_modifiers_check = TRUE;
+ need_modifiers_check = true;
if( qt_xdnd_source_sameanswer.isNull() )
move( TQCursor::pos() );
}
@@ -968,17 +968,17 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
tqApp->removeEventFilter( this );
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
- return TRUE; // block the key release
+ return true; // block the key release
}
- return FALSE;
+ return false;
}
Q_ASSERT( object != 0 );
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
if ( e->type() == TQEvent::MouseMove ) {
TQMouseEvent* me = (TQMouseEvent *)e;
@@ -986,8 +986,8 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
updateMode(me->stateAfter());
move( me->globalPos() );
}
- need_modifiers_check = FALSE;
- return TRUE;
+ need_modifiers_check = false;
+ return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
tqApp->removeEventFilter( this );
if ( willDrop )
@@ -996,21 +996,21 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
cancel();
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::DragResponse ) {
if ( ((TQDragResponseEvent *)e)->dragAccepted() ) {
if ( !willDrop ) {
- willDrop = TRUE;
+ willDrop = true;
}
} else {
if ( willDrop ) {
- willDrop = FALSE;
+ willDrop = false;
}
}
updateCursor();
- return TRUE;
+ return true;
}
if ( e->type() == TQEvent::KeyPress
@@ -1022,16 +1022,16 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
tqApp->removeEventFilter( this );
object = 0;
dragSource = 0;
- beingCancelled = FALSE;
+ beingCancelled = false;
tqApp->exit_loop();
} else {
if( updateMode(ke->stateAfter())) {
qt_xdnd_source_sameanswer = TQRect(); // force move
move( TQCursor::pos() );
}
- need_modifiers_check = FALSE;
+ need_modifiers_check = false;
}
- return TRUE; // Eat all key events
+ return true; // Eat all key events
}
// ### We bind modality to widgets, so we have to do this
@@ -1048,9 +1048,9 @@ bool TQDragManager::eventFilter( TQObject * o, TQEvent * e)
case TQEvent::Accel:
case TQEvent::AccelAvailable:
case TQEvent::AccelOverride:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -1125,7 +1125,7 @@ void TQDragManager::updateCursor()
}
#ifndef TQT_NO_CURSOR
if ( c )
- tqApp->setOverrideCursor( *c, TRUE );
+ tqApp->setOverrideCursor( *c, true );
#endif
}
@@ -1135,7 +1135,7 @@ void TQDragManager::cancel( bool deleteSource )
killTimer( heartbeat );
heartbeat = -1;
if ( object ) {
- beingCancelled = TRUE;
+ beingCancelled = true;
object = 0;
}
@@ -1146,7 +1146,7 @@ void TQDragManager::cancel( bool deleteSource )
#ifndef TQT_NO_CURSOR
if ( restoreCursor ) {
TQApplication::restoreOverrideCursor();
- restoreCursor = FALSE;
+ restoreCursor = false;
}
#endif
@@ -1156,7 +1156,7 @@ void TQDragManager::cancel( bool deleteSource )
delete qt_xdnd_deco;
qt_xdnd_deco = 0;
- dndCancelled = TRUE;
+ dndCancelled = true;
}
static
@@ -1382,7 +1382,7 @@ void TQDragManager::move( const TQPoint & globalPos )
globalPos.y() -2 , 5, 5 );
if ( w ) {
- qt_handle_xdnd_enter( w, (const XEvent *)&enter, FALSE );
+ qt_handle_xdnd_enter( w, (const XEvent *)&enter, false );
} else if ( target ) {
XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
(XEvent*)&enter );
@@ -1404,13 +1404,13 @@ void TQDragManager::move( const TQPoint & globalPos )
move.data.l[4] = qtaction_to_xdndaction( global_requested_action );
if ( w )
- qt_handle_xdnd_position( w, (const XEvent *)&move, FALSE );
+ qt_handle_xdnd_position( w, (const XEvent *)&move, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), proxy_target, False, NoEventMask,
(XEvent*)&move );
} else {
if ( willDrop ) {
- willDrop = FALSE;
+ willDrop = false;
updateCursor();
}
}
@@ -1444,7 +1444,7 @@ void TQDragManager::drop()
w = 0;
if ( w )
- qt_handle_xdnd_drop( w, (const XEvent *)&drop, FALSE );
+ qt_handle_xdnd_drop( w, (const XEvent *)&drop, false );
else
XSendEvent( TQPaintDevice::x11AppDisplay(), qt_xdnd_current_proxy_target, False,
NoEventMask, (XEvent*)&drop );
@@ -1452,7 +1452,7 @@ void TQDragManager::drop()
#ifndef TQT_NO_CURSOR
if ( restoreCursor ) {
TQApplication::restoreOverrideCursor();
- restoreCursor = FALSE;
+ restoreCursor = false;
}
#endif
}
@@ -1468,7 +1468,7 @@ bool qt_xdnd_handle_badwindow()
qt_xdnd_source_object = 0;
delete qt_xdnd_deco;
qt_xdnd_deco = 0;
- return TRUE;
+ return true;
}
if ( qt_xdnd_dragsource_xid ) {
qt_xdnd_dragsource_xid = 0;
@@ -1477,9 +1477,9 @@ bool qt_xdnd_handle_badwindow()
TQApplication::sendEvent( qt_xdnd_current_widget, &e );
qt_xdnd_current_widget = 0;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1501,8 +1501,8 @@ bool qt_xdnd_handle_badwindow()
/*!
- Returns TRUE if this event provides format \a mimeType; otherwise
- returns FALSE.
+ Returns true if this event provides format \a mimeType; otherwise
+ returns false.
\sa data()
*/
@@ -1510,17 +1510,17 @@ bool qt_xdnd_handle_badwindow()
bool TQDropEvent::provides( const char *mimeType ) const
{
if ( qt_motifdnd_active && tqstrnicmp( mimeType, "text/", 5 ) == 0 )
- return TRUE;
+ return true;
int n=0;
const char* f;
do {
f = format( n );
if ( !f )
- return FALSE;
+ return false;
n++;
} while( tqstricmp( mimeType, f ) );
- return TRUE;
+ return true;
}
void qt_xdnd_handle_selection_request( const XSelectionRequestEvent * req )
@@ -1608,14 +1608,14 @@ static TQByteArray qt_xdnd_obtain_data( const char *format )
if ( qt_xclb_read_property( TQPaintDevice::x11AppDisplay(),
tw->winId(),
- qt_xdnd_selection, TRUE,
- &result, 0, &type, 0, FALSE ) ) {
+ qt_xdnd_selection, true,
+ &result, 0, &type, 0, false ) ) {
if ( type == qt_incr_atom ) {
int nbytes = result.size() >= 4 ? *((int*)result.data()) : 0;
result = qt_xclb_read_incremental_property( TQPaintDevice::x11AppDisplay(),
tw->winId(),
qt_xdnd_selection,
- nbytes, FALSE );
+ nbytes, false );
} else if ( type != *a ) {
// (includes None) tqDebug( "TQt clipboard: unknown atom %ld", type);
}
@@ -1648,7 +1648,7 @@ bool qt_dnd_enable( TQWidget* w, bool on )
if ( on ) {
if ( ( (TQExtraWidget*)w)->topData()->dnd )
- return TRUE; // been there, done that
+ return true; // been there, done that
((TQExtraWidget*)w)->topData()->dnd = 1;
}
@@ -1734,12 +1734,12 @@ const char* TQDropEvent::format( int n ) const
bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
{
if ( object == o || !o || !o->parent() )
- return FALSE;
+ return false;
if ( object ) {
cancel();
tqApp->removeEventFilter( this );
- beingCancelled = FALSE;
+ beingCancelled = false;
}
if ( qt_xdnd_source_object ) {
@@ -1772,7 +1772,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
qt_xdnd_source_object->setTarget( 0 );
qt_xdnd_deco = new TQShapedPixmapWidget();
- willDrop = FALSE;
+ willDrop = false;
object = o;
updatePixmap();
@@ -1792,16 +1792,16 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
qt_xdnd_source_sameanswer = TQRect();
move(TQCursor::pos());
heartbeat = startTimer(200);
- need_modifiers_check = FALSE;
+ need_modifiers_check = false;
#ifndef TQT_NO_CURSOR
tqApp->setOverrideCursor( arrowCursor );
- restoreCursor = TRUE;
+ restoreCursor = true;
updateCursor();
#endif
- dndCancelled = FALSE;
- qt_xdnd_dragging = TRUE;
+ dndCancelled = false;
+ qt_xdnd_dragging = true;
if (!TQWidget::mouseGrabber())
qt_xdnd_deco->grabMouse();
@@ -1817,7 +1817,7 @@ bool TQDragManager::drag( TQDragObject * o, TQDragObject::DragMode mode )
killTimer( heartbeat );
heartbeat = -1;
qt_xdnd_current_screen = -1;
- qt_xdnd_dragging = FALSE;
+ qt_xdnd_dragging = false;
return ((! dndCancelled) && // source del?
(global_accepted_action == TQDropEvent::Copy &&
diff --git a/src/kernel/tqabstractlayout.cpp b/src/kernel/tqabstractlayout.cpp
index cbace549d..094c21fa0 100644
--- a/src/kernel/tqabstractlayout.cpp
+++ b/src/kernel/tqabstractlayout.cpp
@@ -269,9 +269,9 @@ TQWidget * TQWidgetItem::widget()
}
/*!
- Returns TRUE if this layout's preferred height depends on its
- width; otherwise returns FALSE. The default implementation returns
- FALSE.
+ Returns true if this layout's preferred height depends on its
+ width; otherwise returns false. The default implementation returns
+ false.
Reimplement this function in layout managers that support height
for width.
@@ -280,7 +280,7 @@ TQWidget * TQWidgetItem::widget()
*/
bool TQLayoutItem::hasHeightForWidth() const
{
- return FALSE;
+ return false;
}
/*!
@@ -403,7 +403,7 @@ TQRect TQLayout::geometry() const
bool TQWidgetItem::hasHeightForWidth() const
{
if ( isEmpty() )
- return FALSE;
+ return false;
if ( wid->layout() )
return wid->layout()->hasHeightForWidth();
return wid->sizePolicy().hasHeightForWidth();
@@ -544,16 +544,16 @@ TQSize TQWidgetItem::sizeHint() const
}
/*!
- Returns TRUE because a spacer item never contains widgets.
+ Returns true because a spacer item never contains widgets.
*/
bool TQSpacerItem::isEmpty() const
{
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if the widget has been hidden; otherwise returns
- FALSE.
+ Returns true if the widget has been hidden; otherwise returns
+ false.
*/
bool TQWidgetItem::isEmpty() const
{
@@ -611,7 +611,7 @@ TQLayout::TQLayout( TQWidget *parent, int margin, int spacing, const char *name
parent->name() );
parent->removeChild( this );
} else {
- topLevel = TRUE;
+ topLevel = true;
parent->installEventFilter( this );
setWidgetLayout( parent, this );
}
@@ -627,14 +627,14 @@ void TQLayout::init()
{
insideSpacing = 0;
outsideBorder = 0;
- topLevel = FALSE;
- enabled = TRUE;
- autoNewChild = FALSE;
- frozen = FALSE;
- activated = FALSE;
- marginImpl = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ topLevel = false;
+ enabled = true;
+ autoNewChild = false;
+ frozen = false;
+ activated = false;
+ marginImpl = false;
+ autoMinimum = false;
+ autoResizeMode = true;
extraData = 0;
#ifndef TQT_NO_MENUBAR
menubar = 0;
@@ -717,8 +717,8 @@ TQLayout::TQLayout( int spacing, const char *name )
/*!
\fn bool TQLayout::isTopLevel () const
- Returns TRUE if this layout is a top-level layout, i.e. not a
- child of another layout; otherwise returns FALSE.
+ Returns true if this layout is a top-level layout, i.e. not a
+ child of another layout; otherwise returns false.
*/
/*!
@@ -784,12 +784,12 @@ TQWidget *TQLayout::mainWidget()
}
/*!
- Returns TRUE if this layout is empty. The default implementation
- returns FALSE.
+ Returns true if this layout is empty. The default implementation
+ returns false.
*/
bool TQLayout::isEmpty() const
{
- return FALSE; //### should check
+ return false; //### should check
}
/*!
@@ -821,17 +821,17 @@ void TQLayout::invalidate()
static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
{
- bool didSomething = FALSE;
+ bool didSomething = false;
TQLayoutIterator it = lay->iterator();
TQLayoutItem *child;
while ( (child = it.current()) != 0 ) {
if ( child->widget() == w ) {
it.deleteCurrent();
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else if ( removeWidgetRecursively(child, w) ) {
lay->invalidate(); // maybe redundant
- didSomething = TRUE;
+ didSomething = true;
} else {
++it;
}
@@ -848,10 +848,10 @@ static bool removeWidgetRecursively( TQLayoutItem *lay, TQWidget *w )
bool TQLayout::eventFilter( TQObject *o, TQEvent *e )
{
if ( !enabled )
- return FALSE;
+ return false;
if ( !o->isWidgetType() )
- return FALSE;
+ return false;
switch ( e->type() ) {
case TQEvent::Resize:
@@ -1184,7 +1184,7 @@ bool TQLayout::activate()
{
invalidateRecursive( this );
if ( !topLevel )
- return FALSE;
+ return false;
TQWidget *mw = mainWidget();
if (!mw) {
@@ -1192,9 +1192,9 @@ bool TQLayout::activate()
tqWarning( "TQLayout::activate: %s \"%s\" does not have a main widget",
TQObject::className(), TQObject::name() );
#endif
- return FALSE;
+ return false;
}
- activated = TRUE;
+ activated = true;
TQSize s = mw->size();
TQSize ms;
int mbh = 0;
@@ -1237,7 +1237,7 @@ bool TQLayout::activate()
// ideally only if sizeHint() or sizePolicy() has changed
mw->updateGeometry();
- return TRUE;
+ return true;
}
/*!
@@ -1346,7 +1346,7 @@ bool TQLayout::activate()
TQSizePolicy::SizeType sizing types\endlink affect how the widget
is treated by the \link TQLayout layout engine\endlink.
- If \a hfw is TRUE, the preferred height of the widget is dependent
+ If \a hfw is true, the preferred height of the widget is dependent
on the width of the widget (for example, a TQLabel with line
wrapping).
@@ -1360,7 +1360,7 @@ bool TQLayout::activate()
sizing types \a hor and \a ver, and stretch factors \a horStretch
and \a verStretch.
- If \a hfw is TRUE, the preferred height of the widget is dependent on the
+ If \a hfw is true, the preferred height of the widget is dependent on the
width of the widget.
\sa horStretch() verStretch()
@@ -1385,8 +1385,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkHorizontally() const
- Returns TRUE if the widget can sensibly be narrower than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be narrower than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkVertically() mayGrowHorizontally()
*/
@@ -1394,8 +1394,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayShrinkVertically() const
- Returns TRUE if the widget can sensibly be shorter than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be shorter than its
+ sizeHint(); otherwise returns false.
\sa mayShrinkHorizontally() mayGrowVertically()
*/
@@ -1403,8 +1403,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowHorizontally() const
- Returns TRUE if the widget can sensibly be wider than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be wider than its
+ sizeHint(); otherwise returns false.
\sa mayGrowVertically() mayShrinkHorizontally()
*/
@@ -1412,8 +1412,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::mayGrowVertically() const
- Returns TRUE if the widget can sensibly be taller than its
- sizeHint(); otherwise returns FALSE.
+ Returns true if the widget can sensibly be taller than its
+ sizeHint(); otherwise returns false.
\sa mayGrowHorizontally() mayShrinkVertically()
*/
@@ -1450,8 +1450,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::hasHeightForWidth() const
- Returns TRUE if the widget's preferred height depends on its
- width; otherwise returns FALSE.
+ Returns true if the widget's preferred height depends on its
+ width; otherwise returns false.
\sa setHeightForWidth()
*/
@@ -1506,8 +1506,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator==( const TQSizePolicy &s ) const
- Returns TRUE if this policy is equal to \a s; otherwise returns
- FALSE.
+ Returns true if this policy is equal to \a s; otherwise returns
+ false.
\sa operator!=()
*/
@@ -1515,8 +1515,8 @@ bool TQLayout::activate()
/*!
\fn bool TQSizePolicy::operator!=( const TQSizePolicy &s ) const
- Returns TRUE if this policy is different from \a s; otherwise
- returns FALSE.
+ Returns true if this policy is different from \a s; otherwise
+ returns false.
\sa operator==()
*/
@@ -1713,24 +1713,24 @@ void TQLayout::setResizeMode( ResizeMode mode )
switch ( mode ) {
case Auto:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = TRUE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = true;
break;
case Fixed:
- frozen = TRUE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = true;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case FreeResize:
- frozen = FALSE;
- autoMinimum = FALSE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = false;
+ autoResizeMode = false;
break;
case Minimum:
- frozen = FALSE;
- autoMinimum = TRUE;
- autoResizeMode = FALSE;
+ frozen = false;
+ autoMinimum = true;
+ autoResizeMode = false;
}
if ( mainWidget() && mainWidget()->isVisible() )
activate();
@@ -1745,9 +1745,9 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
/*!
\fn bool TQLayout::autoAdd() const
- Returns TRUE if this layout automatically grabs all new
+ Returns true if this layout automatically grabs all new
mainWidget()'s new children and adds them as defined by addItem();
- otherwise returns FALSE. This has effect only for top-level
+ otherwise returns false. This has effect only for top-level
layouts, i.e. layouts that are direct children of their
mainWidget().
@@ -1760,7 +1760,7 @@ TQLayout::ResizeMode TQLayout::resizeMode() const
*/
/*!
- If \a b is TRUE, auto-add is enabled; otherwise auto-add is
+ If \a b is true, auto-add is enabled; otherwise auto-add is
disabled.
\warning If auto-add is enabled, you cannot set stretch factors
@@ -1779,19 +1779,19 @@ void TQLayout::setAutoAdd( bool b )
/*!
\fn bool TQLayout::supportsMargin() const
- Returns TRUE if this layout supports \l TQLayout::margin on
- non-top-level layouts; otherwise returns FALSE.
+ Returns true if this layout supports \l TQLayout::margin on
+ non-top-level layouts; otherwise returns false.
\sa margin
*/
/*!
- Sets the value returned by supportsMargin(). If \a b is TRUE,
+ Sets the value returned by supportsMargin(). If \a b is true,
margin() handling is implemented by the subclass. If \a b is
- FALSE (the default), TQLayout will add margin() around top-level
+ false (the default), TQLayout will add margin() around top-level
layouts.
- If \a b is TRUE, margin handling needs to be implemented in
+ If \a b is true, margin handling needs to be implemented in
setGeometry(), maximumSize(), minimumSize(), sizeHint() and
heightForWidth().
@@ -1904,7 +1904,7 @@ void TQLayout::removeItem( TQLayoutItem *item )
}
/*!
- Enables this layout if \a enable is TRUE, otherwise disables it.
+ Enables this layout if \a enable is true, otherwise disables it.
An enabled layout adjusts dynamically to changes; a disabled
layout acts as if it did not exist.
@@ -1919,7 +1919,7 @@ void TQLayout::setEnabled( bool enable )
}
/*!
- Returns TRUE if the layout is enabled; otherwise returns FALSE.
+ Returns true if the layout is enabled; otherwise returns false.
\sa setEnabled()
*/
diff --git a/src/kernel/tqaccel.cpp b/src/kernel/tqaccel.cpp
index 6569aa8dc..af5b354f5 100644
--- a/src/kernel/tqaccel.cpp
+++ b/src/kernel/tqaccel.cpp
@@ -142,7 +142,7 @@
struct TQAccelItem { // internal accelerator item
TQAccelItem( const TQKeySequence &k, int i )
- { key=k; id=i; enabled=TRUE; signal=0; }
+ { key=k; id=i; enabled=true; signal=0; }
~TQAccelItem() { delete signal; }
int id;
TQKeySequence key;
@@ -206,15 +206,15 @@ bool TQ_EXPORT tqt_tryComposeUnicode( TQWidget* w, TQKeyEvent* e){
}
#ifdef TQ_WS_MAC
-static bool qt_accel_no_shortcuts = TRUE;
+static bool qt_accel_no_shortcuts = true;
#else
-static bool qt_accel_no_shortcuts = FALSE;
+static bool qt_accel_no_shortcuts = false;
#endif
void TQ_EXPORT tqt_setAccelAutoShortcuts(bool b) { qt_accel_no_shortcuts = b; }
/*
\internal
- Returns TRUE if the accel is in the current subwindow, else FALSE.
+ Returns true if the accel is in the current subwindow, else false.
*/
bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
#if !defined ( Q_OS_MACX )
@@ -222,7 +222,7 @@ bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
#else
if ( !d->watch || (!d->watch->isVisible() && !d->watch->inherits( "TQMenuBar" )) || !d->watch->isEnabled() )
#endif
- return FALSE;
+ return false;
TQWidget* tlw = w->topLevelWidget();
TQWidget* wtlw = d->watch->topLevelWidget();
@@ -233,21 +233,21 @@ bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
return tlw->parentWidget()->topLevelWidget() == wtlw;
if ( wtlw != tlw )
- return FALSE;
+ return false;
#endif
/* if we live in a MDI subwindow, ignore the event if we are
not the active document window */
TQWidget* sw = d->watch;
while ( sw && !sw->testWFlags( WSubWindow ) )
- sw = sw->parentWidget( TRUE );
+ sw = sw->parentWidget( true );
if ( sw ) { // we are in a subwindow indeed
TQWidget* fw = w;
while ( fw && fw != sw )
- fw = fw->parentWidget( TRUE );
+ fw = fw->parentWidget( true );
if ( fw != sw ) // focus widget not in our subwindow
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
inline int TQAccelManager::translateModifiers( ButtonState state )
@@ -326,7 +326,7 @@ bool TQAccelManager::tryAccelEvent( TQWidget* w, TQKeyEvent* e )
e->ignore();
TQApplication::sendSpontaneousEvent( w, e );
if ( e->isAccepted() )
- return FALSE;
+ return false;
}
e->t = TQEvent::Accel;
e->ignore();
@@ -349,7 +349,7 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
if ( value >= 0 && value <= 9 ) {
TQApplication::composedUnicode *= 10;
TQApplication::composedUnicode += value;
- return TRUE;
+ return true;
} else {
// Composing interrupted, dispatch!
if ( TQApplication::composedUnicode ) {
@@ -361,7 +361,7 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
TQApplication::sendEvent( w, &ker );
}
TQApplication::composedUnicode = 0;
- return TRUE;
+ return true;
}
// Meta compose end, dispatch
} else if ( (e->type() == TQEvent::KeyRelease) &&
@@ -377,10 +377,10 @@ bool TQAccelManager::tryComposeUnicode( TQWidget* w, TQKeyEvent* e )
TQApplication::sendEvent( w, &ker );
}
TQApplication::composedUnicode = 0;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*
@@ -399,7 +399,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
// Modifiers can NOT be accelerators...
if ( e->key() >= Key_Shift &&
e->key() <= Key_Alt )
- return FALSE;
+ return false;
SequenceMatch result = TQt::NoMatch;
TQKeySequence tocheck, partial;
@@ -413,11 +413,11 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
TQKeyEvent pe = *e;
int n = -1;
int hasShift = (e->state()&TQt::ShiftButton)?1:0;
- bool identicalDisabled = FALSE;
- bool matchFound = FALSE;
+ bool identicalDisabled = false;
+ bool matchFound = false;
do {
accel = accels.first();
- matchFound = FALSE;
+ matchFound = false;
while ( accel ) {
if ( correctSubWindow( w, accel ) ) {
if ( accel->enabled ) {
@@ -432,16 +432,16 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
lastaccel = accel;
lastitem = item;
n++;
- matchFound = TRUE;
+ matchFound = true;
if ( n > TQMAX(clash,0) )
goto doclash;
} else {
- identicalDisabled = TRUE;
+ identicalDisabled = true;
}
}
if ( item->enabled && TQt::PartialMatch == result ) {
partial = tocheck;
- matchFound = TRUE;
+ matchFound = true;
}
item = accel->aitems.prev();
}
@@ -449,7 +449,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
item = accel->aitems.last();
while( item ) {
if ( TQt::Identical == match( &pe, item, tocheck ) )
- identicalDisabled = TRUE;
+ identicalDisabled = true;
item = accel->aitems.prev();
}
}
@@ -497,7 +497,7 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
intermediate = TQKeySequence();
lastaccel->activate( lastitem );
e->accept();
- return TRUE;
+ return true;
}
doclash: // found more than one match
@@ -531,15 +531,15 @@ bool TQAccelManager::dispatchAccelEvent( TQWidget* w, TQKeyEvent* e )
firstaccel->activateAmbiguously( firstitem );
}
e->accept();
- return TRUE;
+ return true;
}
TQAccelPrivate::TQAccelPrivate( TQAccel* p )
: parent( p )
{
TQAccelManager::self()->registerAccel( this );
- aitems.setAutoDelete( TRUE );
- ignorewhatsthis = FALSE;
+ aitems.setAutoDelete( true );
+ ignorewhatsthis = false;
}
TQAccelPrivate::~TQAccelPrivate()
@@ -572,7 +572,7 @@ TQAccel::TQAccel( TQWidget *parent, const char *name )
: TQObject( parent, name )
{
d = new TQAccelPrivate( this );
- d->enabled = TRUE;
+ d->enabled = true;
d->watch = parent;
#if defined(QT_CHECK_NULL)
if ( !d->watch )
@@ -590,7 +590,7 @@ TQAccel::TQAccel( TQWidget* watch, TQObject *parent, const char *name )
: TQObject( parent, name )
{
d = new TQAccelPrivate( this );
- d->enabled = TRUE;
+ d->enabled = true;
d->watch = watch;
#if defined(QT_CHECK_NULL)
if ( !d->watch )
@@ -628,8 +628,8 @@ TQAccel::~TQAccel()
/*!
- Returns TRUE if the accelerator is enabled; otherwise returns
- FALSE.
+ Returns true if the accelerator is enabled; otherwise returns
+ false.
\sa setEnabled(), isItemEnabled()
*/
@@ -641,8 +641,8 @@ bool TQAccel::isEnabled() const
/*!
- Enables the accelerator if \a enable is TRUE, or disables it if \a
- enable is FALSE.
+ Enables the accelerator if \a enable is true, or disables it if \a
+ enable is false.
Individual keys can also be enabled or disabled using
setItemEnabled(). To work, a key must be an enabled item in an
@@ -746,8 +746,8 @@ int TQAccel::findKey( const TQKeySequence& key ) const
/*!
- Returns TRUE if the accelerator item with the identifier \a id is
- enabled. Returns FALSE if the item is disabled or cannot be found.
+ Returns true if the accelerator item with the identifier \a id is
+ enabled. Returns false if the item is disabled or cannot be found.
\sa setItemEnabled(), isEnabled()
*/
@@ -755,13 +755,13 @@ int TQAccel::findKey( const TQKeySequence& key ) const
bool TQAccel::isItemEnabled( int id ) const
{
TQAccelItem *item = find_id( d->aitems, id);
- return item ? item->enabled : FALSE;
+ return item ? item->enabled : false;
}
/*!
Enables the accelerator item with the identifier \a id if \a
- enable is TRUE, and disables item \a id if \a enable is FALSE.
+ enable is true, and disables item \a id if \a enable is false.
To work, an item must be enabled and be in an enabled TQAccel.
@@ -806,7 +806,7 @@ bool TQAccel::connectItem( int id, const TQObject *receiver, const char *member
}
return item->signal->connect( receiver, member );
}
- return FALSE;
+ return false;
}
/*!
@@ -822,7 +822,7 @@ bool TQAccel::disconnectItem( int id, const TQObject *receiver,
TQAccelItem *item = find_id( d->aitems, id);
if ( item && item->signal )
return item->signal->disconnect( receiver, member );
- return FALSE;
+ return false;
}
void TQAccelPrivate::activate( TQAccelItem* item )
@@ -1085,5 +1085,5 @@ to help. Ask them for ISBN 1859121047.
/*! \obsolete serves no purpose anymore */
void TQAccel::repairEventFilter() {}
/*! \obsolete serves no purpose anymore */
-bool TQAccel::eventFilter( TQObject *, TQEvent * ) { return FALSE; }
+bool TQAccel::eventFilter( TQObject *, TQEvent * ) { return false; }
#endif // TQT_NO_ACCEL
diff --git a/src/kernel/tqaccessible.cpp b/src/kernel/tqaccessible.cpp
index 174e16633..53caf49e8 100644
--- a/src/kernel/tqaccessible.cpp
+++ b/src/kernel/tqaccessible.cpp
@@ -314,12 +314,12 @@ public slots:
#include "tqaccessible.moc"
static AccessibleCache *qAccessibleInterface = 0;
-static bool cleanupAdded = FALSE;
+static bool cleanupAdded = false;
static void qAccessibleCleanup()
{
if ( qAccessibleInterface && qAccessibleInterface->count() && qAccessibleManager )
- qAccessibleManager->setAutoUnload( FALSE );
+ qAccessibleManager->setAutoUnload( false );
delete qAccessibleInterface;
qAccessibleInterface = 0;
@@ -386,7 +386,7 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
qAccessibleManager = new TQPluginManager<TQAccessibleFactoryInterface>( IID_QAccessibleFactory, TQApplication::libraryPaths(), "/accessible" );
if ( !cleanupAdded ) {
tqAddPostRoutine( qAccessibleCleanup );
- cleanupAdded = TRUE;
+ cleanupAdded = true;
}
}
@@ -405,8 +405,8 @@ TQRESULT TQAccessible::queryAccessibleInterface( TQObject *object, TQAccessibleI
}
/*!
- Returns TRUE if an accessibility implementation has been requested,
- during the runtime of the application, otherwise returns FALSE.
+ Returns true if an accessibility implementation has been requested,
+ during the runtime of the application, otherwise returns false.
Use this function to prevent potentially expensive notifications via
updateAccessibility().
@@ -431,9 +431,9 @@ bool TQAccessible::isActive()
/*!
\fn bool TQAccessibleInterface::isValid() const
- Returns TRUE if all the data necessary to use this interface
+ Returns true if all the data necessary to use this interface
implementation is valid (e.g. all pointers are non-null),
- otherwise returns FALSE.
+ otherwise returns false.
*/
/*!
@@ -605,19 +605,19 @@ bool TQAccessible::isActive()
Gives the focus to the child object specified by \a control, or to
the object itself if \a control is 0.
- Returns TRUE if the focus could be set; otherwise returns FALSE.
+ Returns true if the focus could be set; otherwise returns false.
*/
/*!
\fn bool TQAccessibleInterface::setSelected( int control, bool on, bool extend )
Sets the selection of the child object with ID \a control to \a
- on. If \a extend is TRUE, all child elements between the focused
+ on. If \a extend is true, all child elements between the focused
item and the specified child object have their selection set to \a
on.
- Returns TRUE if the selection could be set; otherwise returns
- FALSE.
+ Returns true if the selection could be set; otherwise returns
+ false.
\sa setFocus(), clearSelection()
*/
@@ -653,7 +653,7 @@ TQAccessibleObject::TQAccessibleObject( TQObject *object )
qAccessibleInterface = new AccessibleCache;
if ( !cleanupAdded ) {
tqAddPostRoutine( qAccessibleCleanup );
- cleanupAdded = TRUE;
+ cleanupAdded = true;
}
}
diff --git a/src/kernel/tqapplication.cpp b/src/kernel/tqapplication.cpp
index c6e6510b4..97368b0c6 100644
--- a/src/kernel/tqapplication.cpp
+++ b/src/kernel/tqapplication.cpp
@@ -326,51 +326,51 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
TQApplication *tqApp = 0; // global application object
TQStyle *TQApplication::app_style = 0; // default application style
-bool tqt_explicit_app_style = FALSE; // style explicitly set by programmer
+bool tqt_explicit_app_style = false; // style explicitly set by programmer
int TQApplication::app_cspec = TQApplication::NormalColor;
#ifndef TQT_NO_PALETTE
TQPalette *TQApplication::app_pal = 0; // default application palette
#endif
TQFont *TQApplication::app_font = 0; // default application font
-bool tqt_app_has_font = FALSE;
+bool tqt_app_has_font = false;
#ifndef TQT_NO_CURSOR
TQCursor *TQApplication::app_cursor = 0; // default application cursor
#endif
int TQApplication::app_tracking = 0; // global mouse tracking
-bool TQApplication::is_app_running = FALSE; // app starting up if FALSE
-bool TQApplication::is_app_closing = FALSE; // app closing down if TRUE
+bool TQApplication::is_app_running = false; // app starting up if false
+bool TQApplication::is_app_closing = false; // app closing down if true
int TQApplication::loop_level = 0; // event loop level
TQWidget *TQApplication::main_widget = 0; // main application widget
TQWidget *TQApplication::focus_widget = 0; // has keyboard input focus
TQWidget *TQApplication::active_window = 0; // toplevel with keyboard focus
-bool TQApplication::obey_desktop_settings = TRUE; // use winsys resources
+bool TQApplication::obey_desktop_settings = true; // use winsys resources
int TQApplication::cursor_flash_time = 1000; // text caret flash time
int TQApplication::mouse_double_click_time = 400; // mouse dbl click limit
#ifndef TQT_NO_WHEELEVENT
int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll
#endif
bool tqt_is_gui_used;
-bool TQ_EXPORT tqt_resolve_symlinks = TRUE;
-bool TQ_EXPORT tqt_tab_all_widgets = TRUE;
+bool TQ_EXPORT tqt_resolve_symlinks = true;
+bool TQ_EXPORT tqt_tab_all_widgets = true;
TQRect tqt_maxWindowRect;
static int drag_time = 500;
static int drag_distance = 4;
-static bool reverse_layout = FALSE;
+static bool reverse_layout = false;
TQSize TQApplication::app_strut = TQSize( 0,0 ); // no default application strut
-bool TQApplication::animate_ui = TRUE;
-bool TQApplication::animate_menu = FALSE;
-bool TQApplication::fade_menu = FALSE;
-bool TQApplication::animate_combo = FALSE;
-bool TQApplication::animate_tooltip = FALSE;
-bool TQApplication::fade_tooltip = FALSE;
-bool TQApplication::animate_toolbox = FALSE;
-bool TQApplication::widgetCount = FALSE;
+bool TQApplication::animate_ui = true;
+bool TQApplication::animate_menu = false;
+bool TQApplication::fade_menu = false;
+bool TQApplication::animate_combo = false;
+bool TQApplication::animate_tooltip = false;
+bool TQApplication::fade_tooltip = false;
+bool TQApplication::animate_toolbox = false;
+bool TQApplication::widgetCount = false;
TQApplication::Type tqt_appType=TQApplication::Tty;
#ifndef TQT_NO_COMPONENT
TQStringList *TQApplication::app_libpaths = 0;
#endif
-bool TQApplication::metaComposeUnicode = FALSE;
+bool TQApplication::metaComposeUnicode = false;
int TQApplication::composedUnicode = 0;
#ifdef TQT_THREAD_SUPPORT
@@ -413,7 +413,7 @@ extern bool tqt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in tqaccel.c
#endif
#if defined(QT_TABLET_SUPPORT)
-bool chokeMouse = FALSE;
+bool chokeMouse = false;
#endif
void tqt_setMaxWindowRect(const TQRect& r)
@@ -607,7 +607,7 @@ public:
#ifdef TQT_THREAD_SUPPORT
if (with_mutex)
{
- m_mutex = new TQMutex(TRUE);
+ m_mutex = new TQMutex(true);
}
#endif
}
@@ -645,7 +645,7 @@ public:
static TQPostEventList* InitGlobalPostedEventsList()
{
static TQPostEventList _globalEventList(true);
- _globalEventList.setAutoDelete(TRUE);
+ _globalEventList.setAutoDelete(true);
return &_globalEventList;
}
@@ -694,7 +694,7 @@ static void tqt_fix_tooltips()
TQColor(96,96,96), TQt::black, TQt::black,
TQt::black, TQColor(255,255,220) );
TQPalette pal( cg, cg, cg );
- TQApplication::setPalette( pal, TRUE, "TQTipLabel");
+ TQApplication::setPalette( pal, true, "TQTipLabel");
}
#endif
@@ -717,7 +717,7 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
TQCString s;
if ( arg == "-qdevel" || arg == "-qdebug") {
// obsolete argument
- } else if ( arg.find( "-style=", 0, FALSE ) != -1 ) {
+ } else if ( arg.find( "-style=", 0, false ) != -1 ) {
s = arg.right( arg.length() - 7 );
} else if ( qstrcmp(arg,"-style") == 0 && i < argc-1 ) {
s = argv[++i];
@@ -734,13 +734,13 @@ void TQApplication::process_cmdline( int* argcptr, char ** argv )
*session_key = session_id.mid( p +1 );
session_id = session_id.left( p );
}
- is_session_restored = TRUE;
+ is_session_restored = true;
}
#endif
} else if ( qstrcmp(arg, "-reverse") == 0 ) {
- setReverseLayout( TRUE );
+ setReverseLayout( true );
} else if ( qstrcmp(arg, "-widgetcount") == 0 ) {
- widgetCount = TRUE;;
+ widgetCount = true;;
} else {
argv[j++] = argv[i];
}
@@ -845,14 +845,14 @@ TQApplication::TQApplication( int &argc, char **argv )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -866,7 +866,7 @@ TQApplication::TQApplication( int &argc, char **argv )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -889,18 +889,18 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
/*!
Constructs an application object with \a argc command line arguments
- in \a argv. If \a GUIenabled is TRUE, a GUI application is
+ in \a argv. If \a GUIenabled is true, a GUI application is
constructed, otherwise a non-GUI (console) application is created.
- If \a SMEnabled is TRUE, session management support is enabled (default).
+ If \a SMEnabled is true, session management support is enabled (default).
- Set \a GUIenabled to FALSE for programs without a graphical user
+ Set \a GUIenabled to false for programs without a graphical user
interface that should be able to run without a window system.
- Set \a SMEnabled to FALSE to disable session management.
+ Set \a SMEnabled to false to disable session management.
Session management cannot be enabled at a later time if disabled here.
- On X11, the window system is initialized if \a GUIenabled is TRUE.
- If \a GUIenabled is FALSE, the application does not connect to the
+ On X11, the window system is initialized if \a GUIenabled is true.
+ If \a GUIenabled is false, the application does not connect to the
X-server.
On Windows and Macintosh, currently the window system is always
initialized, regardless of the value of GUIenabled. This may change in
@@ -914,7 +914,7 @@ TQApplication::TQApplication( int &argc, char **argv, bool GUIenabled )
#ifdef TQ_WS_X11
bool useGUI = getenv( "DISPLAY" ) != 0;
#else
- bool useGUI = TRUE;
+ bool useGUI = true;
#endif
TQApplication app(argc, argv, useGUI);
@@ -1010,7 +1010,7 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
app_argv = aargv;
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
// ... no command line.
@@ -1049,7 +1049,7 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv,
HANDLE visual, HANDLE colormap)
{
tqt_appType = GuiClient;
- tqt_is_gui_used = TRUE;
+ tqt_is_gui_used = true;
tqt_appType = GuiClient;
init_precmdline();
@@ -1095,9 +1095,9 @@ bool TQApplication::isCoreThread() {
void TQApplication::init_precmdline()
{
translators = 0;
- is_app_closing = FALSE;
+ is_app_closing = false;
#ifndef TQT_NO_SESSIONMANAGER
- is_session_restored = FALSE;
+ is_session_restored = false;
#endif
#if defined(QT_CHECK_STATE)
if ( tqApp )
@@ -1113,24 +1113,24 @@ void TQApplication::init_precmdline()
void TQApplication::initialize( int argc, char **argv, bool enable_sm )
{
#ifdef TQT_THREAD_SUPPORT
- tqt_mutex = new TQMutex( TRUE );
- tqt_sharedStringMutex = new TQMutex( TRUE );
- tqt_sharedMetaObjectMutex = new TQMutex( TRUE );
+ tqt_mutex = new TQMutex( true );
+ tqt_sharedStringMutex = new TQMutex( true );
+ tqt_sharedMetaObjectMutex = new TQMutex( true );
#ifdef QT_USE_GLIBMAINLOOP
- tqt_timerListMutex = new TQMutex( TRUE );
+ tqt_timerListMutex = new TQMutex( true );
#endif // QT_USE_GLIBMAINLOOP
tqt_application_thread_id = TQThread::currentThread();
#endif // TQT_THREAD_SUPPORT
app_argc = argc;
app_argv = argv;
- quit_now = FALSE;
+ quit_now = false;
quit_code = 0;
TQWidget::createMapper(); // create widget mapper
#ifndef TQT_NO_PALETTE
(void) palette(); // trigger creation of application palette
#endif
- is_app_running = TRUE; // no longer starting up
+ is_app_running = true; // no longer starting up
#ifndef TQT_NO_SESSIONMANAGER
if (enable_sm) {
@@ -1178,7 +1178,7 @@ TQWidget *TQApplication::activePopupWidget()
A modal widget is a special top level widget which is a subclass of
TQDialog that specifies the modal parameter of the constructor as
- TRUE. A modal widget must be closed before the user can continue
+ true. A modal widget must be closed before the user can continue
with other parts of the program.
Modal widgets are organized in a stack. This function returns
@@ -1220,12 +1220,12 @@ TQApplication::~TQApplication()
postRList = 0;
}
- TQObject *tipmanager = child( "toolTipManager", "TQTipManager", FALSE );
+ TQObject *tipmanager = child( "toolTipManager", "TQTipManager", false );
delete tipmanager;
delete tqt_desktopWidget;
tqt_desktopWidget = 0;
- is_app_closing = TRUE;
+ is_app_closing = true;
// Due to hacks to speed up TQStyle engine (see git hash 523c1fd99) TQObjects now contain a
// reference to TQStyleControlElementData object which among other contain TQFont members.
@@ -1284,7 +1284,7 @@ TQApplication::~TQApplication()
removePostedEvents( this );
tqApp = 0;
}
- is_app_running = FALSE;
+ is_app_running = false;
if ( widgetCount ) {
tqDebug( "Widgets left: %i Max widgets: %i \n", TQWidget::instanceCounter, TQWidget::maxInstances );
@@ -1311,10 +1311,10 @@ TQApplication::~TQApplication()
#endif // QT_USE_GLIBMAINLOOP
#endif // TQT_THREAD_SUPPORT
- tqt_explicit_app_style = FALSE;
- tqt_app_has_font = FALSE;
+ tqt_explicit_app_style = false;
+ tqt_app_has_font = false;
app_tracking = 0;
- obey_desktop_settings = TRUE;
+ obey_desktop_settings = true;
cursor_flash_time = 1000;
mouse_double_click_time = 400;
#ifndef TQT_NO_WHEELEVENT
@@ -1322,15 +1322,15 @@ TQApplication::~TQApplication()
#endif
drag_time = 500;
drag_distance = 4;
- reverse_layout = FALSE;
+ reverse_layout = false;
app_strut = TQSize( 0, 0 );
- animate_ui = TRUE;
- animate_menu = FALSE;
- fade_menu = FALSE;
- animate_combo = FALSE;
- animate_tooltip = FALSE;
- fade_tooltip = FALSE;
- widgetCount = FALSE;
+ animate_ui = true;
+ animate_menu = false;
+ fade_menu = false;
+ animate_combo = false;
+ animate_tooltip = false;
+ fade_tooltip = false;
+ widgetCount = false;
}
@@ -1499,7 +1499,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* old = app_style;
app_style = style;
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1529,7 +1529,7 @@ void TQApplication::setStyle( TQStyle *style )
if ( !tqt_std_pal )
tqt_create_std_palette();
TQPalette tmpPal = *tqt_std_pal;
- setPalette( tmpPal, TRUE );
+ setPalette( tmpPal, true );
// initialize the application with the new style
app_style->polish( tqApp );
@@ -1575,7 +1575,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* TQApplication::setStyle( const TQString& style )
{
#ifdef TQ_WS_X11
- tqt_explicit_app_style = TRUE;
+ tqt_explicit_app_style = true;
#endif // TQ_WS_X11
if ( startingUp() ) {
@@ -1747,7 +1747,7 @@ extern const char *tqAppFileName();
#ifndef TQ_WS_WIN
static TQString resolveSymlinks( const TQString& path, int depth = 0 )
{
- bool foundLink = FALSE;
+ bool foundLink = false;
TQString linkTarget;
TQString part = path;
int slashPos = path.length();
@@ -1760,7 +1760,7 @@ static TQString resolveSymlinks( const TQString& path, int depth = 0 )
part = part.left( slashPos );
TQFileInfo fileInfo( part );
if ( fileInfo.isSymLink() ) {
- foundLink = TRUE;
+ foundLink = true;
linkTarget = fileInfo.readLink();
break;
}
@@ -2074,9 +2074,9 @@ TQPalette TQApplication::palette(TQStringList objectTypeList)
/*!
Changes the default application palette to \a palette. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets.
If \a className is passed, the change applies only to widgets that
@@ -2099,7 +2099,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !startingUp() ) // on startup this has been done already
tqApp->style().polish( pal ); // NB: non-const reference
#endif
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
if ( !app_pal ) {
app_pal = new TQPalette( pal );
@@ -2115,7 +2115,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
if ( !app_palettes ) {
app_palettes = new TQAsciiDict<TQPalette>;
TQ_CHECK_PTR( app_palettes );
- app_palettes->setAutoDelete( TRUE );
+ app_palettes->setAutoDelete( true );
}
oldpal = app_palettes->find( className );
app_palettes->insert( className, new TQPalette( pal ) );
@@ -2165,9 +2165,9 @@ TQFont TQApplication::font( const TQWidget *w )
}
/*! Changes the default application font to \a font. If \a
- informWidgets is TRUE, then existing widgets are informed about the
+ informWidgets is true, then existing widgets are informed about the
change and may adjust themselves to the new application
- setting. If \a informWidgets is FALSE, the change only affects newly
+ setting. If \a informWidgets is false, the change only affects newly
created widgets. If \a className is passed, the change applies only
to classes that inherit \a className (as reported by
TQObject::inherits()).
@@ -2184,9 +2184,9 @@ TQFont TQApplication::font( const TQWidget *w )
void TQApplication::setFont( const TQFont &font, bool informWidgets,
const char* className )
{
- bool all = FALSE;
+ bool all = false;
if ( !className ) {
- tqt_app_has_font = TRUE;
+ tqt_app_has_font = true;
if ( !app_font ) {
app_font = new TQFont( font );
TQ_CHECK_PTR( app_font );
@@ -2205,7 +2205,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
if (!app_fonts){
app_fonts = new TQAsciiDict<TQFont>;
TQ_CHECK_PTR( app_fonts );
- app_fonts->setAutoDelete( TRUE );
+ app_fonts->setAutoDelete( true );
}
TQFont* fnt = new TQFont(font);
TQ_CHECK_PTR( fnt );
@@ -2399,7 +2399,7 @@ void TQApplication::quit()
*/
void TQApplication::closeAllWindows()
{
- bool did_close = TRUE;
+ bool did_close = true;
TQWidget *w;
while((w = activeModalWidget()) && did_close) {
if(w->isHidden())
@@ -2498,13 +2498,13 @@ void TQApplication::aboutTQt()
*/
bool TQApplication::sendEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = FALSE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = false;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
- if ( event ) event->spont = TRUE;
- return tqApp ? tqApp->notify( receiver, event ) : FALSE;
+ if ( event ) event->spont = true;
+ return tqApp ? tqApp->notify( receiver, event ) : false;
}
/*!
@@ -2514,7 +2514,7 @@ bool TQApplication::sendSpontaneousEvent( TQObject *receiver, TQEvent *event ) {
For certain types of events (e.g. mouse and key events),
the event will be propagated to the receiver's parent and so on up to
the top-level object if the receiver is not interested in the event
- (i.e., it returns FALSE).
+ (i.e., it returns false).
There are five different ways that events can be processed;
reimplementing this virtual function is just one of them. All five
@@ -2550,18 +2550,18 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
{
// no events are delivered after ~TQApplication() has started
if ( is_app_closing ) {
- return FALSE;
+ return false;
}
if ( receiver == 0 ) { // serious error
#if defined(QT_CHECK_NULL)
tqWarning( "TQApplication::notify: Unexpected null receiver" );
#endif
- return FALSE;
+ return false;
}
if ( receiver && (e->type() == TQEvent::Destroy) ) {
- return TRUE;
+ return true;
}
if ( e->type() == TQEvent::ChildRemoved && receiver->postedEvents) {
@@ -2584,7 +2584,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
if ( pe->event && pe->receiver == receiver &&
pe->event->type() == TQEvent::ChildInserted &&
((TQChildEvent*)pe->event)->child() == c ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
l->remove();
@@ -2595,7 +2595,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
}
}
- bool res = FALSE;
+ bool res = false;
if ( !receiver->isWidgetType() ) {
res = internalNotify( receiver, e );
}
@@ -2637,7 +2637,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
res = internalNotify( w, e );
if ( res || key->isAccepted() )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
break;
@@ -2664,7 +2664,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQMouseEvent me(mouse->type(), relpos, mouse->globalPos(), mouse->button(), mouse->state());
me.spont = mouse->spontaneous();
res = internalNotify( w, w == receiver ? mouse : &me );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2698,7 +2698,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQWheelEvent we(relpos, wheel->globalPos(), wheel->delta(), wheel->state(), wheel->orientation());
we.spont = wheel->spontaneous();
res = internalNotify( w, w == receiver ? wheel : &we );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2721,7 +2721,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQContextMenuEvent ce(context->reason(), relpos, context->globalPos(), context->state());
ce.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? context : &ce );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2749,7 +2749,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
tablet->uniqueId());
te.spont = e->spontaneous();
res = internalNotify( w, w == receiver ? tablet : &te );
- e->spont = FALSE;
+ e->spont = false;
if (res || w->isTopLevel() || w->testWFlags(WNoMousePropagation))
break;
@@ -2791,10 +2791,10 @@ bool TQApplication::event( TQEvent *e )
}
}
if(ce->isAccepted())
- return TRUE;
+ return true;
} else if (e->type() == TQEvent::Quit) {
quit();
- return TRUE;
+ return true;
}
return TQObject::event(e);
}
@@ -2824,14 +2824,14 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
TQObjectListIt it( *eventFilters );
TQObject *obj;
while ( (obj=it.current()) != 0 ) { // send to all filters
- ++it; // until one returns TRUE
+ ++it; // until one returns true
if ( obj->eventFilter(receiver,e) )
- return TRUE;
+ return true;
}
}
- bool consumed = FALSE;
- bool handled = FALSE;
+ bool consumed = false;
+ bool handled = false;
if ( receiver->isWidgetType() ) {
TQWidget *widget = (TQWidget*)receiver;
@@ -2863,8 +2863,8 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
if ( e->type() == TQEvent::MouseMove &&
(((TQMouseEvent*)e)->state()&TQMouseEvent::MouseButtonMask) == 0 &&
!widget->hasMouseTracking() ) {
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
} else if ( !widget->isEnabled() ) { // throw away mouse events to disabled widgets
switch(e->type()) {
case TQEvent::MouseButtonPress:
@@ -2872,35 +2872,35 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseMove:
( (TQMouseEvent*) e)->ignore();
- handled = TRUE;
- consumed = TRUE;
+ handled = true;
+ consumed = true;
break;
#ifndef TQT_NO_DRAGANDDROP
case TQEvent::DragEnter:
case TQEvent::DragMove:
( (TQDragMoveEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
case TQEvent::DragLeave:
case TQEvent::DragResponse:
- handled = TRUE;
+ handled = true;
break;
case TQEvent::Drop:
( (TQDropEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
#ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel:
( (TQWheelEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
#endif
case TQEvent::ContextMenu:
( (TQContextMenuEvent*) e)->ignore();
- handled = TRUE;
+ handled = true;
break;
default:
break;
@@ -2931,13 +2931,13 @@ bool TQApplication::internalNotify( TQObject *receiver, TQEvent * e)
}
#endif
}
- e->spont = FALSE;
+ e->spont = false;
return consumed;
}
/*!
- Returns TRUE if an application object has not been created yet;
- otherwise returns FALSE.
+ Returns true if an application object has not been created yet;
+ otherwise returns false.
\sa closingDown()
*/
@@ -2948,8 +2948,8 @@ bool TQApplication::startingUp()
}
/*!
- Returns TRUE if the application objects are being destroyed;
- otherwise returns FALSE.
+ Returns true if the application objects are being destroyed;
+ otherwise returns false.
\sa startingUp()
*/
@@ -3153,8 +3153,8 @@ void TQApplication::wakeUpCoreThread()
}
/*!
- This function returns TRUE if there are pending events; otherwise
- returns FALSE. Pending events can be either from the window system
+ This function returns true if there are pending events; otherwise
+ returns false. Pending events can be either from the window system
or posted events using TQApplication::postEvent().
*/
bool TQApplication::hasPendingEvents()
@@ -3506,7 +3506,7 @@ void TQApplication::postEvent( TQObject *receiver, TQEvent *event )
#endif
// if no compression could be done, just append something
- event->posted = TRUE;
+ event->posted = true;
TQPostEvent * pe = new TQPostEvent( receiver, event );
l->append( pe );
GlobalPostedEvents()->append( pe );
@@ -3568,9 +3568,9 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
TQMutexLocker locker( GlobalPostedEvents()->mutex() );
#endif
- bool sent = TRUE;
+ bool sent = true;
while ( sent ) {
- sent = FALSE;
+ sent = false;
if (receiver && !receiver->postedEvents) {
return;
@@ -3600,7 +3600,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
) {
// first, we diddle the event so that we can deliver
// it, and that noone will try to touch it later.
- pe->event->posted = FALSE;
+ pe->event->posted = false;
TQEvent * e = pe->event;
TQObject * r = pe->receiver;
pe->event = 0;
@@ -3634,7 +3634,7 @@ void TQApplication::sendPostedEvents( TQObject *receiver, int event_type )
w->repaint( p->reg, p->erase );
}
} else {
- sent = TRUE;
+ sent = true;
TQApplication::sendEvent( r, e );
}
#ifdef TQT_THREAD_SUPPORT
@@ -3719,7 +3719,7 @@ void TQApplication::removePostedEvents( TQObject *receiver, int event_type )
while( (pe=l->current()) != 0 ) {
if ( !event_type || pe->event->type() == event_type ) {
if ( pe->event ) {
- pe->event->posted = FALSE;
+ pe->event->posted = false;
delete pe->event;
pe->event = 0;
}
@@ -3832,7 +3832,7 @@ void TQApplication::removePostedEvent( TQEvent * event )
pe->receiver ? pe->receiver->name() : "object" );
// note the beautiful uglehack if !pe->receiver :)
#endif
- event->posted = FALSE;
+ event->posted = false;
delete pe->event;
pe->event = 0;
return;
@@ -3961,7 +3961,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
if ( w && w->focusPolicy() != TQWidget::NoFocus )
w->setFocus();
else
- active_window->focusNextPrevChild( TRUE );
+ active_window->focusNextPrevChild( true );
}
TQFocusEvent::resetReason();
}
@@ -3996,22 +3996,22 @@ TQ_EXPORT void tqt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
w = leave;
do {
leaveList.append( w );
- } while ( (w = w->parentWidget( TRUE ) ) );
+ } while ( (w = w->parentWidget( true ) ) );
}
if ( enter && !sameWindow ) {
w = enter;
do {
enterList.prepend( w );
- } while ( (w = w->parentWidget(TRUE) ) );
+ } while ( (w = w->parentWidget(true) ) );
}
if ( sameWindow ) {
int enterDepth = 0;
int leaveDepth = 0;
w = enter;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
enterDepth++;
w = leave;
- while ( ( w = w->parentWidget( TRUE ) ) )
+ while ( ( w = w->parentWidget( true ) ) )
leaveDepth++;
TQWidget* wenter = enter;
TQWidget* wleave = leave;
@@ -4060,7 +4060,7 @@ extern TQWidget *tqt_tryModalHelperMac( TQWidget * top ); //tqapplication_mac.cp
/*!\internal
- Called from tqapplication_<platform>.cpp, returns TRUE
+ Called from tqapplication_<platform>.cpp, returns true
if the widget should accept the event.
*/
TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
@@ -4068,7 +4068,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( rettop ) *rettop = top;
if ( tqApp->activePopupWidget() )
- return TRUE;
+ return true;
#ifdef TQ_WS_MACX
top = tqt_tryModalHelperMac( top );
@@ -4081,12 +4081,12 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( widget->testWFlags(TQt::WShowModal) ) // widget is modal
modal = widget;
if ( !top || modal == top ) // don't block event
- return TRUE;
+ return true;
TQWidget * p = widget->parentWidget(); // Check if the active modal widget is a parent of our widget
while ( p ) {
if ( p == top )
- return TRUE;
+ return true;
p = p->parentWidget();
}
@@ -4095,7 +4095,7 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
if ( groupLeader ) {
// Does groupLeader have a child in tqt_modal_stack?
- bool unrelated = TRUE;
+ bool unrelated = true;
modal = tqt_modal_stack->first();
while (modal && unrelated) {
TQWidget* p = modal->parentWidget();
@@ -4103,13 +4103,13 @@ TQ_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
p = p->parentWidget();
}
modal = tqt_modal_stack->next();
- if ( p == groupLeader ) unrelated = FALSE;
+ if ( p == groupLeader ) unrelated = false;
}
if ( unrelated )
- return TRUE; // don't block event
+ return true; // don't block event
}
- return FALSE;
+ return false;
}
@@ -4156,14 +4156,14 @@ TQClipboard *TQApplication::clipboard()
By default, TQt will try to use the current standard colors, fonts
etc., from the underlying window system's desktop settings,
and use them for all relevant widgets. This behavior can be switched off
- by calling this function with \a on set to FALSE.
+ by calling this function with \a on set to false.
This static function must be called before creating the TQApplication
object, like this:
\code
int main( int argc, char** argv ) {
- TQApplication::setDesktopSettingsAware( FALSE ); // I know better than the user
+ TQApplication::setDesktopSettingsAware( false ); // I know better than the user
TQApplication myApp( argc, argv ); // Use default fonts & colors
...
}
@@ -4178,7 +4178,7 @@ void TQApplication::setDesktopSettingsAware( bool on )
}
/*!
- Returns the value set by setDesktopSettingsAware(); by default TRUE.
+ Returns the value set by setDesktopSettingsAware(); by default true.
\sa setDesktopSettingsAware()
*/
@@ -4200,7 +4200,7 @@ bool TQApplication::desktopSettingsAware()
/*! \fn void TQApplication::unlock(bool wakeUpCore)
- Unlock the TQt Library Mutex. If \a wakeUpCore is TRUE (the default),
+ Unlock the TQt Library Mutex. If \a wakeUpCore is true (the default),
then the core application thread will be woken with TQApplication::wakeUpCoreThread().
\sa lock(), locked() \link threads.html Thread Support in TQt\endlink
@@ -4209,8 +4209,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::locked()
- Returns TRUE if the TQt Library Mutex is locked by a different thread;
- otherwise returns FALSE.
+ Returns true if the TQt Library Mutex is locked by a different thread;
+ otherwise returns false.
\warning Due to different implementations of recursive mutexes on
the supported platforms, calling this function from the same thread
@@ -4222,8 +4222,8 @@ bool TQApplication::desktopSettingsAware()
/*! \fn bool TQApplication::tryLock()
Attempts to lock the TQt Library Mutex, and returns immediately. If
- the lock was obtained, this function returns TRUE. If another thread
- has locked the mutex, this function returns FALSE, instead of
+ the lock was obtained, this function returns true. If another thread
+ has locked the mutex, this function returns false, instead of
waiting for the lock to become available.
The mutex must be unlocked with unlock() before another thread can
@@ -4261,8 +4261,8 @@ bool TQApplication::tryLock()
/*!
\fn bool TQApplication::isSessionRestored() const
- Returns TRUE if the application has been restored from an earlier
- \link session.html session\endlink; otherwise returns FALSE.
+ Returns true if the application has been restored from an earlier
+ \link session.html session\endlink; otherwise returns false.
\sa sessionId(), commitData(), saveState()
*/
@@ -4332,7 +4332,7 @@ void TQApplication::commitData( TQSessionManager& sm )
if ( sm.allowsInteraction() ) {
TQWidgetList done;
TQWidgetList *list = TQApplication::topLevelWidgets();
- bool cancelled = FALSE;
+ bool cancelled = false;
TQWidget* w = list->first();
while ( !cancelled && w ) {
if ( !w->isHidden() ) {
@@ -4457,9 +4457,9 @@ int TQApplication::startDragDistance()
}
/*!
- If \a b is TRUE, all dialogs and widgets will be laid out in a
+ If \a b is true, all dialogs and widgets will be laid out in a
mirrored fashion, as required by right to left languages such as
- Arabic and Hebrew. If \a b is FALSE, dialogs and widgets are laid
+ Arabic and Hebrew. If \a b is false, dialogs and widgets are laid
out left to right.
Changing this flag in runtime does not cause a relayout of already
@@ -4485,8 +4485,8 @@ void TQApplication::setReverseLayout( bool b )
}
/*!
- Returns TRUE if all dialogs and widgets will be laid out in a
- mirrored (right to left) fashion. Returns FALSE if dialogs and
+ Returns true if all dialogs and widgets will be laid out in a
+ mirrored (right to left) fashion. Returns false if dialogs and
widgets will be laid out left to right.
\sa setReverseLayout()
@@ -4602,8 +4602,8 @@ bool TQApplication::reverseLayout()
\fn bool TQSessionManager::allowsInteraction()
Asks the session manager for permission to interact with the
- user. Returns TRUE if interaction is permitted; otherwise
- returns FALSE.
+ user. Returns true if interaction is permitted; otherwise
+ returns false.
The rationale behind this mechanism is to make it possible to
synchronize user interaction during a shutdown. Advanced session
@@ -4809,8 +4809,8 @@ void MyApplication::commitData( TQSessionManager& sm ) {
/*!
\fn bool TQSessionManager::isPhase2() const
- Returns TRUE if the session manager is currently performing a second
- session management phase; otherwise returns FALSE.
+ Returns true if the session manager is currently performing a second
+ session management phase; otherwise returns false.
\sa requestPhase2()
*/
@@ -4910,12 +4910,12 @@ void* TQSessionManager::handle() const
#if !defined(TQ_WS_WIN)
bool TQSessionManager::allowsInteraction()
{
- return TRUE;
+ return true;
}
bool TQSessionManager::allowsErrorInteraction()
{
- return TRUE;
+ return true;
}
void TQSessionManager::release()
{
@@ -4967,7 +4967,7 @@ void TQSessionManager::setManagerProperty( const TQString&, const TQStringList&
bool TQSessionManager::isPhase2() const
{
- return FALSE;
+ return false;
}
void TQSessionManager::requestPhase2()
diff --git a/src/kernel/tqapplication.h b/src/kernel/tqapplication.h
index f8915c5b9..0d375c1ee 100644
--- a/src/kernel/tqapplication.h
+++ b/src/kernel/tqapplication.h
@@ -111,7 +111,7 @@ public:
static void setColorSpec( int );
#ifndef TQT_NO_CURSOR
static TQCursor *overrideCursor();
- static void setOverrideCursor( const TQCursor &, bool replace=FALSE );
+ static void setOverrideCursor( const TQCursor &, bool replace=false );
static void restoreOverrideCursor();
#endif
static bool hasGlobalMouseTracking();
@@ -119,11 +119,11 @@ public:
#ifndef TQT_NO_PALETTE
static TQPalette palette( const TQWidget* = 0 );
static TQPalette palette( TQStringList );
- static void setPalette( const TQPalette &, bool informWidgets=FALSE,
+ static void setPalette( const TQPalette &, bool informWidgets=false,
const char* className = 0 );
#endif
static TQFont font( const TQWidget* = 0 );
- static void setFont( const TQFont &, bool informWidgets=FALSE,
+ static void setFont( const TQFont &, bool informWidgets=false,
const char* className = 0 );
static TQFontMetrics fontMetrics();
@@ -144,8 +144,8 @@ public:
TQWidget *focusWidget() const;
TQWidget *activeWindow() const;
- static TQWidget *widgetAt( int x, int y, bool child=FALSE );
- static TQWidget *widgetAt( const TQPoint &, bool child=FALSE );
+ static TQWidget *widgetAt( int x, int y, bool child=false );
+ static TQWidget *widgetAt( const TQPoint &, bool child=false );
static TQEventLoop *eventLoop();
@@ -199,7 +199,7 @@ public:
static void setWinStyleHighlightColor( const TQColor &c ) {
TQPalette p( palette() );
p.setColor( TQColorGroup::Highlight, c );
- setPalette( p, TRUE);
+ setPalette( p, true);
}
static const TQColor &winStyleHighlightColor() {
return palette().active().highlight();
@@ -237,7 +237,7 @@ public:
static int horizontalAlignment( int align );
static bool isEffectEnabled( TQt::UIEffect );
- static void setEffectEnabled( TQt::UIEffect, bool enable = TRUE );
+ static void setEffectEnabled( TQt::UIEffect, bool enable = true );
#if defined(TQ_WS_MAC)
virtual bool macEventFilter( EventHandlerCallRef, EventRef );
@@ -288,7 +288,7 @@ public:
void wakeUpCoreThread();
#if defined(TQT_THREAD_SUPPORT)
void lock();
- void unlock(bool wakeUpCore = TRUE);
+ void unlock(bool wakeUpCore = true);
bool locked();
bool tryLock();
#endif
diff --git a/src/kernel/tqapplication_x11.cpp b/src/kernel/tqapplication_x11.cpp
index fedeed789..e9877fe0c 100644
--- a/src/kernel/tqapplication_x11.cpp
+++ b/src/kernel/tqapplication_x11.cpp
@@ -193,20 +193,20 @@ static const char *mwGeometry = 0; // main widget geometry
static const char *mwTitle = 0; // main widget title
//Ming-Che 10/10
TQ_EXPORT char *qt_ximServer = 0; // XIM Server will connect to
-static bool mwIconic = FALSE; // main widget iconified
+static bool mwIconic = false; // main widget iconified
//Ming-Che 10/10
static Display *appDpy = 0; // X11 application display
static char *appDpyName = 0; // X11 display name
-static bool appForeignDpy = FALSE; // we didn't create display
-static bool appSync = FALSE; // X11 synchronization
+static bool appForeignDpy = false; // we didn't create display
+static bool appSync = false; // X11 synchronization
#if defined(QT_DEBUG)
-static bool appNoGrab = FALSE; // X11 grabbing enabled
-static bool appDoGrab = FALSE; // X11 grabbing override (gdb)
+static bool appNoGrab = false; // X11 grabbing enabled
+static bool appDoGrab = false; // X11 grabbing override (gdb)
#endif
static int appScreen; // X11 screen number
static int appScreenCount; // X11 screen count
-static bool app_save_rootinfo = FALSE; // save root info
-static bool app_do_modal = FALSE; // modal mode
+static bool app_save_rootinfo = false; // save root info
+static bool app_do_modal = false; // modal mode
static Window curWin = 0; // current window
static GC* app_gc_ro = 0; // read-only GC
@@ -246,7 +246,7 @@ Atom qt_utf8_string = 0;
// detect broken window managers
Atom qt_sgi_desks_manager = 0;
-bool qt_broken_wm = FALSE;
+bool qt_broken_wm = false;
static void qt_detect_broken_window_manager();
// NET WM support
@@ -320,19 +320,19 @@ static const int FocusModel_PointerRoot = 1;
static int qt_focus_model = -1;
#ifndef TQT_NO_XRANDR
-// TRUE if TQt is compiled w/ XRandR support and XRandR exists on the connected
+// true if TQt is compiled w/ XRandR support and XRandR exists on the connected
// Display
-bool qt_use_xrandr = FALSE;
+bool qt_use_xrandr = false;
static int xrandr_eventbase;
#endif
-// TRUE if TQt is compiled w/ XRender support and XRender exists on the connected
+// true if TQt is compiled w/ XRender support and XRender exists on the connected
// Display
-TQ_EXPORT bool tqt_use_xrender = FALSE;
+TQ_EXPORT bool tqt_use_xrender = false;
#ifndef TQT_NO_XSYNC
// True if SYNC extension exists on the connected display
-bool qt_use_xsync = FALSE;
+bool qt_use_xsync = false;
static int xsync_eventbase;
static int xsync_errorbase;
#endif
@@ -346,8 +346,8 @@ static long qt_meta_mask = 0;
static long qt_mode_switch_remove_mask = 0;
// flags for extensions for special Languages, currently only for RTL languages
-static bool qt_use_rtl_extensions = FALSE;
-TQ_EXPORT bool tqt_hebrew_keyboard_hack = FALSE;
+static bool qt_use_rtl_extensions = false;
+TQ_EXPORT bool tqt_hebrew_keyboard_hack = false;
static Window mouseActWindow = 0; // window where mouse is
static int mouseButtonPressed = 0; // last mouse button pressed
@@ -357,16 +357,16 @@ static short mouseXPos, mouseYPos; // mouse pres position in act window
static short mouseGlobalXPos, mouseGlobalYPos; // global mouse press position
extern TQWidgetList *tqt_modal_stack; // stack of modal widgets
-static bool ignoreNextMouseReleaseEvent = FALSE; // ignore the next mouse release
+static bool ignoreNextMouseReleaseEvent = false; // ignore the next mouse release
// event if return from a modal
// widget
static TQWidget *popupButtonFocus = 0;
static TQWidget *popupOfPopupButtonFocus = 0;
-static bool popupCloseDownMode = FALSE;
+static bool popupCloseDownMode = false;
static bool popupGrabOk;
-static bool sm_blockUserInput = FALSE; // session management
+static bool sm_blockUserInput = false; // session management
int qt_xfocusout_grab_counter = 0;
@@ -415,7 +415,7 @@ TQ_EXPORT QX11EventFilter tqt_set_x11_event_filter(QX11EventFilter filter)
static bool qt_x11EventFilter( XEvent* ev )
{
if ( qt_x11_event_filter && qt_x11_event_filter( ev ) )
- return TRUE;
+ return true;
return tqApp->x11EventFilter( ev );
}
@@ -464,7 +464,7 @@ bool tqt_try_modal( TQWidget *, XEvent * );
int qt_ncols_option = 216; // used in tqcolor_x11.cpp
int qt_visual_option = -1;
-bool qt_cmap_option = FALSE;
+bool qt_cmap_option = false;
TQWidget *qt_button_down = 0; // widget got last button-down
extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in tqaccel.cpp
@@ -551,7 +551,7 @@ void qt_deferred_map_take( TQWidget* w )
bool qt_deferred_map_contains( TQWidget* w )
{
if (!deferred_map_list)
- return FALSE;
+ return false;
else
return deferred_map_list->contains( w );
}
@@ -565,7 +565,7 @@ public:
void setWFlags( WFlags f ) { TQWidget::setWFlags(f); }
void clearWFlags( WFlags f ) { TQWidget::clearWFlags(f); }
bool translateMouseEvent( const XEvent * );
- bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=FALSE, bool statefulTranslation=TRUE );
+ bool translateKeyEventInternal( const XEvent *, int& count, TQString& text, int& state, char& ascii, int &code, TQEvent::Type &type, bool willRepeat=false, bool statefulTranslation=true );
bool translateKeyEvent( const XEvent *, bool grab );
bool translatePaintEvent( const XEvent * );
bool translateConfigEvent( const XEvent * );
@@ -775,15 +775,15 @@ static bool x11_badwindow;
// starts to ignore bad window errors from X
void qt_ignore_badwindow()
{
- x11_ignore_badwindow = TRUE;
- x11_badwindow = FALSE;
+ x11_ignore_badwindow = true;
+ x11_badwindow = false;
}
// ends ignoring bad window errors and returns whether an error
// had happen.
bool qt_badwindow()
{
- x11_ignore_badwindow = FALSE;
+ x11_ignore_badwindow = false;
return x11_badwindow;
}
@@ -793,7 +793,7 @@ static int (*original_xio_errhandler)( Display *dpy );
static int qt_x_errhandler( Display *dpy, XErrorEvent *err )
{
if ( err->error_code == BadWindow ) {
- x11_badwindow = TRUE;
+ x11_badwindow = true;
if ( err->request_code == 25 /* X_SendEvent */ &&
qt_xdnd_handle_badwindow() )
return 0;
@@ -862,7 +862,7 @@ void qt_x11_intern_atom( const char *name, Atom *result)
} else {
if ( !atoms_to_be_created ) {
atoms_to_be_created = new TQAsciiDict<Atom>;
- atoms_to_be_created->setAutoDelete( FALSE );
+ atoms_to_be_created->setAutoDelete( false );
}
atoms_to_be_created->insert( name, result );
*result = 0;
@@ -910,7 +910,7 @@ static void tqt_x11_process_intern_atoms()
#endif
delete atoms_to_be_created;
atoms_to_be_created = 0;
- create_atoms_now = TRUE;
+ create_atoms_now = true;
}
}
@@ -929,7 +929,7 @@ bool TQApplication::x11_apply_settings()
unsigned long nitems, after = 1;
unsigned char *data = 0;
TQDateTime timestamp, settingsstamp;
- bool update_timestamp = FALSE;
+ bool update_timestamp = false;
if (XGetWindowProperty(appDpy, TQPaintDevice::x11AppRootWindow( 0 ),
qt_settings_timestamp, 0, 0,
@@ -961,14 +961,14 @@ bool TQApplication::x11_apply_settings()
TQSettings settings;
settingsstamp = settings.lastModificationTime( "/qt/font" );
if (! settingsstamp.isValid())
- return FALSE;
+ return false;
if ( appliedstamp && appliedstamp == settingsstamp.toTime_t() )
- return TRUE;
+ return true;
appliedstamp = settingsstamp.toTime_t();
if (! timestamp.isValid() || settingsstamp > timestamp)
- update_timestamp = TRUE;
+ update_timestamp = true;
/*
TQt settings. This is now they are written into the datastream.
@@ -1019,7 +1019,7 @@ bool TQApplication::x11_apply_settings()
}
if (pal != *tqt_std_pal && pal != TQApplication::palette()) {
- TQApplication::setPalette(pal, TRUE);
+ TQApplication::setPalette(pal, true);
*tqt_std_pal = pal;
}
@@ -1031,7 +1031,7 @@ bool TQApplication::x11_apply_settings()
font.fromString(str);
if (font != TQApplication::font())
- TQApplication::setFont(font, TRUE);
+ TQApplication::setFont(font, true);
}
}
@@ -1050,8 +1050,8 @@ bool TQApplication::x11_apply_settings()
TQString stylename = settings.readEntry( "/qt/style" );
if ( !stylename.isEmpty() && !tqt_explicit_app_style ) {
TQApplication::setStyle( stylename );
- // took the style from the user settings, so mark the explicit flag FALSE
- tqt_explicit_app_style = FALSE;
+ // took the style from the user settings, so mark the explicit flag false
+ tqt_explicit_app_style = false;
}
num =
@@ -1124,10 +1124,10 @@ bool TQApplication::x11_apply_settings()
settings.readBoolEntry("/qt/brokenWindowManager", qt_broken_wm);
tqt_resolve_symlinks =
- settings.readBoolEntry("/qt/resolveSymlinks", TRUE);
+ settings.readBoolEntry("/qt/resolveSymlinks", true);
qt_use_rtl_extensions =
- settings.readBoolEntry("/qt/useRtlExtensions", FALSE);
+ settings.readBoolEntry("/qt/useRtlExtensions", false);
#ifndef TQT_NO_XIM
if (qt_xim_preferred_style == 0) {
@@ -1178,7 +1178,7 @@ bool TQApplication::x11_apply_settings()
stamp.buffer().size());
}
- return TRUE;
+ return true;
}
@@ -1226,13 +1226,13 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
TQCString resFont, resFG, resBG, resEF, sysFont;
- TQApplication::setEffectEnabled( TQt::UI_General, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_FadeMenu, FALSE);
- TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, FALSE );
- TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, FALSE );
+ TQApplication::setEffectEnabled( TQt::UI_General, false);
+ TQApplication::setEffectEnabled( TQt::UI_AnimateMenu, false);
+ TQApplication::setEffectEnabled( TQt::UI_FadeMenu, false);
+ TQApplication::setEffectEnabled( TQt::UI_AnimateCombo, false );
+ TQApplication::setEffectEnabled( TQt::UI_AnimateTooltip, false );
+ TQApplication::setEffectEnabled( TQt::UI_FadeTooltip, false );
+ TQApplication::setEffectEnabled( TQt::UI_AnimateToolBox, false );
if ( TQApplication::desktopSettingsAware() && !TQApplication::x11_apply_settings() ) {
int format;
@@ -1268,7 +1268,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
r = resl;
while ( isspace((uchar) res[l]) )
l++;
- bool mine = FALSE;
+ bool mine = false;
if ( res[l] == '*' &&
(res[l+1] == 'f' || res[l+1] == 'b' || res[l+1] == 'g' ||
res[l+1] == 'F' || res[l+1] == 'B' || res[l+1] == 'G' ||
@@ -1279,20 +1279,20 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
} else if ( res[l] == appName[0] || (appClass && res[l] == appClass[0]) ) {
if (res.mid(l,apnl) == apn && (res[l+apnl] == '.' || res[l+apnl] == '*')) {
TQCString item = res.mid( l, r - l ).simplifyWhiteSpace();
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(apnl+1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
} else if (res.mid(l,apcl) == apc && (res[l+apcl] == '.' || res[l+apcl] == '*')) {
TQCString item = res.mid( l, r - l ).simplifyWhiteSpace();
int i = item.find( ":" );
key = item.left( i ).stripWhiteSpace().mid(apcl+1).lower();
value = item.right( item.length() - i - 1 ).stripWhiteSpace();
- mine = TRUE;
+ mine = true;
}
}
@@ -1348,7 +1348,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
}
if ( fnt != TQApplication::font() ) {
- TQApplication::setFont( fnt, TRUE );
+ TQApplication::setFont( fnt, true );
}
}
@@ -1374,10 +1374,10 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
int h,s,v;
fg.hsv(&h,&s,&v);
TQColor base = TQt::white;
- bool bright_mode = FALSE;
+ bool bright_mode = false;
if (v >= 255-50) {
base = btn.dark(150);
- bright_mode = TRUE;
+ bright_mode = true;
}
TQColorGroup cg( fg, btn, btn.light(),
@@ -1403,7 +1403,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
}
TQPalette pal( cg, dcg, cg );
if ( pal != *tqt_std_pal && pal != TQApplication::palette() )
- TQApplication::setPalette( pal, TRUE );
+ TQApplication::setPalette( pal, true );
*tqt_std_pal = pal;
}
@@ -1436,7 +1436,7 @@ static void qt_detect_broken_window_manager()
if (e == Success && type == XA_WINDOW && format == 32 && nitems == 1 && after == 0) {
// detected SGI 4Dwm
- qt_broken_wm = TRUE;
+ qt_broken_wm = true;
}
}
@@ -1494,13 +1494,13 @@ void qt_get_net_supported()
bool qt_net_supports(Atom atom)
{
if (! qt_net_supported_list)
- return FALSE;
+ return false;
- bool supported = FALSE;
+ bool supported = false;
int i = 0;
while (qt_net_supported_list[i] != 0) {
if (qt_net_supported_list[i++] == atom) {
- supported = TRUE;
+ supported = true;
break;
}
}
@@ -1688,7 +1688,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( display && ((!argcptr) || (!argv)) ) {
// TQt part of other application
- appForeignDpy = TRUE;
+ appForeignDpy = true;
appDpy = display;
// Set application name and class
@@ -1797,7 +1797,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
#endif
} else if ( arg == "-cmap" ) { // xv uses this name
- qt_cmap_option = TRUE;
+ qt_cmap_option = true;
}
#if defined(QT_DEBUG)
else if ( arg == "-sync" )
@@ -1828,7 +1828,7 @@ void tqt_init_internal( int *argcptr, char **argv,
s += (char)c;
}
if ( s == "gdb" ) {
- appNoGrab = TRUE;
+ appNoGrab = true;
tqDebug( "TQt: gdb: -nograb added to command-line options.\n"
"\t Use the -dograb option to enforce grabbing." );
}
@@ -1839,7 +1839,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( display ) {
// Display connection already opened by another application
- appForeignDpy = TRUE;
+ appForeignDpy = true;
appDpy = display;
}
else {
@@ -1854,7 +1854,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
if ( appSync ) // if "-sync" argument
- XSynchronize( appDpy, TRUE );
+ XSynchronize( appDpy, true );
}
}
}
@@ -1888,7 +1888,7 @@ void tqt_init_internal( int *argcptr, char **argv,
int screen;
TQString serverVendor( ServerVendor( appDpy) );
if (serverVendor.contains("XFree86") && VendorRelease(appDpy) < 40300000)
- tqt_hebrew_keyboard_hack = TRUE;
+ tqt_hebrew_keyboard_hack = true;
for ( screen = 0; screen < appScreenCount; ++screen ) {
TQPaintDevice::x_appdepth_arr[ screen ] = DefaultDepth(appDpy, screen);
@@ -1911,7 +1911,7 @@ void tqt_init_internal( int *argcptr, char **argv,
TQPaintDevice::x_appdepth_arr[ screen ] = vi->depth;
TQPaintDevice::x_appcells_arr[ screen ] = vi->visual->map_entries;
TQPaintDevice::x_appvisual_arr[ screen ] = vi->visual;
- TQPaintDevice::x_appdefvisual_arr[ screen ] = FALSE;
+ TQPaintDevice::x_appdefvisual_arr[ screen ] = false;
XFree(vi);
} else {
// couldn't get info about the visual, use the default instead
@@ -1922,7 +1922,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if (!vis) {
// use the default visual
vis = DefaultVisual(appDpy, screen);
- TQPaintDevice::x_appdefvisual_arr[ screen ] = TRUE;
+ TQPaintDevice::x_appdefvisual_arr[ screen ] = true;
if ( qt_visual_option == TrueColor ||
TQApplication::colorSpec() == TQApplication::ManyColor ) {
@@ -1954,7 +1954,7 @@ void tqt_init_internal( int *argcptr, char **argv,
if ( colormap && screen == appScreen ) {
// use the provided colormap for the default screen only
TQPaintDevice::x_appcolormap_arr[ screen ] = colormap;
- TQPaintDevice::x_appdefcolormap_arr[ screen ] = FALSE;
+ TQPaintDevice::x_appdefcolormap_arr[ screen ] = false;
} else {
if ( vis->c_class == TrueColor ) {
TQPaintDevice::x_appdefcolormap_arr[ screen ] =
@@ -2120,7 +2120,7 @@ void tqt_init_internal( int *argcptr, char **argv,
Q_UNUSED( xrandr_eventbase );
if ( XRRQueryExtension( appDpy, &xrandr_eventbase, &xrandr_errorbase ) ) {
// XRandR is supported
- qt_use_xrandr = TRUE;
+ qt_use_xrandr = true;
}
#endif // TQT_NO_XRANDR
@@ -2142,7 +2142,7 @@ void tqt_init_internal( int *argcptr, char **argv,
int xsync_major, xsync_minor;
if ( XSyncQueryExtension( appDpy, &xsync_eventbase, &xsync_errorbase ) &&
XSyncInitialize( appDpy, &xsync_major, &xsync_minor ) ) {
- qt_use_xsync = TRUE;
+ qt_use_xsync = true;
}
#endif
@@ -2312,7 +2312,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
dev = NULL;
for ( devs = devices, i = 0; i < ndev; i++, devs++ ) {
- gotEraser = FALSE;
+ gotEraser = false;
#if defined(Q_OS_IRIX)
gotStylus = ( !strncmp(devs->name,
@@ -2437,7 +2437,7 @@ void tqt_init_internal( int *argcptr, char **argv,
}
tqt_resolve_symlinks =
- settings.readBoolEntry("/qt/resolveSymlinks", TRUE);
+ settings.readBoolEntry("/qt/resolveSymlinks", true);
}
}
}
@@ -2636,7 +2636,7 @@ void qt_save_rootinfo() // save new root info
void qt_updated_rootinfo()
{
- app_save_rootinfo = TRUE;
+ app_save_rootinfo = true;
}
bool qt_wstate_iconified( WId winid )
@@ -2648,7 +2648,7 @@ bool qt_wstate_iconified( WId winid )
int r = XGetWindowProperty( appDpy, winid, tqt_wm_state, 0, 2,
False, AnyPropertyType, &type, &format,
&length, &after, &data );
- bool iconic = FALSE;
+ bool iconic = false;
if ( r == Success && data && format == 32 ) {
// TQ_UINT32 *wstate = (TQ_UINT32*)data;
unsigned long *wstate = (unsigned long *) data;
@@ -2694,7 +2694,7 @@ bool qt_nograb() // application no-grab option
#if defined(QT_DEBUG)
return appNoGrab;
#else
- return FALSE;
+ return false;
#endif
}
@@ -2738,13 +2738,13 @@ GC tqt_xget_readonly_gc( int scrn, bool monochrome ) // get read-only GC
if ( !app_gc_ro_m ) // create GC for bitmap
memset( (app_gc_ro_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_ro_m[scrn] )
- app_gc_ro_m[scrn] = create_gc( scrn, TRUE );
+ app_gc_ro_m[scrn] = create_gc( scrn, true );
gc = app_gc_ro_m[scrn];
} else { // create standard GC
if ( !app_gc_ro )
memset( (app_gc_ro = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_ro[scrn] )
- app_gc_ro[scrn] = create_gc( scrn, FALSE );
+ app_gc_ro[scrn] = create_gc( scrn, false );
gc = app_gc_ro[scrn];
}
return gc;
@@ -2762,13 +2762,13 @@ GC tqt_xget_temp_gc( int scrn, bool monochrome ) // get temporary GC
if ( !app_gc_tmp_m ) // create GC for bitmap
memset( (app_gc_tmp_m = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_tmp_m[scrn] )
- app_gc_tmp_m[scrn] = create_gc( scrn, TRUE );
+ app_gc_tmp_m[scrn] = create_gc( scrn, true );
gc = app_gc_tmp_m[scrn];
} else { // create standard GC
if ( !app_gc_tmp )
memset( (app_gc_tmp = new GC[appScreenCount]), 0, appScreenCount * sizeof( GC ) );
if ( !app_gc_tmp[scrn] )
- app_gc_tmp[scrn] = create_gc( scrn, FALSE );
+ app_gc_tmp[scrn] = create_gc( scrn, false );
gc = app_gc_tmp[scrn];
}
return gc;
@@ -2895,9 +2895,9 @@ static TQCursorList *cursorStack = 0;
corresponding restoreOverrideCursor(), otherwise the stack will
never be emptied.
- If \a replace is TRUE, the new cursor will replace the last
+ If \a replace is true, the new cursor will replace the last
override cursor (the stack keeps its depth). If \a replace is
- FALSE, the new stack is pushed onto the top of the stack.
+ false, the new stack is pushed onto the top of the stack.
Example:
\code
@@ -2914,7 +2914,7 @@ void TQApplication::setOverrideCursor( const TQCursor &cursor, bool replace )
if ( !cursorStack ) {
cursorStack = new TQCursorList;
TQ_CHECK_PTR( cursorStack );
- cursorStack->setAutoDelete( TRUE );
+ cursorStack->setAutoDelete( true );
}
app_cursor = new TQCursor( cursor );
TQ_CHECK_PTR( app_cursor );
@@ -2970,15 +2970,15 @@ void TQApplication::restoreOverrideCursor()
/*!
\fn bool TQApplication::hasGlobalMouseTracking()
- Returns TRUE if global mouse tracking is enabled; otherwise
- returns FALSE.
+ Returns true if global mouse tracking is enabled; otherwise
+ returns false.
\sa setGlobalMouseTracking()
*/
/*!
- Enables global mouse tracking if \a enable is TRUE, or disables it
- if \a enable is FALSE.
+ Enables global mouse tracking if \a enable is true, or disables it
+ if \a enable is false.
Enabling global mouse tracking makes it possible for widget event
filters or application event filters to get all mouse move events,
@@ -2987,18 +2987,18 @@ void TQApplication::restoreOverrideCursor()
Global mouse tracking does not affect widgets and their
mouseMoveEvent(). For a widget to get mouse move events when no
- button is depressed, it must do TQWidget::setMouseTracking(TRUE).
+ button is depressed, it must do TQWidget::setMouseTracking(true).
This function uses an internal counter. Each
- setGlobalMouseTracking(TRUE) must have a corresponding
- setGlobalMouseTracking(FALSE):
+ setGlobalMouseTracking(true) must have a corresponding
+ setGlobalMouseTracking(false):
\code
// at this point global mouse tracking is off
- TQApplication::setGlobalMouseTracking( TRUE );
- TQApplication::setGlobalMouseTracking( TRUE );
- TQApplication::setGlobalMouseTracking( FALSE );
+ TQApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( true );
+ TQApplication::setGlobalMouseTracking( false );
// at this point it's still on
- TQApplication::setGlobalMouseTracking( FALSE );
+ TQApplication::setGlobalMouseTracking( false );
// but now it's off
\endcode
@@ -3019,13 +3019,13 @@ void TQApplication::setGlobalMouseTracking( bool enable )
while ( (w=it.current()) ) {
if ( app_tracking > 0 ) { // switch on
if ( !w->testWState(WState_MouseTracking) ) {
- w->setMouseTracking( TRUE );
+ w->setMouseTracking( true );
w->clearWState( WState_MouseTracking );
}
} else { // switch off
if ( !w->testWState(WState_MouseTracking) ) {
w->setWState( WState_MouseTracking );
- w->setMouseTracking( FALSE );
+ w->setMouseTracking( false );
}
}
++it;
@@ -3046,7 +3046,7 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
uchar *data;
Window root, parent, target=0, *children=0;
uint nchildren;
- if ( XGetWindowProperty( appDpy, win, property, 0, 0, FALSE, AnyPropertyType,
+ if ( XGetWindowProperty( appDpy, win, property, 0, 0, false, AnyPropertyType,
&type, &format, &nitems, &after, &data ) == Success ) {
if ( data )
XFree( (char *)data );
@@ -3070,9 +3070,9 @@ Window qt_x11_findClientWindow( Window win, Atom property, bool leaf )
Returns a pointer to the widget at global screen position \a
(x, y), or 0 if there is no TQt widget there.
- If \a child is FALSE and there is a child widget at position \a
+ If \a child is false and there is a child widget at position \a
(x, y), the top-level widget containing it is returned. If \a child
- is TRUE the child widget at position \a (x, y) is returned.
+ is true the child widget at position \a (x, y) is returned.
This function is normally rather slow.
@@ -3098,7 +3098,7 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
if ( !w ) {
qt_ignore_badwindow();
- target = qt_x11_findClientWindow( target, tqt_wm_state, TRUE );
+ target = qt_x11_findClientWindow( target, tqt_wm_state, true );
if (qt_badwindow() )
return 0;
w = TQWidget::find( (WId)target );
@@ -3144,9 +3144,9 @@ TQWidget *TQApplication::widgetAt( int x, int y, bool child )
Returns a pointer to the widget at global screen position \a pos,
or 0 if there is no TQt widget there.
- If \a child is FALSE and there is a child widget at position \a
+ If \a child is false and there is a child widget at position \a
pos, the top-level widget containing it is returned. If \a child
- is TRUE the child widget at position \a pos is returned.
+ is true the child widget at position \a pos is returned.
*/
@@ -3338,7 +3338,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
{
switch ( event->type ) {
case ButtonPress:
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
tqt_x_user_time = event->xbutton.time;
// fallthrough intended
case ButtonRelease:
@@ -3386,11 +3386,11 @@ int TQApplication::x11ProcessEvent( XEvent* event )
}
TQETWidget *keywidget=0;
- bool grabbed=FALSE;
+ bool grabbed=false;
if ( event->type==XKeyPress || event->type==XKeyRelease ) {
keywidget = (TQETWidget*)TQWidget::keyboardGrabber();
if ( keywidget ) {
- grabbed = TRUE;
+ grabbed = true;
} else {
if ( focus_widget )
keywidget = (TQETWidget*)focus_widget;
@@ -3419,12 +3419,12 @@ int TQApplication::x11ProcessEvent( XEvent* event )
// #endif
if( ( event->type==XKeyPress || event->type==XKeyRelease ) &&
sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
// for XIM handling
TQInputContext *qic = keywidget->getInputContext();
if( qic && qic->x11FilterEvent( keywidget, event ) )
- return TRUE;
+ return true;
// filterEvent() accepts TQEvent *event rather than preexpanded key
// event attribute values. This is intended to pass other IM-related
@@ -3442,20 +3442,20 @@ int TQApplication::x11ProcessEvent( XEvent* event )
keywidget->translateKeyEventInternal( event, count, text,
state, ascii, code, type,
- FALSE, FALSE );
+ false, false );
// both key press/release is required for some complex
// input methods. don't eliminate anything.
- TQKeyEvent keyevent( type, code, ascii, state, text, FALSE, count );
+ TQKeyEvent keyevent( type, code, ascii, state, text, false, count );
if( qic && qic->filterEvent( &keyevent ) )
- return TRUE;
+ return true;
}
} else
#endif // TQT_NO_IM
{
if ( XFilterEvent( event, None ) )
- return TRUE;
+ return true;
}
if ( qt_x11EventFilter(event) ) // send through app filter
@@ -3569,7 +3569,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( app_do_modal ) // modal event handling
if ( !tqt_try_modal(widget, event) ) {
if ( event->type == ClientMessage )
- x11ClientMessage( widget, event, TRUE );
+ x11ClientMessage( widget, event, true );
return 1;
}
@@ -3589,7 +3589,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
case ButtonRelease: // mouse event
if ( ignoreNextMouseReleaseEvent ) {
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
break;
}
// fall through intended
@@ -3610,7 +3610,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
widget->translateMouseEvent( event );
#if defined(QT_TABLET_SUPPORT)
} else {
- chokeMouse = FALSE;
+ chokeMouse = false;
}
#endif
break;
@@ -3755,7 +3755,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
widget->topData()->spont_unmapped = 1;
TQHideEvent e;
TQApplication::sendSpontaneousEvent( widget, &e );
- widget->hideChildren( TRUE );
+ widget->hideChildren( true );
}
break;
@@ -3763,7 +3763,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( widget->isTopLevel() &&
widget->topData()->spont_unmapped ) {
widget->topData()->spont_unmapped = 0;
- widget->showChildren( TRUE );
+ widget->showChildren( true );
TQShowEvent e;
TQApplication::sendSpontaneousEvent( widget, &e );
}
@@ -3861,15 +3861,15 @@ int TQApplication::x11ProcessEvent( XEvent* event )
reimplement this function, you get direct access to all X events
that the are received from the X server.
- Return TRUE if you want to stop the event from being processed.
- Return FALSE for normal event dispatching.
+ Return true if you want to stop the event from being processed.
+ Return false for normal event dispatching.
\sa x11ProcessEvent()
*/
bool TQApplication::x11EventFilter( XEvent * )
{
- return FALSE;
+ return false;
}
@@ -3909,9 +3909,9 @@ void tqt_enter_modal( TQWidget *widget )
tqt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) );
tqt_modal_stack->insert( 0, widget );
- app_do_modal = TRUE;
+ app_do_modal = true;
curWin = 0;
- ignoreNextMouseReleaseEvent = FALSE;
+ ignoreNextMouseReleaseEvent = false;
}
@@ -3922,13 +3922,13 @@ void tqt_leave_modal( TQWidget *widget )
delete tqt_modal_stack;
tqt_modal_stack = 0;
TQPoint p( TQCursor::pos() );
- TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), TRUE );
+ TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), true );
tqt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event
curWin = w? w->winId() : 0;
}
}
app_do_modal = tqt_modal_stack != 0;
- ignoreNextMouseReleaseEvent = TRUE;
+ ignoreNextMouseReleaseEvent = true;
if (widget->parentWidget()) {
TQEvent e(TQEvent::WindowUnblocked);
@@ -3945,16 +3945,16 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
case ButtonPress:
case ButtonRelease:
case MotionNotify:
- return TRUE;
+ return true;
default:
break;
}
}
if ( tqt_tryModalHelper( widget ) )
- return TRUE;
+ return true;
- bool block_event = FALSE;
+ bool block_event = false;
switch ( event->type ) {
case ButtonPress: // disallow mouse/key events
case ButtonRelease:
@@ -3964,7 +3964,7 @@ TQ_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
case EnterNotify:
case LeaveNotify:
case ClientMessage:
- block_event = TRUE;
+ block_event = true;
break;
default:
break;
@@ -4000,10 +4000,10 @@ void TQApplication::openPopup( TQWidget *popup )
popupWidgets->append( popup ); // add to end of list
if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
- int r = XGrabKeyboard( popup->x11Display(), popup->winId(), FALSE,
+ int r = XGrabKeyboard( popup->x11Display(), popup->winId(), false,
GrabModeSync, GrabModeAsync, CurrentTime );
if ( (popupGrabOk = (r == GrabSuccess)) ) {
- r = XGrabPointer( popup->x11Display(), popup->winId(), TRUE,
+ r = XGrabPointer( popup->x11Display(), popup->winId(), true,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask |
LeaveWindowMask | PointerMotionMask),
@@ -4040,7 +4040,7 @@ void TQApplication::closePopup( TQWidget *popup )
popupOfPopupButtonFocus = 0;
}
if ( popupWidgets->count() == 0 ) { // this was the last popup
- popupCloseDownMode = TRUE; // control mouse events
+ popupCloseDownMode = true; // control mouse events
delete popupWidgets;
popupWidgets = 0;
if ( !qt_nograb() && popupGrabOk ) { // grabbing not disabled
@@ -4077,10 +4077,10 @@ void TQApplication::closePopup( TQWidget *popup )
aw->setFocus();
TQFocusEvent::resetReason();
if ( popupWidgets->count() == 1 && !qt_nograb() ){ // grab mouse/keyboard
- int r = XGrabKeyboard( aw->x11Display(), aw->winId(), FALSE,
+ int r = XGrabKeyboard( aw->x11Display(), aw->winId(), false,
GrabModeSync, GrabModeAsync, CurrentTime );
if ( (popupGrabOk = (r == GrabSuccess)) ) {
- r = XGrabPointer( aw->x11Display(), aw->winId(), TRUE,
+ r = XGrabPointer( aw->x11Display(), aw->winId(), true,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask |
LeaveWindowMask | PointerMotionMask),
@@ -4131,7 +4131,7 @@ int qt_x11_translateButtonState( int s )
bool TQETWidget::translateMouseEvent( const XEvent *event )
{
- static bool manualGrab = FALSE;
+ static bool manualGrab = false;
TQEvent::Type type; // event parameters
TQPoint pos;
TQPoint globalPos;
@@ -4140,14 +4140,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
XEvent nextEvent;
if ( sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
static int x_root_save = -1, y_root_save = -1;
if ( event->type == MotionNotify ) { // mouse move
if (event->xmotion.root != RootWindow(appDpy, x11Screen()) &&
! qt_xdnd_dragging )
- return FALSE;
+ return false;
XMotionEvent lastMotion = event->xmotion;
while( XPending( appDpy ) ) { // compres mouse moves
@@ -4183,14 +4183,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
// throw away mouse move events that are sent multiple times to the same
// position
- bool throw_away = FALSE;
+ bool throw_away = false;
if ( x_root_save == globalPos.x() &&
y_root_save == globalPos.y() )
- throw_away = TRUE;
+ throw_away = true;
x_root_save = globalPos.x();
y_root_save = globalPos.y();
if ( throw_away )
- return TRUE;
+ return true;
} else if ( event->type == EnterNotify || event->type == LeaveNotify) {
XEvent *xevent = (XEvent *)event;
//unsigned int xstate = event->xcrossing.state;
@@ -4256,7 +4256,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
(btn == 6 || btn == 7) );
translateWheelEvent( globalPos.x(), globalPos.y(), delta, state, (hor)?Horizontal:Vertical );
}
- return TRUE;
+ return true;
// history navigation buttons
case 8: button = HistoryBackButton; break;
@@ -4269,8 +4269,8 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( translateXinputEvent( &myEv ) ) {
//Spontaneous event sent. Check if we need to continue.
if ( chokeMouse ) {
- chokeMouse = FALSE;
- return FALSE;
+ chokeMouse = false;
+ return false;
}
}
}
@@ -4302,14 +4302,14 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
if ( translateXinputEvent( &myEv ) ) {
//Spontaneous event sent. Check if we need to continue.
if ( chokeMouse ) {
- chokeMouse = FALSE;
- return FALSE;
+ chokeMouse = false;
+ return false;
}
}
}
#endif
if ( manualGrab ) { // release manual grab
- manualGrab = FALSE;
+ manualGrab = false;
XUngrabPointer( x11Display(), CurrentTime );
XFlush( x11Display() );
}
@@ -4320,7 +4320,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
mouseActWindow = winId(); // save some event params
mouseButtonState = state;
if ( type == 0 ) // don't send event
- return FALSE;
+ return false;
if ( tqApp->inPopupMode() ) { // in popup mode
TQWidget *popup = tqApp->activePopupWidget();
@@ -4330,7 +4330,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
else // send to last popup
pos = popup->mapFromGlobal( globalPos );
}
- bool releaseAfter = FALSE;
+ bool releaseAfter = false;
TQWidget *popupChild = popup->childAt( pos );
TQWidget *popupTarget = popupChild ? popupChild : popup;
@@ -4351,7 +4351,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
popupOfPopupButtonFocus = popup;
break;
case TQEvent::MouseButtonRelease:
- releaseAfter = TRUE;
+ releaseAfter = true;
break;
default:
break; // nothing for mouse move
@@ -4398,7 +4398,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
} else {
if ( type != TQEvent::MouseButtonRelease && state != 0 &&
TQWidget::find((WId)mouseActWindow) ) {
- manualGrab = TRUE; // need to manually grab
+ manualGrab = true; // need to manually grab
XGrabPointer( dpy, mouseActWindow, False,
(uint)(ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask |
@@ -4419,9 +4419,9 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
}
if ( popupCloseDownMode ) {
- popupCloseDownMode = FALSE;
+ popupCloseDownMode = false;
if ( testWFlags(WType_Popup) ) // ignore replayed event
- return TRUE;
+ return true;
}
if ( type == TQEvent::MouseButtonRelease &&
@@ -4441,7 +4441,7 @@ bool TQETWidget::translateMouseEvent( const XEvent *event )
TQApplication::sendSpontaneousEvent( widget, &e );
}
}
- return TRUE;
+ return true;
}
@@ -4458,7 +4458,7 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
TQPoint(global_x, global_y), delta, state, orient );
if ( TQApplication::sendSpontaneousEvent( this, &e ) )
- return TRUE;
+ return true;
}
// send the event to the widget that has the focus or its ancestors, if different
@@ -4470,9 +4470,9 @@ bool TQETWidget::translateWheelEvent( int global_x, int global_y, int delta, int
TQWheelEvent e( mapFromGlobal(TQPoint( global_x, global_y)),
TQPoint(global_x, global_y), delta, state, orient );
if ( TQApplication::sendSpontaneousEvent( w, &e ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -4586,7 +4586,7 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
#if defined (Q_OS_IRIX)
s = XQueryDeviceState( appDpy, dev );
if ( s == NULL )
- return FALSE;
+ return false;
iClass = s->data;
for ( j = 0; j < s->num_classes; j++ ) {
if ( iClass->c_class == ValuatorClass ) {
@@ -4649,13 +4649,13 @@ bool TQETWidget::translateXinputEvent( const XEvent *ev )
TQTabletEvent e( t, curr, global, deviceType, pressure, xTilt, yTilt, tId );
TQApplication::sendSpontaneousEvent( w, &e );
- return TRUE;
+ return true;
}
#endif
bool TQETWidget::translatePropertyEvent(const XEvent *event)
{
- if (!isTopLevel()) return TRUE;
+ if (!isTopLevel()) return true;
Atom ret;
int format, e;
@@ -4682,8 +4682,8 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
}
}
} else if (event->xproperty.atom == qt_net_wm_state) {
- bool max = FALSE;
- bool full = FALSE;
+ bool max = false;
+ bool full = false;
if (event->xproperty.state == PropertyNewValue) {
// using length of 1024 should be safe for all current and
@@ -4697,33 +4697,33 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
unsigned long i;
for (i = 0; i < nitems; i++) {
if (states[i] == qt_net_wm_state_max_v || states[i] == qt_net_wm_state_max_h)
- max = TRUE;
+ max = true;
else if (states[i] == qt_net_wm_state_fullscreen)
- full = TRUE;
+ full = true;
}
}
}
- bool send_event = FALSE;
+ bool send_event = false;
if (qt_net_supports(qt_net_wm_state_max_v)
&& qt_net_supports(qt_net_wm_state_max_h)) {
if (max && !isMaximized()) {
setWState(WState_Maximized);
- send_event = TRUE;
+ send_event = true;
} else if (!max && isMaximized()) {
clearWState(WState_Maximized);
- send_event = TRUE;
+ send_event = true;
}
}
if (qt_net_supports(qt_net_wm_state_fullscreen)) {
if (full && !isFullScreen()) {
setWState(WState_FullScreen);
- send_event = TRUE;
+ send_event = true;
} else if (!full && isFullScreen()) {
clearWState(WState_FullScreen);
- send_event = TRUE;
+ send_event = true;
}
}
@@ -4803,7 +4803,7 @@ bool TQETWidget::translatePropertyEvent(const XEvent *event)
if (data)
XFree(data);
- return TRUE;
+ return true;
}
#ifndef XK_ISO_Left_Tab
@@ -5244,9 +5244,9 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
if ( !keyDict ) {
keyDict = new TQIntDict<void>( 13 );
- keyDict->setAutoDelete( FALSE );
+ keyDict->setAutoDelete( false );
textDict = new TQIntDict<void>( 13 );
- textDict->setAutoDelete( FALSE );
+ textDict->setAutoDelete( false );
tqAddPostRoutine( deleteKeyDicts );
}
@@ -5277,7 +5277,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
int keycode = event->xkey.keycode;
if ( type == TQEvent::KeyPress ) {
- bool mb=FALSE;
+ bool mb=false;
// commit string handling is done by
// TQXIMInputContext::x11FilterEvent() and are passed to
// widgets via TQIMEvent regardless of XIM style, so the
@@ -5287,7 +5287,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
TQTLWExtra* xd = tlw->topData();
TQInputContext *qic = (TQInputContext *) xd->xic;
if ( qic ) {
- mb=TRUE;
+ mb=true;
count = qic->lookupString(&xkeyevent, chars, &key, &status);
}
}
@@ -5383,7 +5383,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
chars[0] = 0;
directionKeyEvent = 0;
lastWinId = 0;
- return TRUE;
+ return true;
} else {
directionKeyEvent = 0;
lastWinId = 0;
@@ -5514,7 +5514,7 @@ bool TQETWidget::translateKeyEventInternal( const XEvent *event, int& count,
text = converted;
else
text = chars;
- return TRUE;
+ return true;
}
@@ -5537,14 +5537,14 @@ extern "C" {
static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
{
if (event->type != XKeyPress && event->type != XKeyRelease)
- return FALSE;
+ return false;
qt_auto_repeat_data *d = (qt_auto_repeat_data *) arg;
if (d->error ||
event->xkey.window != d->window ||
event->xkey.keycode != d->keycode) {
- d->error = TRUE;
- return FALSE;
+ d->error = true;
+ return false;
}
if (event->type == XKeyPress) {
@@ -5555,15 +5555,15 @@ static Bool qt_keypress_scanner(Display *, XEvent *event, XPointer arg)
// must be XKeyRelease event
if (d->release) {
// found a second release
- d->error = TRUE;
- return FALSE;
+ d->error = true;
+ return false;
}
// found a single release
- d->release = TRUE;
+ d->release = true;
d->timestamp = event->xkey.time;
- return FALSE;
+ return false;
}
static Bool qt_keyrelease_scanner(Display *, XEvent *event, XPointer arg)
@@ -5586,15 +5586,15 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
char ascii = 0;
if ( sm_blockUserInput ) // block user interaction during session management
- return TRUE;
+ return true;
Display *dpy = x11Display();
if ( !isEnabled() )
- return TRUE;
+ return true;
TQEvent::Type type;
- bool autor = FALSE;
+ bool autor = false;
TQString text;
translateKeyEventInternal( event, count, text, state, ascii, code, type,
@@ -5609,18 +5609,18 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
if ( event->type == XKeyPress ) {
if ( curr_autorep == event->xkey.keycode ) {
- autor = TRUE;
+ autor = true;
curr_autorep = 0;
}
} else {
// look ahead for auto-repeat
XEvent nextpress;
- auto_repeat_data.release = TRUE;
- auto_repeat_data.error = FALSE;
+ auto_repeat_data.release = true;
+ auto_repeat_data.error = false;
if (XCheckIfEvent(dpy, &nextpress, &qt_keypress_scanner,
(XPointer) &auto_repeat_data)) {
- autor = TRUE;
+ autor = true;
// Put it back... we COULD send the event now and not need
// the static curr_autorep variable.
@@ -5635,7 +5635,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
TQKeyEvent a( type, code, ascii, state, text, autor,
TQMAX( TQMAX(count,1), int(text.length())) );
if ( tqt_tryAccelEvent( this, &a ) )
- return TRUE;
+ return true;
}
long save = 0;
@@ -5691,7 +5691,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
XEvent evPress;
// sync the event queue, this makes key compress work better
- XSync( dpy, FALSE );
+ XSync( dpy, false );
for (;;) {
TQString textIntern;
@@ -5743,8 +5743,8 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
XEvent dummy;
for (;;) {
- auto_repeat_data.release = FALSE;
- auto_repeat_data.error = FALSE;
+ auto_repeat_data.release = false;
+ auto_repeat_data.error = false;
if (! XCheckIfEvent(dpy, &dummy, &qt_keypress_scanner,
(XPointer) &auto_repeat_data))
break;
@@ -5769,7 +5769,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
TQContextMenuEvent e( TQContextMenuEvent::Keyboard, TQPoint( 5, 5 ), mapToGlobal( TQPoint( 5, 5 ) ), 0 );
TQApplication::sendSpontaneousEvent( this, &e );
if( e.isAccepted() )
- return TRUE;
+ return true;
}
TQKeyEvent e( type, code, ascii, state, text, autor,
@@ -5816,7 +5816,7 @@ void qt_insert_sip( TQWidget* scrolled_widget, int dx, int dy )
{
if ( !sip_list ) {
sip_list = new TQPtrList<TQScrollInProgress>;
- sip_list->setAutoDelete( TRUE );
+ sip_list->setAutoDelete( true );
}
TQScrollInProgress* sip = new TQScrollInProgress( scrolled_widget, dx, dy );
@@ -5869,10 +5869,10 @@ bool translateBySips( TQWidget* that, TQRect& paintRect )
}
if ( sips > 1 ) {
paintRect.moveBy( dx, dy );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool TQETWidget::translatePaintEvent( const XEvent *event )
@@ -5901,7 +5901,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
xevent.xexpose.width,
xevent.xexpose.height);
if ( translateBySips( this, exposure ) )
- should_clip = TRUE;
+ should_clip = true;
paintRegion = paintRegion.unite( exposure );
} else {
translateScrollDoneEvent( &xevent );
@@ -5912,7 +5912,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
if ( should_clip ) {
paintRegion = paintRegion.intersect( rect() );
if ( paintRegion.isEmpty() )
- return TRUE;
+ return true;
}
TQPaintEvent e( paintRegion );
@@ -5923,7 +5923,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
TQApplication::sendSpontaneousEvent( this, &e );
qt_clear_paintevent_clipping();
clearWState( WState_InPaintEvent );
- return TRUE;
+ return true;
}
//
@@ -5932,7 +5932,7 @@ bool TQETWidget::translatePaintEvent( const XEvent *event )
bool TQETWidget::translateScrollDoneEvent( const XEvent *event )
{
- if ( !sip_list ) return FALSE;
+ if ( !sip_list ) return false;
long id = event->xclient.data.l[0];
@@ -5940,11 +5940,11 @@ bool TQETWidget::translateScrollDoneEvent( const XEvent *event )
for (TQScrollInProgress* sip = sip_list->first(); sip; sip=sip_list->next()) {
if ( sip->id == id ) {
sip_list->remove( sip_list->current() );
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
#if defined(Q_C_CALLBACKS)
@@ -6030,7 +6030,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
TQRect cr ( geometry() );
if ( newSize != cr.size() ) { // size changed
- was_resize = TRUE;
+ was_resize = true;
TQSize oldSize = size();
cr.setSize( newSize );
crect = cr;
@@ -6081,7 +6081,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
incrementSyncCounter();
- return TRUE;
+ return true;
}
@@ -6090,7 +6090,7 @@ bool TQETWidget::translateConfigEvent( const XEvent *event )
//
bool TQETWidget::translateCloseEvent( const XEvent * )
{
- return close(FALSE);
+ return close(false);
}
@@ -6188,7 +6188,7 @@ int TQApplication::wheelScrollLines()
}
/*!
- Enables the UI effect \a effect if \a enable is TRUE, otherwise
+ Enables the UI effect \a effect if \a enable is true, otherwise
the effect will not be used.
Note: All effects are disabled on screens running at less than
@@ -6200,24 +6200,24 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
{
switch (effect) {
case UI_AnimateMenu:
- if ( enable ) fade_menu = FALSE;
+ if ( enable ) fade_menu = false;
animate_menu = enable;
break;
case UI_FadeMenu:
if ( enable )
- animate_menu = TRUE;
+ animate_menu = true;
fade_menu = enable;
break;
case UI_AnimateCombo:
animate_combo = enable;
break;
case UI_AnimateTooltip:
- if ( enable ) fade_tooltip = FALSE;
+ if ( enable ) fade_tooltip = false;
animate_tooltip = enable;
break;
case UI_FadeTooltip:
if ( enable )
- animate_tooltip = TRUE;
+ animate_tooltip = true;
fade_tooltip = enable;
break;
case UI_AnimateToolBox:
@@ -6230,10 +6230,10 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
}
/*!
- Returns TRUE if \a effect is enabled; otherwise returns FALSE.
+ Returns true if \a effect is enabled; otherwise returns false.
By default, TQt will try to use the desktop settings. Call
- setDesktopSettingsAware(FALSE) to prevent this.
+ setDesktopSettingsAware(false) to prevent this.
Note: All effects are disabled on screens running at less than
16-bit color depth.
@@ -6243,7 +6243,7 @@ void TQApplication::setEffectEnabled( TQt::UIEffect effect, bool enable )
bool TQApplication::isEffectEnabled( TQt::UIEffect effect )
{
if ( TQColor::numBitPlanes() < 16 || !animate_ui )
- return FALSE;
+ return false;
switch( effect ) {
case UI_AnimateMenu:
@@ -6329,16 +6329,16 @@ static void sm_performSaveYourself( TQSessionManagerData* );
static void resetSmState()
{
-// sm_waitingForPhase2 = FALSE; ### never used?!?
- sm_waitingForInteraction = FALSE;
- sm_interactionActive = FALSE;
+// sm_waitingForPhase2 = false; ### never used?!?
+ sm_waitingForInteraction = false;
+ sm_interactionActive = false;
sm_interactStyle = SmInteractStyleNone;
- sm_smActive = FALSE;
- sm_blockUserInput = FALSE;
- sm_isshutdown = FALSE;
-// sm_shouldbefast = FALSE; ### never used?!?
- sm_phase2 = FALSE;
- sm_in_phase2 = FALSE;
+ sm_smActive = false;
+ sm_blockUserInput = false;
+ sm_isshutdown = false;
+// sm_shouldbefast = false; ### never used?!?
+ sm_phase2 = false;
+ sm_in_phase2 = false;
}
@@ -6398,8 +6398,8 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
{
if (smcConn != smcConnection )
return;
- sm_cancel = FALSE;
- sm_smActive = TRUE;
+ sm_cancel = false;
+ sm_smActive = true;
sm_isshutdown = shutdown;
sm_saveType = saveType;
sm_interactStyle = interactStyle;
@@ -6407,9 +6407,9 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
// ugly workaround for broken libSM. libSM should do that _before_
// actually invoking the callback in sm_process.c
- ( (QT_smcConn*)smcConn )->save_yourself_in_progress = TRUE;
+ ( (QT_smcConn*)smcConn )->save_yourself_in_progress = true;
if ( sm_isshutdown )
- ( (QT_smcConn*)smcConn )->shutdown_in_progress = TRUE;
+ ( (QT_smcConn*)smcConn )->shutdown_in_progress = true;
sm_performSaveYourself( (TQSessionManagerData*) clientData );
if ( !sm_isshutdown ) // we cannot expect a confirmation message in that case
@@ -6419,7 +6419,7 @@ static void sm_saveYourselfCallback( SmcConn smcConn, SmPointer clientData,
static void sm_performSaveYourself( TQSessionManagerData* smd )
{
if ( sm_isshutdown )
- sm_blockUserInput = TRUE;
+ sm_blockUserInput = true;
TQSessionManager* sm = smd->sm;
@@ -6462,7 +6462,7 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
if ( sm_phase2 && !sm_in_phase2 ) {
SmcRequestSaveYourselfPhase2( smcConnection, sm_saveYourselfPhase2Callback, (SmPointer*) smd );
- sm_blockUserInput = FALSE;
+ sm_blockUserInput = false;
}
else {
// close eventual interaction monitors and cancel the
@@ -6470,12 +6470,12 @@ static void sm_performSaveYourself( TQSessionManagerData* smd )
// performing a shutdown, it does not work for checkpoints
if ( sm_interactionActive ) {
SmcInteractDone( smcConnection, sm_isshutdown && sm_cancel);
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
}
else if ( sm_cancel && sm_isshutdown ) {
if ( sm->allowsErrorInteraction() ) {
SmcInteractDone( smcConnection, True );
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
}
}
@@ -6532,7 +6532,7 @@ static void sm_saveYourselfPhase2Callback( SmcConn smcConn, SmPointer clientData
{
if (smcConn != smcConnection )
return;
- sm_in_phase2 = TRUE;
+ sm_in_phase2 = true;
sm_performSaveYourself( (TQSessionManagerData*) clientData );
}
@@ -6623,10 +6623,10 @@ void* TQSessionManager::handle() const
bool TQSessionManager::allowsInteraction()
{
if ( sm_interactionActive )
- return TRUE;
+ return true;
if ( sm_waitingForInteraction )
- return FALSE;
+ return false;
if ( sm_interactStyle == SmInteractStyleAny ) {
sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogNormal,
@@ -6634,23 +6634,23 @@ bool TQSessionManager::allowsInteraction()
}
if ( sm_waitingForInteraction ) {
tqApp->enter_loop();
- sm_waitingForInteraction = FALSE;
+ sm_waitingForInteraction = false;
if ( sm_smActive ) { // not cancelled
- sm_interactionActive = TRUE;
- sm_blockUserInput = FALSE;
- return TRUE;
+ sm_interactionActive = true;
+ sm_blockUserInput = false;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool TQSessionManager::allowsErrorInteraction()
{
if ( sm_interactionActive )
- return TRUE;
+ return true;
if ( sm_waitingForInteraction )
- return FALSE;
+ return false;
if ( sm_interactStyle == SmInteractStyleAny || sm_interactStyle == SmInteractStyleErrors ) {
sm_waitingForInteraction = SmcInteractRequest( smcConnection, SmDialogError,
@@ -6658,29 +6658,29 @@ bool TQSessionManager::allowsErrorInteraction()
}
if ( sm_waitingForInteraction ) {
tqApp->enter_loop();
- sm_waitingForInteraction = FALSE;
+ sm_waitingForInteraction = false;
if ( sm_smActive ) { // not cancelled
- sm_interactionActive = TRUE;
- sm_blockUserInput = FALSE;
- return TRUE;
+ sm_interactionActive = true;
+ sm_blockUserInput = false;
+ return true;
}
}
- return FALSE;
+ return false;
}
void TQSessionManager::release()
{
if ( sm_interactionActive ) {
SmcInteractDone( smcConnection, False );
- sm_interactionActive = FALSE;
+ sm_interactionActive = false;
if ( sm_smActive && sm_isshutdown )
- sm_blockUserInput = TRUE;
+ sm_blockUserInput = true;
}
}
void TQSessionManager::cancel()
{
- sm_cancel = TRUE;
+ sm_cancel = true;
}
void TQSessionManager::setRestartHint( TQSessionManager::RestartHint hint)
@@ -6741,7 +6741,7 @@ bool TQSessionManager::isPhase2() const
void TQSessionManager::requestPhase2()
{
- sm_phase2 = TRUE;
+ sm_phase2 = true;
}
diff --git a/src/kernel/tqasyncimageio.cpp b/src/kernel/tqasyncimageio.cpp
index f4a144c1b..f27e59ee0 100644
--- a/src/kernel/tqasyncimageio.cpp
+++ b/src/kernel/tqasyncimageio.cpp
@@ -368,13 +368,13 @@ TQImageDecoder::~TQImageDecoder()
Returns the image currently being decoded.
*/
-static bool plugins_loaded = FALSE;
+static bool plugins_loaded = false;
/*!
Call this function to decode some data into image changes. The
data in \a buffer will be decoded, sending change information to
the TQImageConsumer of this TQImageDecoder until one of the change
- functions of the consumer returns FALSE. The length of the data is
+ functions of the consumer returns false. The length of the data is
given in \a length.
Returns the number of bytes consumed: 0 if consumption is
@@ -398,7 +398,7 @@ int TQImageDecoder::decode(const uchar* buffer, int length)
}
if ( !actual_decoder && !plugins_loaded) {
tqt_init_image_plugins();
- plugins_loaded = TRUE;
+ plugins_loaded = true;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f && !actual_decoder;
@@ -468,7 +468,7 @@ const char* TQImageDecoder::formatName(const uchar* buffer, int length)
}
if ( !name && !plugins_loaded) {
tqt_init_image_plugins();
- plugins_loaded = TRUE;
+ plugins_loaded = true;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f && !name;
f = TQImageDecoderPrivate::factories->next())
@@ -647,8 +647,8 @@ TQImageFormatType::~TQImageFormatType()
/*!
- Returns TRUE if TQt was compiled with built-in GIF reading support;
- otherwise returns FALSE.
+ Returns true if TQt was compiled with built-in GIF reading support;
+ otherwise returns false.
*/
bool qt_builtin_gif_reader()
{
@@ -683,12 +683,12 @@ TQGIFFormat::TQGIFFormat()
lncols = 0;
gncols = 0;
disposal = NoDisposal;
- out_of_bounds = FALSE;
- disposed = TRUE;
+ out_of_bounds = false;
+ disposed = true;
frame = -1;
state = Header;
count = 0;
- lcmap = FALSE;
+ lcmap = false;
}
/*!
@@ -782,7 +782,7 @@ void TQGIFFormat::disposePrevious( TQImage& img, TQImageConsumer* consumer )
}
disposal = NoDisposal; // Until an extension says otherwise.
- disposed = TRUE;
+ disposed = true;
}
/*!
@@ -799,7 +799,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
// CompuServe Incorporated."
#define LM(l, m) (((m)<<8)|l)
- digress = FALSE;
+ digress = false;
int initial = length;
TQRgb** line = (TQRgb **)img.jumpTable();
while (!digress && length) {
@@ -878,7 +878,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
state=Done;
break;
default:
- digress=TRUE;
+ digress=true;
// Unexpected Introducer - ignore block
state=Error;
}
@@ -917,7 +917,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
line = (TQRgb **)img.jumpTable();
disposePrevious( img, consumer );
- disposed = FALSE;
+ disposed = false;
left = newleft;
top = newtop;
@@ -991,7 +991,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
bitcount = 0;
sp = stack;
firstcode = oldcode = 0;
- needfirst = FALSE;
+ needfirst = false;
out_of_bounds = left>=swidth || y>=sheight;
}
break;
@@ -1024,7 +1024,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
} else {
if (consumer) {
consumer->frameDone();
- digress = TRUE;
+ digress = true;
}
state=Introducer;
@@ -1053,7 +1053,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
table[0][i]=table[1][i]=0;
}
}
- needfirst=TRUE;
+ needfirst=true;
} else if (code==end_code) {
bitcount = -32768;
// Left the block end arrive
@@ -1063,8 +1063,8 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (!out_of_bounds && line && firstcode!=trans_index)
line[y][x] = color(firstcode);
x++;
- if (x>=swidth) out_of_bounds = TRUE;
- needfirst=FALSE;
+ if (x>=swidth) out_of_bounds = true;
+ needfirst=false;
if (x>=left+width) {
x=left;
out_of_bounds = left>=swidth || y>=sheight;
@@ -1107,7 +1107,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (!out_of_bounds && line && *sp!=trans_index)
line[y][x] = color(*sp);
x++;
- if (x>=swidth) out_of_bounds = TRUE;
+ if (x>=swidth) out_of_bounds = true;
if (x>=left+width) {
x=left;
out_of_bounds = left>=swidth || y>=sheight;
@@ -1202,7 +1202,7 @@ int TQGIFFormat::decode(TQImage& img, TQImageConsumer* consumer,
if (count==expectcount) state=SkipBlockSize;
break;
case Done:
- digress=TRUE;
+ digress=true;
/* Netscape ignores the junk, so we do too.
length++; // Unget
state=Error; // More calls to this is an error
@@ -1301,7 +1301,7 @@ void TQGIFFormat::nextY(TQImage& img, TQImageConsumer* consumer)
}
// Consume bogus extra lines
- if (y >= sheight) out_of_bounds=TRUE; //y=bottom;
+ if (y >= sheight) out_of_bounds=true; //y=bottom;
}
TQRgb TQGIFFormat::color( uchar index ) const
diff --git a/src/kernel/tqasyncio.cpp b/src/kernel/tqasyncio.cpp
index c8fe10ce4..aa3fff18a 100644
--- a/src/kernel/tqasyncio.cpp
+++ b/src/kernel/tqasyncio.cpp
@@ -173,25 +173,25 @@ void TQDataSource::maybeReady()
*/
/*!
- This function should return TRUE if the data source can be rewound.
+ This function should return true if the data source can be rewound.
- The default returns FALSE.
+ The default returns false.
*/
bool TQDataSource::rewindable() const
{
- return FALSE;
+ return false;
}
/*!
- If this function is called with \a on set to TRUE, and rewindable()
- is TRUE, then the data source must take measures to allow the rewind()
- function to subsequently operate as described. If rewindable() is FALSE,
+ If this function is called with \a on set to true, and rewindable()
+ is true, then the data source must take measures to allow the rewind()
+ function to subsequently operate as described. If rewindable() is false,
the function should call TQDataSource::enableRewind(), which aborts with
a tqFatal() error.
For example, a network connection may choose to use a disk cache
of input only if rewinding is enabled before the first buffer-full of
- data is discarded, returning FALSE in rewindable() if that first buffer
+ data is discarded, returning false in rewindable() if that first buffer
is discarded.
*/
void TQDataSource::enableRewind( bool /* on */ )
@@ -201,7 +201,7 @@ void TQDataSource::enableRewind( bool /* on */ )
/*!
This function rewinds the data source. This may only be called if
- enableRewind(TRUE) has been previously called.
+ enableRewind(true) has been previously called.
*/
void TQDataSource::rewind()
{
@@ -228,7 +228,7 @@ TQIODeviceSource::TQIODeviceSource(TQIODevice* device, int buffer_size) :
buf_size(buffer_size),
buffer(new uchar[buf_size]),
iod(device),
- rew(FALSE)
+ rew(false)
{
}
@@ -269,13 +269,13 @@ void TQIODeviceSource::sendTo(TQDataSink* sink, int n)
*/
bool TQIODeviceSource::rewindable() const
{
- return TRUE;
+ return true;
}
/*!
- If \a on is set to TRUE then rewinding is enabled.
+ If \a on is set to true then rewinding is enabled.
No special action is taken. If \a on is set to
- FALSE then rewinding is disabled.
+ false then rewinding is disabled.
*/
void TQIODeviceSource::enableRewind(bool on)
{
@@ -323,14 +323,14 @@ TQDataPump::TQDataPump(TQDataSource* data_source, TQDataSink* data_sink) :
source->connect(this, TQ_SLOT(kickStart()));
sink->connect(this, TQ_SLOT(kickStart()));
connect(&timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(tryToPump()));
- timer.start(0, TRUE);
+ timer.start(0, true);
}
void TQDataPump::kickStart()
{
if (!timer.isActive()) {
interval = 0;
- timer.start(0, TRUE);
+ timer.start(0, true);
}
}
@@ -353,7 +353,7 @@ void TQDataPump::tryToPump()
return;
source->sendTo(sink, TQMIN(supply, demand));
- timer.start(0, TRUE);
+ timer.start(0, true);
}
#endif // TQT_NO_ASYNC_IO
diff --git a/src/kernel/tqbitmap.cpp b/src/kernel/tqbitmap.cpp
index c23116d0e..0417844f1 100644
--- a/src/kernel/tqbitmap.cpp
+++ b/src/kernel/tqbitmap.cpp
@@ -88,14 +88,14 @@
TQBitmap::TQBitmap()
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
/*!
Constructs a bitmap with width \a w and height \a h.
- The contents of the bitmap is uninitialized if \a clear is FALSE;
+ The contents of the bitmap is uninitialized if \a clear is false;
otherwise it is filled with pixel value 0 (the TQColor \c
TQt::color0).
@@ -111,7 +111,7 @@ TQBitmap::TQBitmap( int w, int h, bool clear,
TQPixmap::Optimization optimization )
: TQPixmap( w, h, 1, optimization )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
if ( clear )
fill( TQt::color0 );
}
@@ -122,7 +122,7 @@ TQBitmap::TQBitmap( int w, int h, bool clear,
Constructs a bitmap with the size \a size.
- The contents of the bitmap is uninitialized if \a clear is FALSE;
+ The contents of the bitmap is uninitialized if \a clear is false;
otherwise it is filled with pixel value 0 (the TQColor \c
TQt::color0).
@@ -136,7 +136,7 @@ TQBitmap::TQBitmap( const TQSize &size, bool clear,
TQPixmap::Optimization optimization )
: TQPixmap( size, 1, optimization )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
if ( clear )
fill( TQt::color0 );
}
@@ -146,21 +146,21 @@ TQBitmap::TQBitmap( const TQSize &size, bool clear,
Constructs a bitmap with width \a w and height \a h and sets the
contents to \a bits.
- The \a isXbitmap flag should be TRUE if \a bits was generated by
+ The \a isXbitmap flag should be true if \a bits was generated by
the X11 bitmap program. The X bitmap bit order is little endian.
The TQImage documentation discusses bit order of monochrome images.
Example (creates an arrow bitmap):
\code
uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };
- TQBitmap bm( 8, 8, arrow_bits, TRUE );
+ TQBitmap bm( 8, 8, arrow_bits, true );
\endcode
*/
TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
: TQPixmap( w, h, bits, isXbitmap )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
@@ -170,7 +170,7 @@ TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
Constructs a bitmap with the size \a size and sets the contents to
\a bits.
- The \a isXbitmap flag should be TRUE if \a bits was generated by
+ The \a isXbitmap flag should be true if \a bits was generated by
the X11 bitmap program. The X bitmap bit order is little endian.
The TQImage documentation discusses bit order of monochrome images.
*/
@@ -178,7 +178,7 @@ TQBitmap::TQBitmap( int w, int h, const uchar *bits, bool isXbitmap )
TQBitmap::TQBitmap( const TQSize &size, const uchar *bits, bool isXbitmap )
: TQPixmap( size.width(), size.height(), bits, isXbitmap )
{
- data->bitmap = TRUE;
+ data->bitmap = true;
}
@@ -208,7 +208,7 @@ TQBitmap::TQBitmap( const TQBitmap &bitmap )
TQBitmap::TQBitmap( const TQString& fileName, const char *format )
: TQPixmap() // Will set bitmap to null bitmap, explicit call for clarity
{
- data->bitmap = TRUE;
+ data->bitmap = true;
load( fileName, format, Mono );
}
#endif
@@ -241,13 +241,13 @@ TQBitmap &TQBitmap::operator=( const TQBitmap &bitmap )
TQBitmap &TQBitmap::operator=( const TQPixmap &pixmap )
{
if ( pixmap.isNull() ) { // a null pixmap
- TQBitmap bm( 0, 0, FALSE, pixmap.optimization() );
+ TQBitmap bm( 0, 0, false, pixmap.optimization() );
TQBitmap::operator=(bm);
} else if ( pixmap.depth() == 1 ) { // 1-bit pixmap
if ( pixmap.isTQBitmap() ) { // another TQBitmap
TQPixmap::operator=(pixmap); // shallow assignment
} else { // not a TQBitmap, but 1-bit
- TQBitmap bm( pixmap.size(), FALSE, pixmap.optimization() );
+ TQBitmap bm( pixmap.size(), false, pixmap.optimization() );
bitBlt( &bm, 0,0, &pixmap, 0,0,pixmap.width(),pixmap.height() );
TQBitmap::operator=(bm);
}
@@ -294,7 +294,7 @@ TQBitmap TQBitmap::xForm( const TQWMatrix &matrix ) const
// Here we fake the pixmap to think it's a TQBitmap. With this trick,
// the TQBitmap::operator=(const TQPixmap&) will just refer the
// pm.data and we do not need to perform a bitBlt.
- pm.data->bitmap = TRUE;
+ pm.data->bitmap = true;
bm = pm;
return bm;
}
diff --git a/src/kernel/tqbitmap.h b/src/kernel/tqbitmap.h
index c74f37241..6d862bfaf 100644
--- a/src/kernel/tqbitmap.h
+++ b/src/kernel/tqbitmap.h
@@ -50,12 +50,12 @@ class TQ_EXPORT TQBitmap : public TQPixmap
{
public:
TQBitmap();
- TQBitmap( int w, int h, bool clear = FALSE,
+ TQBitmap( int w, int h, bool clear = false,
TQPixmap::Optimization = TQPixmap::DefaultOptim );
- TQBitmap( const TQSize &, bool clear = FALSE,
+ TQBitmap( const TQSize &, bool clear = false,
TQPixmap::Optimization = TQPixmap::DefaultOptim );
- TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=FALSE );
- TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=FALSE );
+ TQBitmap( int w, int h, const uchar *bits, bool isXbitmap=false );
+ TQBitmap( const TQSize &, const uchar *bits, bool isXbitmap=false );
TQBitmap( const TQBitmap & );
#ifndef TQT_NO_IMAGEIO
TQBitmap( const TQString &fileName, const char *format=0 );
diff --git a/src/kernel/tqclipboard.cpp b/src/kernel/tqclipboard.cpp
index ee476a1a5..bff4c96ec 100644
--- a/src/kernel/tqclipboard.cpp
+++ b/src/kernel/tqclipboard.cpp
@@ -243,7 +243,7 @@ TQString TQClipboard::text( TQCString &subtype, Mode mode ) const
TQClipboard::text() function which takes a TQClipboard::Mode
argument. The value of the mode argument is determined by the
return value of selectionModeEnabled(). If selectionModeEnabled()
- returns TRUE, the mode argument is TQClipboard::Selection,
+ returns true, the mode argument is TQClipboard::Selection,
otherwise the mode argument is TQClipboard::Clipboard.
*/
// ### remove 4.0
@@ -276,7 +276,7 @@ TQString TQClipboard::text( Mode mode ) const
This function uses the TQClipboard::text() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -309,7 +309,7 @@ void TQClipboard::setText( const TQString &text, Mode mode )
This function uses the TQClipboard::setText() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -345,7 +345,7 @@ TQImage TQClipboard::image( Mode mode ) const
This function uses the TQClipboard::image() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -382,7 +382,7 @@ void TQClipboard::setImage( const TQImage &image, Mode mode )
This function uses the TQClipboard::setImage() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -420,7 +420,7 @@ TQPixmap TQClipboard::pixmap( Mode mode ) const
This function uses the TQClipboard::pixmap() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -455,7 +455,7 @@ void TQClipboard::setPixmap( const TQPixmap &pixmap, Mode mode )
This function uses the TQClipboard::setPixmap() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -485,7 +485,7 @@ void TQClipboard::setPixmap( const TQPixmap &pixmap )
This function uses the TQClipboard::data() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -525,7 +525,7 @@ TQMimeSource *TQClipboard::data() const
This function uses the TQClipboard::setData() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is
TQClipboard::Clipboard.
*/
@@ -553,7 +553,7 @@ void TQClipboard::setData( TQMimeSource *src )
This function uses the TQClipboard::clear() function which takes
a TQClipboard::Mode argument. The value of the mode argument is
determined by the return value of selectionModeEnabled().
- If selectionModeEnabled() returns TRUE, the mode argument is
+ If selectionModeEnabled() returns true, the mode argument is
TQClipboard::Selection, otherwise the mode argument is TQClipboard::Clipboard.
*/
// ### remove 4.0
diff --git a/src/kernel/tqclipboard_x11.cpp b/src/kernel/tqclipboard_x11.cpp
index 685837650..3ab6ec5f0 100644
--- a/src/kernel/tqclipboard_x11.cpp
+++ b/src/kernel/tqclipboard_x11.cpp
@@ -44,13 +44,13 @@
#ifdef TQCLIPBOARD_DEBUG
# define TQDEBUG tqDebug
#else
-# define TQDEBUG if (FALSE) tqDebug
+# define TQDEBUG if (false) tqDebug
#endif
#ifdef TQCLIPBOARD_DEBUG_VERBOSE
# define VTQDEBUG tqDebug
#else
-# define VTQDEBUG if (FALSE) tqDebug
+# define VTQDEBUG if (false) tqDebug
#endif
#include "qplatformdefs.h"
@@ -104,19 +104,19 @@ static int clipboard_timeout = 5000; // 5s timeout on clipboard operations
static TQWidget * owner = 0;
static TQWidget *requestor = 0;
-static bool inSelectionMode_obsolete = FALSE; // ### remove 4.0
-static bool timer_event_clear = FALSE;
+static bool inSelectionMode_obsolete = false; // ### remove 4.0
+static bool timer_event_clear = false;
static int timer_id = 0;
static int pending_timer_id = 0;
-static bool pending_clipboard_changed = FALSE;
-static bool pending_selection_changed = FALSE;
+static bool pending_clipboard_changed = false;
+static bool pending_selection_changed = false;
TQ_EXPORT bool tqt_qclipboard_bailout_hack = false;
// event capture mechanism for qt_xclb_wait_for_event
-static bool waiting_for_data = FALSE;
-static bool has_captured_event = FALSE;
+static bool waiting_for_data = false;
+static bool has_captured_event = false;
static Window capture_event_win = None;
static int capture_event_type = -1;
static XEvent captured_event;
@@ -179,7 +179,7 @@ public:
void setSource(TQMimeSource* s)
{
- clear(TRUE);
+ clear(true);
src = s;
}
@@ -197,7 +197,7 @@ public:
transferred[1] = TQPixmap();
}
- void clear(bool destruct=TRUE);
+ void clear(bool destruct=true);
TQMimeSource *src;
Time timestamp;
@@ -247,7 +247,7 @@ static TQClipboardData *clipboardData()
void tqt_clipboard_cleanup_mime_source(TQMimeSource *src)
{
if(internalCbData && internalCbData->source() == src)
- internalCbData->clear(FALSE);
+ internalCbData->clear(false);
}
static void cleanupSelectionData()
@@ -391,23 +391,23 @@ void TQClipboard::clear( Mode mode )
/*!
- Returns TRUE if the clipboard supports mouse selection; otherwise
- returns FALSE.
+ Returns true if the clipboard supports mouse selection; otherwise
+ returns false.
*/
bool TQClipboard::supportsSelection() const
-{ return TRUE; }
+{ return true; }
/*!
- Returns TRUE if this clipboard object owns the mouse selection
- data; otherwise returns FALSE.
+ Returns true if this clipboard object owns the mouse selection
+ data; otherwise returns false.
*/
bool TQClipboard::ownsSelection() const
{ return selectionData()->timestamp != CurrentTime; }
/*!
- Returns TRUE if this clipboard object owns the clipboard data;
- otherwise returns FALSE.
+ Returns true if this clipboard object owns the clipboard data;
+ otherwise returns false.
*/
bool TQClipboard::ownsClipboard() const
{ return clipboardData()->timestamp != CurrentTime; }
@@ -418,7 +418,7 @@ bool TQClipboard::ownsClipboard() const
Use the TQClipboard::data(), TQClipboard::setData() and related functions
which take a TQClipboard::Mode argument.
- Sets the clipboard selection mode. If \a enable is TRUE, then
+ Sets the clipboard selection mode. If \a enable is true, then
subsequent calls to TQClipboard::setData() and other functions
which put data into the clipboard will put the data into the mouse
selection, otherwise the data will be put into the clipboard.
@@ -449,7 +449,7 @@ static int qt_xclb_event_filter(XEvent *event)
if (event->xany.type == capture_event_type &&
event->xany.window == capture_event_win) {
VTQDEBUG( "TQClipboard: event_filter(): caught event type %d", event->type );
- has_captured_event = TRUE;
+ has_captured_event = true;
captured_event = *event;
return 1;
}
@@ -484,8 +484,8 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if ( waiting_for_data )
tqFatal( "TQClipboard: internal error, qt_xclb_wait_for_event recursed" );
- waiting_for_data = TRUE;
- has_captured_event = FALSE;
+ waiting_for_data = true;
+ has_captured_event = false;
capture_event_win = win;
capture_event_type = type;
@@ -493,9 +493,9 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) ) {
- waiting_for_data = FALSE;
+ waiting_for_data = false;
tqt_set_x11_event_filter(old_event_filter);
- return TRUE;
+ return true;
}
now = TQTime::currentTime();
@@ -508,30 +508,30 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
TQEventLoop::ExcludeTimers);
if ( has_captured_event ) {
- waiting_for_data = FALSE;
+ waiting_for_data = false;
*event = captured_event;
tqt_set_x11_event_filter(old_event_filter);
- return TRUE;
+ return true;
}
} while ( started.msecsTo(now) < timeout );
- waiting_for_data = FALSE;
+ waiting_for_data = false;
tqt_set_x11_event_filter(old_event_filter);
- return FALSE;
+ return false;
}
- bool flushed = FALSE;
+ bool flushed = false;
do {
if ( XCheckTypedWindowEvent(dpy,win,type,event) )
- return TRUE;
+ return true;
if( tqt_qclipboard_bailout_hack ) {
XEvent dummy;
selection_request_pending = false;
if ( owner != NULL )
XCheckIfEvent(dpy,&dummy,check_selection_request_pending,NULL);
if( selection_request_pending )
- return TRUE;
+ return true;
}
// process other clipboard events, since someone is probably requesting data from us
@@ -545,7 +545,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
if(!flushed) {
XFlush( dpy );
- flushed = TRUE;
+ flushed = true;
}
// sleep 50ms, so we don't use up CPU cycles all the time.
@@ -555,7 +555,7 @@ bool qt_xclb_wait_for_event( Display *dpy, Window win, int type, XEvent *event,
select(0, 0, 0, 0, &usleep_tv);
} while ( started.msecsTo(now) < timeout );
- return FALSE;
+ return false;
}
@@ -588,7 +588,7 @@ bool qt_xclb_read_property( Display *dpy, Window win, Atom property,
&length, &bytes_left, &data );
if (r != Success || (type && *type == None)) {
buffer->resize( 0 );
- return FALSE;
+ return false;
}
XFree( (char*)data );
@@ -699,7 +699,7 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
TQByteArray buf;
TQByteArray tmp_buf;
- bool alloc_error = FALSE;
+ bool alloc_error = false;
int length;
int offset = 0;
@@ -717,8 +717,8 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
if ( event.xproperty.atom != property ||
event.xproperty.state != PropertyNewValue )
continue;
- if ( qt_xclb_read_property(dpy, win, property, TRUE, &tmp_buf,
- &length,0, 0, FALSE) ) {
+ if ( qt_xclb_read_property(dpy, win, property, true, &tmp_buf,
+ &length,0, 0, false) ) {
if ( length == 0 ) { // no more data, we're done
if ( nullterm ) {
buf.resize( offset+1 );
@@ -730,7 +730,7 @@ TQByteArray qt_xclb_read_incremental_property( Display *dpy, Window win,
} else if ( !alloc_error ) {
if ( offset+length > (int)buf.size() ) {
if ( !buf.resize(offset+length+65535) ) {
- alloc_error = TRUE;
+ alloc_error = true;
length = buf.size() - offset;
}
}
@@ -966,44 +966,44 @@ bool TQClipboard::event( TQEvent *e )
TQTimerEvent *te = (TQTimerEvent *) e;
if ( waiting_for_data ) // should never happen
- return FALSE;
+ return false;
if (te->timerId() == timer_id) {
killTimer(timer_id);
timer_id = 0;
- timer_event_clear = TRUE;
+ timer_event_clear = true;
if ( selection_watcher ) // clear selection
selectionData()->clear();
if ( clipboard_watcher ) // clear clipboard
clipboardData()->clear();
- timer_event_clear = FALSE;
+ timer_event_clear = false;
- return TRUE;
+ return true;
} else if ( te->timerId() == pending_timer_id ) {
// I hate klipper
killTimer( pending_timer_id );
pending_timer_id = 0;
if ( pending_clipboard_changed ) {
- pending_clipboard_changed = FALSE;
+ pending_clipboard_changed = false;
clipboardData()->clear();
emit dataChanged();
}
if ( pending_selection_changed ) {
- pending_selection_changed = FALSE;
+ pending_selection_changed = false;
selectionData()->clear();
emit selectionChanged();
}
- return TRUE;
+ return true;
} else if (te->timerId() == incr_timer_id) {
killTimer(incr_timer_id);
incr_timer_id = 0;
qt_xclb_incr_timeout();
- return TRUE;
+ return true;
} else {
return TQObject::event( e );
}
@@ -1015,7 +1015,7 @@ bool TQClipboard::event( TQEvent *e )
Display *dpy = TQPaintDevice::x11AppDisplay();
if ( !xevent )
- return TRUE;
+ return true;
switch ( xevent->type ) {
@@ -1036,7 +1036,7 @@ bool TQClipboard::event( TQEvent *e )
d->clear();
emit selectionChanged();
} else {
- pending_selection_changed = TRUE;
+ pending_selection_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
}
@@ -1055,7 +1055,7 @@ bool TQClipboard::event( TQEvent *e )
d->clear();
emit dataChanged();
} else {
- pending_clipboard_changed = TRUE;
+ pending_clipboard_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
}
@@ -1063,7 +1063,7 @@ bool TQClipboard::event( TQEvent *e )
#ifdef QT_CHECK_STATE
tqWarning("TQClipboard: Unknown SelectionClear event received.");
#endif
- return FALSE;
+ return false;
}
break;
@@ -1147,13 +1147,13 @@ bool TQClipboard::event( TQEvent *e )
int multi_format = 0;
int nmulti = 0;
int imulti = -1;
- bool multi_writeback = FALSE;
+ bool multi_writeback = false;
if ( req->target == xa_multiple ) {
TQByteArray multi_data;
if (req->property == None
|| !qt_xclb_read_property(dpy, req->requestor, req->property,
- FALSE, &multi_data, 0, &multi_type, &multi_format, 0)
+ false, &multi_data, 0, &multi_type, &multi_format, 0)
|| multi_format != 32) {
// MULTIPLE property not formatted correctly
XSendEvent(dpy, req->requestor, False, NoEventMask, &event);
@@ -1210,7 +1210,7 @@ bool TQClipboard::event( TQEvent *e )
if (nmulti > 0) {
if (ret == None) {
multi[imulti].property = None;
- multi_writeback = TRUE;
+ multi_writeback = true;
}
} else {
event.xselection.property = ret;
@@ -1241,7 +1241,7 @@ bool TQClipboard::event( TQEvent *e )
break;
}
- return TRUE;
+ return true;
}
@@ -1286,7 +1286,7 @@ bool TQClipboardWatcher::empty() const
#ifdef QT_CHECK_STATE
if( win == requestor->winId()) {
tqWarning( "TQClipboardWatcher::empty: internal error, app owns the selection" );
- return TRUE;
+ return true;
}
#endif // QT_CHECK_STATE
@@ -1432,7 +1432,7 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
XDeleteProperty(dpy, win, qt_selection_property);
XConvertSelection(dpy, atom, fmtatom, qt_selection_property, win, tqt_x_time);
- XSync(dpy, FALSE);
+ XSync(dpy, false);
VTQDEBUG("TQClipboardWatcher::getDataInFormat: waiting for SelectionNotify event");
@@ -1448,13 +1448,13 @@ TQByteArray TQClipboardWatcher::getDataInFormat(Atom fmtatom) const
Atom type;
XSelectInput(dpy, win, PropertyChangeMask);
- if ( qt_xclb_read_property(dpy,win,qt_selection_property,TRUE,
- &buf,0,&type,0,FALSE) ) {
+ if ( qt_xclb_read_property(dpy,win,qt_selection_property,true,
+ &buf,0,&type,0,false) ) {
if ( type == qt_x_incr ) {
int nbytes = buf.size() >= 4 ? *((int*)buf.data()) : 0;
buf = qt_xclb_read_incremental_property( dpy, win,
qt_selection_property,
- nbytes, FALSE );
+ nbytes, false );
}
}
@@ -1577,13 +1577,13 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
/*
Called by the main event loop in tqapplication_x11.cpp when the
_QT_SELECTION_SENTINEL property has been changed (i.e. when some TQt
- process has performed TQClipboard::setData(). If it returns TRUE, the
+ process has performed TQClipboard::setData(). If it returns true, the
TQClipBoard dataChanged() signal should be emitted.
*/
bool qt_check_selection_sentinel()
{
- bool doIt = TRUE;
+ bool doIt = true;
if ( owner ) {
/*
Since the X selection mechanism cannot give any signal when
@@ -1610,7 +1610,7 @@ bool qt_check_selection_sentinel()
if ( actualType == XA_WINDOW && actualFormat == 32 && nitems == 2 ) {
Window win = owner->winId();
if ( owners[0] == win || owners[1] == win )
- doIt = FALSE;
+ doIt = false;
}
XFree( owners );
@@ -1619,10 +1619,10 @@ bool qt_check_selection_sentinel()
if (doIt) {
if ( waiting_for_data ) {
- pending_selection_changed = TRUE;
+ pending_selection_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
- doIt = FALSE;
+ doIt = false;
} else {
selectionData()->clear();
}
@@ -1634,7 +1634,7 @@ bool qt_check_selection_sentinel()
bool qt_check_clipboard_sentinel()
{
- bool doIt = TRUE;
+ bool doIt = true;
if (owner) {
Window *owners;
Atom actualType;
@@ -1649,7 +1649,7 @@ bool qt_check_clipboard_sentinel()
if (actualType == XA_WINDOW && actualFormat == 32 && nitems == 2) {
Window win = owner->winId();
if (owners[0] == win || owners[1] == win)
- doIt = FALSE;
+ doIt = false;
}
XFree(owners);
@@ -1658,10 +1658,10 @@ bool qt_check_clipboard_sentinel()
if (doIt) {
if ( waiting_for_data ) {
- pending_clipboard_changed = TRUE;
+ pending_clipboard_changed = true;
if ( ! pending_timer_id )
pending_timer_id = TQApplication::clipboard()->startTimer( 0 );
- doIt = FALSE;
+ doIt = false;
} else {
clipboardData()->clear();
}
diff --git a/src/kernel/tqcolor.cpp b/src/kernel/tqcolor.cpp
index 142fb408a..ffb0f8fe5 100644
--- a/src/kernel/tqcolor.cpp
+++ b/src/kernel/tqcolor.cpp
@@ -224,8 +224,8 @@ const TQColor & TQt::darkYellow = stdcol[18];
TQColor member functions
*****************************************************************************/
-bool TQColor::color_init = FALSE; // color system not initialized
-bool TQColor::globals_init = FALSE; // global color not initialized
+bool TQColor::color_init = false; // color system not initialized
+bool TQColor::globals_init = false; // global color not initialized
TQColor::ColorModel TQColor::colormodel = d32;
@@ -253,7 +253,7 @@ TQColor* TQColor::globalColors()
void TQColor::initGlobalColors()
{
- globals_init = TRUE;
+ globals_init = true;
#ifdef TQ_WS_X11
// HACK: we need a way to recognize color0 and color1 uniquely, so
@@ -361,9 +361,9 @@ void TQColor::setPixel( uint pixel )
{
switch ( colormodel ) {
case d8:
- d.d8.direct = TRUE;
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.direct = true;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pixel;
break;
case d32:
@@ -461,8 +461,8 @@ TQColor &TQColor::operator=( const TQColor &c )
/*!
\fn bool TQColor::isValid() const
- Returns FALSE if the color is invalid, i.e. it was constructed using the
- default constructor; otherwise returns TRUE.
+ Returns false if the color is invalid, i.e. it was constructed using the
+ default constructor; otherwise returns true.
*/
/*!
@@ -533,7 +533,7 @@ void TQColor::setNamedColor( const TQString &name )
if ( name.isEmpty() ) {
d.argb = 0;
if ( colormodel == d8 ) {
- d.d8.invalid = TRUE;
+ d.d8.invalid = true;
} else {
d.d32.argb = Invalid;
}
@@ -751,9 +751,9 @@ void TQColor::setRgb( int r, int g, int b )
}
d.argb = tqRgb( r, g, b );
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.direct = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.direct = false;
+ d.d8.dirty = true;
} else {
d.d32.pix = Dirt;
}
@@ -773,9 +773,9 @@ void TQColor::setRgb( TQRgb rgb )
{
d.argb = rgb;
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.direct = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.direct = false;
+ d.d8.dirty = true;
} else {
d.d32.pix = Dirt;
}
@@ -876,14 +876,14 @@ TQColor TQColor::dark( int factor ) const
/*!
\fn bool TQColor::operator==( const TQColor &c ) const
- Returns TRUE if this color has the same RGB value as \a c;
- otherwise returns FALSE.
+ Returns true if this color has the same RGB value as \a c;
+ otherwise returns false.
*/
/*!
\fn bool TQColor::operator!=( const TQColor &c ) const
- Returns TRUE if this color has a different RGB value from \a c;
- otherwise returns FALSE.
+ Returns true if this color has a different RGB value from \a c;
+ otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqcolor_p.cpp b/src/kernel/tqcolor_p.cpp
index 5db0e21be..3d29be385 100644
--- a/src/kernel/tqcolor_p.cpp
+++ b/src/kernel/tqcolor_p.cpp
@@ -749,9 +749,9 @@ bool qt_get_named_rgb( const char *name, TQRgb* rgb )
free(name_no_space);
if ( r ) {
*rgb = r->value;
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -776,7 +776,7 @@ TQStringList TQColor::colorNames()
bool qt_get_named_rgb( const char *, TQRgb* )
{
- return FALSE;
+ return false;
}
uint qt_get_rgb_val( const char * )
diff --git a/src/kernel/tqcolor_x11.cpp b/src/kernel/tqcolor_x11.cpp
index 77f48037a..2e289cadf 100644
--- a/src/kernel/tqcolor_x11.cpp
+++ b/src/kernel/tqcolor_x11.cpp
@@ -51,9 +51,9 @@
/*****************************************************************************
The color dictionary speeds up color allocation significantly for X11.
When there are no more colors, TQColor::alloc() will set the colors_avail
- flag to FALSE and try to find the nearest color.
+ flag to false and try to find the nearest color.
NOTE: From deep within the event loop, the colors_avail flag is reset to
- TRUE (calls the function qt_reset_color_avail()), because some other
+ true (calls the function qt_reset_color_avail()), because some other
application might free its colors, thereby making them available for
this TQt application.
*****************************************************************************/
@@ -76,13 +76,13 @@ public:
TQColorScreenData()
{
colorDict = 0;
- colors_avail = TRUE;
+ colors_avail = true;
g_vis = 0;
g_carr = 0;
- g_carr_fetch = TRUE;
+ g_carr_fetch = true;
g_cells = 0;
g_our_alloc = 0;
- color_reduce = FALSE;
+ color_reduce = false;
}
TQColorDict *colorDict; // dict of allocated colors
@@ -118,8 +118,8 @@ void qt_reset_color_avail()
{
int i;
for ( i = 0; i < screencount; i++ ) {
- screendata[i]->colors_avail = TRUE;
- screendata[i]->g_carr_fetch = TRUE; // do XQueryColors if !colors_avail
+ screendata[i]->colors_avail = true;
+ screendata[i]->g_carr_fetch = true; // do XQueryColors if !colors_avail
}
}
@@ -214,7 +214,7 @@ void TQColor::initialize()
if ( color_init ) // already initialized
return;
- color_init = TRUE;
+ color_init = true;
Display *dpy = TQPaintDevice::x11AppDisplay();
int spec = TQApplication::colorSpec();
@@ -245,10 +245,10 @@ void TQColor::initialize()
TQ_CHECK_PTR( screendata[scr]->g_carr );
memset( screendata[scr]->g_carr, 0,
screendata[scr]->g_cells*sizeof(XColor) );
- screendata[scr]->g_carr_fetch = TRUE; // run XQueryColors on demand
+ screendata[scr]->g_carr_fetch = true; // run XQueryColors on demand
screendata[scr]->g_our_alloc = new bool[screendata[scr]->g_cells];
TQ_CHECK_PTR( screendata[scr]->g_our_alloc );
- memset( screendata[scr]->g_our_alloc, FALSE,
+ memset( screendata[scr]->g_our_alloc, false,
screendata[scr]->g_cells*sizeof(bool) );
XColor *xc = &screendata[scr]->g_carr[0];
for ( int i=0; i<screendata[scr]->g_cells; i++ ) {
@@ -276,7 +276,7 @@ void TQColor::initialize()
TQ_CHECK_PTR( screendata[scr]->colorDict );
if ( spec == (int)TQApplication::ManyColor ) {
- screendata[scr]->color_reduce = TRUE;
+ screendata[scr]->color_reduce = true;
switch ( qt_ncols_option ) {
case 216:
@@ -322,7 +322,7 @@ void TQColor::initialize()
}
#if 0 /* 0 == allocate colors on demand */
- setLazyAlloc( FALSE ); // allocate global colors
+ setLazyAlloc( false ); // allocate global colors
((TQColor*)(&darkGray))-> alloc();
((TQColor*)(&gray))-> alloc();
((TQColor*)(&lightGray))-> alloc();
@@ -338,7 +338,7 @@ void TQColor::initialize()
((TQColor*)(&darkCyan))-> alloc();
((TQColor*)(&darkMagenta))-> alloc();
((TQColor*)(&darkYellow))-> alloc();
- setLazyAlloc( TRUE );
+ setLazyAlloc( true );
#endif
}
@@ -353,7 +353,7 @@ void TQColor::cleanup()
{
if ( !color_init )
return;
- color_init = FALSE;
+ color_init = false;
int scr;
for ( scr = 0; scr < screencount; scr++ ) {
if ( screendata[scr]->g_carr ) {
@@ -365,7 +365,7 @@ void TQColor::cleanup()
screendata[scr]->g_our_alloc = 0;
}
if ( screendata[scr]->colorDict ) {
- screendata[scr]->colorDict->setAutoDelete( TRUE );
+ screendata[scr]->colorDict->setAutoDelete( true );
screendata[scr]->colorDict->clear();
delete screendata[scr]->colorDict;
screendata[scr]->colorDict = 0;
@@ -421,12 +421,12 @@ uint TQColor::alloc( int screen )
if ( c ) { // found color in dictionary
pix = c->pix;
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE; // color ok
- d.d8.dirty = FALSE;
+ d.d8.invalid = false; // color ok
+ d.d8.dirty = false;
d.d8.pix = pix; // use same pixel value
if ( c->context != current_alloc_context ) {
c->context = 0; // convert to default context
- sd->g_our_alloc[pix] = TRUE; // reuse without XAllocColor
+ sd->g_our_alloc[pix] = true; // reuse without XAllocColor
}
}
return pix;
@@ -437,7 +437,7 @@ uint TQColor::alloc( int screen )
col.green = g << 8;
col.blue = b << 8;
- bool try_again = FALSE;
+ bool try_again = false;
bool try_alloc = !sd->color_reduce;
int try_count = 0;
@@ -445,7 +445,7 @@ uint TQColor::alloc( int screen )
// This loop is run until we manage to either allocate or
// find an approximate color, it stops after a few iterations.
- try_again = FALSE;
+ try_again = false;
if ( try_alloc && sd->colors_avail &&
XAllocColor(dpy, TQPaintDevice::x11AppColormap( screen ),&col) ) {
@@ -453,18 +453,18 @@ uint TQColor::alloc( int screen )
pix = (uint) col.pixel;
if ( screen == TQPaintDevice::x11AppScreen() ) {
d.d8.pix = pix;
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
sd->g_carr[d.d8.pix] = col; // update color array
if ( current_alloc_context == 0 )
- sd->g_our_alloc[d.d8.pix] = TRUE; // reuse without XAllocColor
+ sd->g_our_alloc[d.d8.pix] = true; // reuse without XAllocColor
}
} else {
// No available colors, or we did not want to allocate one
int i;
- sd->colors_avail = FALSE; // no more available colors
+ sd->colors_avail = false; // no more available colors
if ( sd->g_carr_fetch ) { // refetch color array
- sd->g_carr_fetch = FALSE;
+ sd->g_carr_fetch = false;
XQueryColors( dpy, TQPaintDevice::x11AppColormap( screen ), sd->g_carr,
sd->g_cells );
}
@@ -488,9 +488,9 @@ uint TQColor::alloc( int screen )
col.red = r << 8;
col.green = g << 8;
col.blue = b << 8;
- try_alloc = TRUE;
- try_again = TRUE;
- sd->colors_avail = TRUE;
+ try_alloc = true;
+ try_again = true;
+ sd->colors_avail = true;
continue; // Try alloc reduced color
}
}
@@ -502,16 +502,16 @@ uint TQColor::alloc( int screen )
d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
} else { // light, use white
d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
}
@@ -527,21 +527,21 @@ uint TQColor::alloc( int screen )
sd->g_carr[i] = col; // update color array
if ( screen == TQPaintDevice::x11AppScreen() ) {
if ( current_alloc_context == 0 )
- sd->g_our_alloc[i] = TRUE; // only in the default context
+ sd->g_our_alloc[i] = true; // only in the default context
}
} else {
// Oops, it's gone again
try_count++;
- try_again = TRUE;
- sd->colors_avail = TRUE;
- sd->g_carr_fetch = TRUE;
+ try_again = true;
+ sd->colors_avail = true;
+ sd->g_carr_fetch = true;
}
}
if ( !try_again ) { // got it
pix = (uint)sd->g_carr[i].pixel;
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix; // allocated X11 color
}
}
@@ -556,16 +556,16 @@ uint TQColor::alloc( int screen )
d.argb = tqRgb(0,0,0);
pix = (uint)BlackPixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
} else { // light, use white
d.argb = tqRgb(0xff,0xff,0xff);
pix = (uint)WhitePixel( dpy, screen );
if ( screen == TQPaintDevice::x11AppScreen() ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = FALSE;
+ d.d8.invalid = false;
+ d.d8.dirty = false;
d.d8.pix = pix;
}
}
@@ -638,8 +638,8 @@ void TQColor::setSystemNamedColor( const TQString& name )
if ( qt_get_named_rgb( name.latin1(), &rgb ) ) {
setRgb( tqRed(rgb), tqGreen(rgb), tqBlue(rgb) );
if ( colormodel == d8 ) {
- d.d8.invalid = FALSE;
- d.d8.dirty = TRUE;
+ d.d8.invalid = false;
+ d.d8.dirty = true;
d.d8.pix = 0;
} else {
alloc();
@@ -671,9 +671,9 @@ static int context_ptr = 0;
static void init_context_stack()
{
- static bool did_init = FALSE;
+ static bool did_init = false;
if ( !did_init ) {
- did_init = TRUE;
+ did_init = true;
context_stack[0] = current_alloc_context = 0;
}
}
@@ -814,7 +814,7 @@ void TQColor::destroyAllocContext( int context )
ulong pixels[256];
bool freeing[256];
- memset( freeing, FALSE, screendata[screen]->g_cells*sizeof(bool) );
+ memset( freeing, false, screendata[screen]->g_cells*sizeof(bool) );
TQColorData *d;
TQColorDictIt it( *screendata[screen]->colorDict );
int i = 0;
@@ -826,7 +826,7 @@ void TQColor::destroyAllocContext( int context )
if ( !screendata[screen]->g_our_alloc[d->pix] && !freeing[d->pix] ) {
// will free this color
pixels[i++] = d->pix;
- freeing[d->pix] = TRUE;
+ freeing[d->pix] = true;
}
// remove from dict
screendata[screen]->colorDict->remove( (long)rgbv );
diff --git a/src/kernel/tqcursor_x11.cpp b/src/kernel/tqcursor_x11.cpp
index 6a66e3cda..2ff9bad05 100644
--- a/src/kernel/tqcursor_x11.cpp
+++ b/src/kernel/tqcursor_x11.cpp
@@ -130,7 +130,7 @@ TQCursor *TQCursor::find_cur( int shape ) // find predefined cursor
}
-static bool initialized = FALSE;
+static bool initialized = false;
/*!
Internal function that deinitializes the predefined cursors.
@@ -149,7 +149,7 @@ void TQCursor::cleanup()
delete cursorTable[shape].data;
cursorTable[shape].data = 0;
}
- initialized = FALSE;
+ initialized = false;
}
@@ -165,7 +165,7 @@ void TQCursor::initialize()
int shape;
for( shape = 0; shape <= LastCursor; shape++ )
cursorTable[shape].data = new TQCursorData( shape );
- initialized = TRUE;
+ initialized = true;
tqAddPostRoutine( cleanup );
}
diff --git a/src/kernel/tqdesktopwidget_x11.cpp b/src/kernel/tqdesktopwidget_x11.cpp
index 35d021c51..ed17b48e4 100644
--- a/src/kernel/tqdesktopwidget_x11.cpp
+++ b/src/kernel/tqdesktopwidget_x11.cpp
@@ -50,10 +50,10 @@ extern Atom qt_net_workarea;
extern bool qt_net_supports(Atom atom);
// function to update the workarea of the screen
-static bool qt_desktopwidget_workarea_dirty = TRUE;
+static bool qt_desktopwidget_workarea_dirty = true;
void qt_desktopwidget_update_workarea()
{
- qt_desktopwidget_workarea_dirty = TRUE;
+ qt_desktopwidget_workarea_dirty = true;
}
@@ -94,7 +94,7 @@ public:
};
TQDesktopWidgetPrivate::TQDesktopWidgetPrivate()
- : use_xinerama(FALSE), defaultScreen(0), screenCount(1),
+ : use_xinerama(false), defaultScreen(0), screenCount(1),
screens( 0 ), rects( 0 ), workareas( 0 )
{
}
@@ -264,7 +264,7 @@ const TQRect& TQDesktopWidget::availableGeometry( int screen ) const
// the workareas are dirty, invalidate them
for ( int i = 0; i < d->screenCount; ++i )
d->workareas[i] = TQRect();
- qt_desktopwidget_workarea_dirty = FALSE;
+ qt_desktopwidget_workarea_dirty = false;
}
if ( screen < 0 || screen >= d->screenCount )
@@ -351,6 +351,6 @@ int TQDesktopWidget::screenNumber( const TQPoint &point ) const
void TQDesktopWidget::resizeEvent( TQResizeEvent *event )
{
d->init();
- qt_desktopwidget_workarea_dirty = TRUE;
+ qt_desktopwidget_workarea_dirty = true;
TQWidget::resizeEvent( event );
}
diff --git a/src/kernel/tqdragobject.cpp b/src/kernel/tqdragobject.cpp
index 04b9f43a1..7cb9c09aa 100644
--- a/src/kernel/tqdragobject.cpp
+++ b/src/kernel/tqdragobject.cpp
@@ -279,9 +279,9 @@ TQDragManager::TQDragManager()
dropWidget = 0;
if ( !qt_dnd_manager )
qt_dnd_manager = this;
- beingCancelled = FALSE;
- restoreCursor = FALSE;
- willDrop = FALSE;
+ beingCancelled = false;
+ restoreCursor = false;
+ willDrop = false;
}
@@ -327,7 +327,7 @@ TQDragObject::~TQDragObject()
{
#ifndef TQT_NO_DRAGANDDROP
if ( qt_dnd_manager && qt_dnd_manager->object == this )
- qt_dnd_manager->cancel( FALSE );
+ qt_dnd_manager->cancel( false );
if ( d->pm_cursor ) {
for ( int i = 0; i < qt_dnd_manager->n_cursor; i++ )
qt_dnd_manager->pm_cursor[i] = d->pm_cursor[i];
@@ -455,9 +455,9 @@ TQPixmap *TQDragObject::cursor( DragMode m ) const
Starts a drag operation using the contents of this object, using
DragDefault mode.
- The function returns TRUE if the caller should delete the original
+ The function returns true if the caller should delete the original
copy of the dragged data (but see target()); otherwise returns
- FALSE.
+ false.
If the drag contains \e references to information (e.g. file names
in a TQUriDrag are references) then the return value should always
@@ -535,10 +535,10 @@ void TQDragObject::dragLink()
will be done during future event processing - after that time the
drag object will be deleted.
- Returns TRUE if the dragged data was dragged as a \e move,
+ Returns true if the dragged data was dragged as a \e move,
indicating that the caller should remove the original source of
the data (the drag object must continue to have a copy); otherwise
- returns FALSE.
+ returns false.
The \a mode specifies the drag mode (see
\l{TQDragObject::DragMode}.) Normally one of the simpler drag(),
@@ -549,7 +549,7 @@ bool TQDragObject::drag( DragMode mode )
if ( qt_dnd_manager )
return qt_dnd_manager->drag( this, mode );
else
- return FALSE;
+ return false;
}
#endif
@@ -786,11 +786,11 @@ static TQTextCodec *codecForHTML(const TQCString &ba)
mib = 106; // utf-8
} else {
pos = 0;
- while ((pos = ba.find("<meta http-equiv=", pos, FALSE)) != -1) {
+ while ((pos = ba.find("<meta http-equiv=", pos, false)) != -1) {
int end = ba.find('>', pos+1);
if (end == -1)
break;
- pos = ba.find("charset=", pos, FALSE) + (int)strlen("charset=");
+ pos = ba.find("charset=", pos, false) + (int)strlen("charset=");
if (pos != -1 && pos < end) {
int pos2 = ba.find('\"', pos+1);
TQCString cs = ba.mid(pos, pos2-pos);
@@ -863,8 +863,8 @@ TQByteArray TQTextDrag::encodedData(const char* mime) const
}
/*!
- Returns TRUE if the information in \a e can be decoded into a
- TQString; otherwise returns FALSE.
+ Returns true if the information in \a e can be decoded into a
+ TQString; otherwise returns false.
\sa decode()
*/
@@ -883,7 +883,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e )
\overload
Attempts to decode the dropped information in \a e into \a str.
- Returns TRUE if successful; otherwise returns FALSE. If \a subtype
+ Returns true if successful; otherwise returns false. If \a subtype
is null, any text subtype is accepted; otherwise only the
specified \a subtype is accepted.
@@ -892,7 +892,7 @@ bool TQTextDrag::canDecode( const TQMimeSource* e )
bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtype )
{
if(!e)
- return FALSE;
+ return false;
// when subtype is not specified, try text/plain first, otherwise this may read
// things like text/x-moz-url even though better targets are available
@@ -907,7 +907,7 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp
if ( e->cacheType == TQMimeSource::Text ) {
str = *e->cache.txt.str;
subtype = *e->cache.txt.subtype;
- return TRUE;
+ return true;
}
const char* mime;
@@ -955,18 +955,18 @@ bool TQTextDrag::decode( const TQMimeSource* e, TQString& str, TQCString& subtyp
m->cache.txt.str = new TQString( str );
m->cache.txt.subtype = new TQCString( subtype );
- return TRUE;
+ return true;
}
}
}
}
}
- return FALSE;
+ return false;
}
/*!
Attempts to decode the dropped information in \a e into \a str.
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
\sa canDecode()
*/
@@ -1104,8 +1104,8 @@ TQByteArray TQImageDrag::encodedData(const char* fmt) const
}
/*!
- Returns TRUE if the information in mime source \a e can be decoded
- into an image; otherwise returns FALSE.
+ Returns true if the information in mime source \a e can be decoded
+ into an image; otherwise returns false.
\sa decode()
*/
@@ -1117,26 +1117,26 @@ bool TQImageDrag::canDecode( const TQMimeSource* e ) {
TQCString format = fileFormats.current();
TQCString type = "image/" + format.lower();
if ( e->provides(type.data()))
- return TRUE;
+ return true;
fileFormats.next();
}
- return FALSE;
+ return false;
}
/*!
Attempts to decode the dropped information in mime source \a e
- into \a img. Returns TRUE if successful; otherwise returns FALSE.
+ into \a img. Returns true if successful; otherwise returns false.
\sa canDecode()
*/
bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
{
if ( !e )
- return FALSE;
+ return false;
if ( e->cacheType == TQMimeSource::Graphics ) {
img = *e->cache.gfx.img;
- return TRUE;
+ return true;
}
TQByteArray payload;
@@ -1157,25 +1157,25 @@ bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
}
if ( payload.isEmpty() )
- return FALSE;
+ return false;
img.loadFromData(payload);
if ( img.isNull() )
- return FALSE;
+ return false;
TQMimeSource *m = (TQMimeSource*)e;
m->clearCache();
m->cacheType = TQMimeSource::Graphics;
m->cache.gfx.img = new TQImage( img );
m->cache.gfx.pix = 0;
- return TRUE;
+ return true;
}
/*!
\overload
Attempts to decode the dropped information in mime source \a e
- into pixmap \a pm. Returns TRUE if successful; otherwise returns
- FALSE.
+ into pixmap \a pm. Returns true if successful; otherwise returns
+ false.
This is a convenience function that converts to a TQPixmap via a
TQImage.
@@ -1185,25 +1185,25 @@ bool TQImageDrag::decode( const TQMimeSource* e, TQImage& img )
bool TQImageDrag::decode( const TQMimeSource* e, TQPixmap& pm )
{
if ( !e )
- return FALSE;
+ return false;
if ( e->cacheType == TQMimeSource::Graphics && e->cache.gfx.pix) {
pm = *e->cache.gfx.pix;
- return TRUE;
+ return true;
}
TQImage img;
// We avoid dither, since the image probably came from this display
if ( decode( e, img ) ) {
if ( !pm.convertFromImage( img, AvoidDither ) )
- return FALSE;
+ return false;
// decode initialized the cache for us
TQMimeSource *m = (TQMimeSource*)e;
m->cache.gfx.pix = new TQPixmap( pm );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -1363,8 +1363,8 @@ void TQUriDrag::setUris( TQStrList uris )
/*!
- Returns TRUE if decode() would be able to decode \a e; otherwise
- returns FALSE.
+ Returns true if decode() would be able to decode \a e; otherwise
+ returns false.
*/
bool TQUriDrag::canDecode( const TQMimeSource* e )
{
@@ -1375,15 +1375,15 @@ bool TQUriDrag::canDecode( const TQMimeSource* e )
Decodes URIs from \a e, placing the result in \a l (which is first
cleared).
- Returns TRUE if \a e contained a valid list of URIs; otherwise
- returns FALSE.
+ Returns true if \a e contained a valid list of URIs; otherwise
+ returns false.
*/
bool TQUriDrag::decode( const TQMimeSource* e, TQStrList& l )
{
TQByteArray payload = e->encodedData( "text/uri-list" );
if ( payload.size() ) {
l.clear();
- l.setAutoDelete(TRUE);
+ l.setAutoDelete(true);
uint c=0;
const char* d = payload.data();
while (c < payload.size() && d[c]) {
@@ -1400,9 +1400,9 @@ bool TQUriDrag::decode( const TQMimeSource* e, TQStrList& l )
(d[c]=='\n' || d[c]=='\r'))
c++;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static uint htod( int h )
@@ -1511,11 +1511,11 @@ TQCString TQUriDrag::localFileToUri(const TQString& filename)
#ifdef TQ_WS_WIN
- bool hasHost = FALSE;
+ bool hasHost = false;
// convert form network path
if (r.left(2) == "\\\\" || r.left(2) == "//") {
r.remove(0, 2);
- hasHost = TRUE;
+ hasHost = true;
}
// Slosh -> Slash
@@ -1605,7 +1605,7 @@ TQString TQUriDrag::uriToLocalFile(const char* uri)
hostname[ 256 ] = '\0';
if ( tqstrncmp( uri+1, hostname, hostname_end - ( uri+1 )) == 0 ) {
uri = hostname_end + 1; // point after the slash
- local = TRUE;
+ local = true;
}
}
}
@@ -1644,14 +1644,14 @@ TQString TQUriDrag::uriToLocalFile(const char* uri)
local files if they refer to local files, and places them in \a l
(which is first cleared).
- Returns TRUE if \e contained a valid list of URIs; otherwise
- returns FALSE. The list will be empty if no URIs were local files.
+ Returns true if \e contained a valid list of URIs; otherwise
+ returns false. The list will be empty if no URIs were local files.
*/
bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
{
TQStrList u;
if ( !decode( e, u ) )
- return FALSE;
+ return false;
l.clear();
for (const char* s=u.first(); s; s=u.next()) {
@@ -1659,7 +1659,7 @@ bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
if ( !lf.isNull() )
l.append( lf );
}
- return TRUE;
+ return true;
}
/*!
@@ -1667,20 +1667,20 @@ bool TQUriDrag::decodeLocalFiles( const TQMimeSource* e, TQStringList& l )
Unicode URIs (only useful for displaying to humans), placing them
in \a l (which is first cleared).
- Returns TRUE if \e contained a valid list of URIs; otherwise
- returns FALSE.
+ Returns true if \e contained a valid list of URIs; otherwise
+ returns false.
*/
bool TQUriDrag::decodeToUnicodeUris( const TQMimeSource* e, TQStringList& l )
{
TQStrList u;
if ( !decode( e, u ) )
- return FALSE;
+ return false;
l.clear();
for (const char* s=u.first(); s; s=u.next())
l.append( uriToUnicodeUri(s) );
- return TRUE;
+ return true;
}
@@ -1768,8 +1768,8 @@ void TQColorDrag::setColor( const TQColor &col )
}
/*!
- Returns TRUE if the color drag object can decode the mime source
- \a e; otherwise returns FALSE.
+ Returns true if the color drag object can decode the mime source
+ \a e; otherwise returns false.
*/
bool TQColorDrag::canDecode( TQMimeSource *e )
@@ -1787,7 +1787,7 @@ bool TQColorDrag::decode( TQMimeSource *e, TQColor &col )
TQByteArray data = e->encodedData("application/x-color");
ushort rgba[4];
if (data.size() != sizeof(rgba))
- return FALSE;
+ return false;
memcpy(rgba, data.data(), sizeof(rgba));
@@ -1805,7 +1805,7 @@ bool TQColorDrag::decode( TQMimeSource *e, TQColor &col )
b = (b >> 8) & 0xff;
col.setRgb(r, g, b);
- return TRUE;
+ return true;
}
#endif // TQT_NO_MIME
diff --git a/src/kernel/tqdragobject.h b/src/kernel/tqdragobject.h
index 568e0cbd8..a06e5ca2c 100644
--- a/src/kernel/tqdragobject.h
+++ b/src/kernel/tqdragobject.h
@@ -244,7 +244,7 @@ private:
bool drag( TQDragObject *, TQDragObject::DragMode );
- void cancel( bool deleteSource = TRUE );
+ void cancel( bool deleteSource = true );
void move( const TQPoint & );
void drop();
void updatePixmap();
diff --git a/src/kernel/tqdrawutil.cpp b/src/kernel/tqdrawutil.cpp
index 79aa69378..a05908895 100644
--- a/src/kernel/tqdrawutil.cpp
+++ b/src/kernel/tqdrawutil.cpp
@@ -60,8 +60,8 @@
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The line appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The line appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width for each of the
lines. It is not the total line width.
@@ -175,8 +175,8 @@ void qDrawShadeLine( TQPainter *p, int x1, int y1, int x2, int y2,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The rectangle appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The rectangle appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width for each of the
lines. It is not the total line width.
@@ -281,8 +281,8 @@ void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The panel appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The panel appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The \a lineWidth argument specifies the line width.
@@ -436,8 +436,8 @@ static void qDrawWinShades( TQPainter *p,
TQColorGroup::light() light\endlink, \link TQColorGroup::dark()
dark\endlink and \link TQColorGroup::mid() middle\endlink colors).
- The button appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The button appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The line width is 2 pixels.
@@ -473,8 +473,8 @@ void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
The color group argument \a g specifies the shading colors.
- The panel appears sunken if \a sunken is TRUE, or raised if \a
- sunken is FALSE.
+ The panel appears sunken if \a sunken is true, or raised if \a
+ sunken is false.
The line width is 2 pixels.
@@ -605,7 +605,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
bool clip = (flags & TQt::DontClip) == 0;
if ( clip ) {
if ( pm.width() < w && pm.height() < h )
- clip = FALSE;
+ clip = false;
else
p->setClipRect( x, y, w, h );
}
@@ -634,7 +634,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
TQString k;
k.sprintf( "$qt-drawitem-%x", pm.serialNumber() );
TQPixmap *mask = TQPixmapCache::find(k);
- bool del=FALSE;
+ bool del=false;
if ( !mask ) {
mask = new TQPixmap( pm.createHeuristicMask() );
mask->setMask( *((TQBitmap*)mask) );
@@ -652,7 +652,7 @@ void qDrawItem( TQPainter *p, TQt::GUIStyle gs,
}
p->drawPixmap( x, y, pm );
if ( clip )
- p->setClipping( FALSE );
+ p->setClipping( false );
} else if ( !text.isNull() ) {
if ( gs == TQt::WindowsStyle && !enabled ) {
p->setPen( g.light() );
@@ -908,7 +908,7 @@ static void qDrawMotifArrow( TQPainter *p, TQt::ArrowType type, bool down,
p->setPen( pen );
p->setBrush( brush );
#ifndef TQT_NO_TRANSFORMATIONS
- p->setWorldMatrix( matrix, TRUE ); // set transformation matrix
+ p->setWorldMatrix( matrix, true ); // set transformation matrix
#endif
p->drawPolygon( bFill ); // fill arrow
p->setBrush( TQt::NoBrush ); // don't fill
diff --git a/src/kernel/tqdrawutil.h b/src/kernel/tqdrawutil.h
index 113d6095f..78ffc0ac8 100644
--- a/src/kernel/tqdrawutil.h
+++ b/src/kernel/tqdrawutil.h
@@ -59,45 +59,45 @@ class TQPixmap;
//
TQ_EXPORT void qDrawShadeLine( TQPainter *p, int x1, int y1, int x2, int y2,
- const TQColorGroup &g, bool sunken = TRUE,
+ const TQColorGroup &g, bool sunken = true,
int lineWidth = 1, int midLineWidth = 0 );
TQ_EXPORT void qDrawShadeLine( TQPainter *p, const TQPoint &p1, const TQPoint &p2,
- const TQColorGroup &g, bool sunken = TRUE,
+ const TQColorGroup &g, bool sunken = true,
int lineWidth = 1, int midLineWidth = 0 );
TQ_EXPORT void qDrawShadeRect( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, int midLineWidth = 0,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadeRect( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, int midLineWidth = 0,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadePanel( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, const TQBrush *fill = 0 );
TQ_EXPORT void qDrawShadePanel( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
int lineWidth = 1, const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinButton( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinButton( TQPainter *p, const TQRect &r,
- const TQColorGroup &g, bool sunken = FALSE,
+ const TQColorGroup &g, bool sunken = false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinPanel( TQPainter *p, int x, int y, int w, int h,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawWinPanel( TQPainter *p, const TQRect &r,
- const TQColorGroup &, bool sunken=FALSE,
+ const TQColorGroup &, bool sunken=false,
const TQBrush *fill = 0 );
TQ_EXPORT void qDrawPlainRect( TQPainter *p, int x, int y, int w, int h, const TQColor &,
diff --git a/src/kernel/tqdropsite.cpp b/src/kernel/tqdropsite.cpp
index b544cdab3..49e328c95 100644
--- a/src/kernel/tqdropsite.cpp
+++ b/src/kernel/tqdropsite.cpp
@@ -64,11 +64,11 @@
Constructs a TQDropSite to handle events for the widget \a self.
Pass \c this as the \a self parameter.
- This enables dropping by calling TQWidget::setAcceptDrops(TRUE).
+ This enables dropping by calling TQWidget::setAcceptDrops(true).
*/
TQDropSite::TQDropSite( TQWidget* self )
{
- self->setAcceptDrops( TRUE );
+ self->setAcceptDrops( true );
}
/*!
diff --git a/src/kernel/tqevent.cpp b/src/kernel/tqevent.cpp
index fc59d9164..d1cf09fe9 100644
--- a/src/kernel/tqevent.cpp
+++ b/src/kernel/tqevent.cpp
@@ -56,9 +56,9 @@
and sends the translated events to TQObjects.
In general, events come from the underlying window system
- (spontaneous() returns TRUE) but it is also possible to manually
+ (spontaneous() returns true) but it is also possible to manually
send events using TQApplication::sendEvent() and
- TQApplication::postEvent() (spontaneous() returns FALSE).
+ TQApplication::postEvent() (spontaneous() returns false).
TQObjects receive events by having their TQObject::event() function
called. The function can be reimplemented in subclasses to
@@ -207,8 +207,8 @@
/*!
\fn bool TQEvent::spontaneous() const
- Returns TRUE if the event originated outside the application, i.e.
- it is a system event; otherwise returns FALSE.
+ Returns true if the event originated outside the application, i.e.
+ it is a system event; otherwise returns false.
*/
@@ -309,7 +309,7 @@
*/
TQMouseEvent::TQMouseEvent( Type type, const TQPoint &pos, int button, int state )
- : TQEvent(type), p(pos), b(button),s((ushort)state), accpt(TRUE){
+ : TQEvent(type), p(pos), b(button),s((ushort)state), accpt(true){
g = TQCursor::pos();
}
@@ -448,8 +448,8 @@ TQt::ButtonState TQMouseEvent::stateAfter() const
/*!
\fn bool TQMouseEvent::isAccepted() const
- Returns TRUE if the receiver of the event wants to keep the key;
- otherwise returns FALSE.
+ Returns true if the receiver of the event wants to keep the key;
+ otherwise returns false.
*/
/*!
@@ -529,7 +529,7 @@ TQt::ButtonState TQMouseEvent::stateAfter() const
#ifndef TQT_NO_WHEELEVENT
TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientation orient )
: TQEvent(Wheel), p(pos), d(delta), s((ushort)state),
- accpt(TRUE), o(orient)
+ accpt(true), o(orient)
{
g = TQCursor::pos();
}
@@ -636,8 +636,8 @@ TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientatio
/*!
\fn bool TQWheelEvent::isAccepted() const
- Returns TRUE if the receiver of the event handles the wheel event;
- otherwise returns FALSE.
+ Returns true if the receiver of the event handles the wheel event;
+ otherwise returns false.
*/
/*!
@@ -720,10 +720,10 @@ TQWheelEvent::TQWheelEvent( const TQPoint &pos, int delta, int state, Orientatio
keyboard macro). \a ascii is the ASCII code of the key that was
pressed or released. \a state holds the keyboard modifiers. \a
text is the Unicode text that the key generated. If \a autorep is
- TRUE, isAutoRepeat() will be TRUE. \a count is the number of
+ true, isAutoRepeat() will be true. \a count is the number of
single keys.
- The accept flag is set to TRUE.
+ The accept flag is set to true.
*/
/*!
@@ -804,8 +804,8 @@ TQt::ButtonState TQKeyEvent::stateAfter() const
/*!
\fn bool TQKeyEvent::isAccepted() const
- Returns TRUE if the receiver of the event wants to keep the key;
- otherwise returns FALSE
+ Returns true if the receiver of the event wants to keep the key;
+ otherwise returns false
*/
/*!
@@ -825,12 +825,12 @@ TQt::ButtonState TQKeyEvent::stateAfter() const
/*!
\fn bool TQKeyEvent::isAutoRepeat() const
- Returns TRUE if this event comes from an auto-repeating key and
- FALSE if it comes from an initial key press.
+ Returns true if this event comes from an auto-repeating key and
+ false if it comes from an initial key press.
Note that if the event is a multiple-key compressed event that is
- partly due to auto-repeat, this function could return either TRUE
- or FALSE indeterminately.
+ partly due to auto-repeat, this function could return either true
+ or false indeterminately.
*/
/*!
@@ -1251,15 +1251,15 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQFocusEvent::gotFocus() const
- Returns TRUE if the widget received the text input focus;
- otherwise returns FALSE.
+ Returns true if the widget received the text input focus;
+ otherwise returns false.
*/
/*!
\fn bool TQFocusEvent::lostFocus() const
- Returns TRUE if the widget lost the text input focus; otherwise
- returns FALSE.
+ Returns true if the widget lost the text input focus; otherwise
+ returns false.
*/
@@ -1279,9 +1279,9 @@ void TQFocusEvent::resetReason()
rect() can be much faster than region().boundingRect(). Painting
is clipped to region() during processing of a paint event.
- The erased() function returns TRUE if the region() has been
+ The erased() function returns true if the region() has been
cleared to the widget's background (see
- TQWidget::backgroundMode()), and FALSE if the region's contents are
+ TQWidget::backgroundMode()), and false if the region's contents are
arbitrary.
\sa TQPainter TQWidget::update() TQWidget::repaint()
@@ -1289,27 +1289,27 @@ void TQFocusEvent::resetReason()
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, bool erased=true )
Constructs a paint event object with the region that should be
updated. The region is given by \a paintRegion. If \a erased is
- TRUE the region will be cleared before repainting.
+ true the region will be cleared before repainting.
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRect &paintRect, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRect &paintRect, bool erased=true )
Constructs a paint event object with the rectangle that should be
updated. The region is also given by \a paintRect. If \a erased is
- TRUE the region will be cleared before repainting.
+ true the region will be cleared before repainting.
*/
/*!
- \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased=TRUE )
+ \fn TQPaintEvent::TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased=true )
Constructs a paint event object with the rectangle \a paintRect
that should be updated. The region is given by \a paintRegion. If
- \a erased is TRUE the region will be cleared before repainting.
+ \a erased is true the region will be cleared before repainting.
*/
/*!
@@ -1331,8 +1331,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQPaintEvent::erased() const
- Returns TRUE if the paint event region (or rectangle) has been
- erased with the widget's background; otherwise returns FALSE.
+ Returns true if the paint event region (or rectangle) has been
+ erased with the widget's background; otherwise returns false.
*/
/*!
@@ -1448,7 +1448,7 @@ void TQFocusEvent::resetReason()
If the last top-level window is closed, the
TQApplication::lastWindowClosed() signal is emitted.
- The isAccepted() function returns TRUE if the event's receiver has
+ The isAccepted() function returns true if the event's receiver has
agreed to close the widget; call accept() to agree to close the
widget and call ignore() if the receiver of this event does not
want the widget to be closed.
@@ -1462,7 +1462,7 @@ void TQFocusEvent::resetReason()
\fn TQCloseEvent::TQCloseEvent()
Constructs a close event object with the accept parameter flag set
- to FALSE.
+ to false.
\sa accept()
*/
@@ -1470,8 +1470,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQCloseEvent::isAccepted() const
- Returns TRUE if the receiver of the event has agreed to close the
- widget; otherwise returns FALSE.
+ Returns true if the receiver of the event has agreed to close the
+ widget; otherwise returns false.
\sa accept(), ignore()
*/
@@ -1521,7 +1521,7 @@ void TQFocusEvent::resetReason()
\fn TQIconDragEvent::TQIconDragEvent()
Constructs an icon drag event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
\sa accept()
*/
@@ -1529,8 +1529,8 @@ void TQFocusEvent::resetReason()
/*!
\fn bool TQIconDragEvent::isAccepted() const
- Returns TRUE if the receiver of the event has started a drag and
- drop operation; otherwise returns FALSE.
+ Returns true if the receiver of the event has started a drag and
+ drop operation; otherwise returns false.
\sa accept(), ignore()
*/
@@ -1587,7 +1587,7 @@ void TQFocusEvent::resetReason()
\fn TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, const TQPoint &globalPos, int state )
Constructs a context menu event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
The \a reason parameter must be \c TQContextMenuEvent::Mouse or \c
TQContextMenuEvent::Keyboard.
@@ -1602,7 +1602,7 @@ void TQFocusEvent::resetReason()
\fn TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int state )
Constructs a context menu event object with the accept parameter
- flag set to FALSE.
+ flag set to false.
The \a reason parameter must be \c TQContextMenuEvent::Mouse or \c
TQContextMenuEvent::Keyboard.
@@ -1617,7 +1617,7 @@ void TQFocusEvent::resetReason()
*/
TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int state )
- : TQEvent( ContextMenu ), p( pos ), accpt(TRUE), consum(TRUE),
+ : TQEvent( ContextMenu ), p( pos ), accpt(true), consum(true),
reas( reason ), s((ushort)state)
{
gp = TQCursor::pos();
@@ -1691,8 +1691,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQContextMenuEvent::isConsumed() const
- Returns TRUE (which stops propagation of the event) if the
- receiver has blocked the event; otherwise returns FALSE.
+ Returns true (which stops propagation of the event) if the
+ receiver has blocked the event; otherwise returns false.
\sa accept(), ignore(), consume()
*/
@@ -1714,8 +1714,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQContextMenuEvent::isAccepted() const
- Returns TRUE if the receiver has processed the event; otherwise
- returns FALSE.
+ Returns true if the receiver has processed the event; otherwise
+ returns false.
\sa accept(), ignore(), consume()
*/
@@ -1847,7 +1847,7 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn TQIMEvent::TQIMEvent( Type type, const TQString &text, int cursorPosition )
- Constructs a new TQIMEvent with the accept flag set to FALSE. \a
+ Constructs a new TQIMEvent with the accept flag set to false. \a
type can be one of TQEvent::IMStartEvent, TQEvent::IMComposeEvent
or TQEvent::IMEndEvent. \a text contains the current compostion
string and \a cursorPosition the current position of the cursor
@@ -1881,8 +1881,8 @@ TQContextMenuEvent::TQContextMenuEvent( Reason reason, const TQPoint &pos, int s
/*!
\fn bool TQIMEvent::isAccepted() const
- Returns TRUE if the receiver of the event processed the event;
- otherwise returns FALSE.
+ Returns true if the receiver of the event processed the event;
+ otherwise returns false.
*/
/*!
@@ -1988,7 +1988,7 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
mYT( yTilt ),
mType( uId.first ),
mPhy( uId.second ),
- mbAcc(TRUE)
+ mbAcc(true)
{}
/*!
@@ -2110,8 +2110,8 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
/*!
\fn bool TQTabletEvent::isAccepted() const
- Returns TRUE if the receiver of the event handles the tablet
- event; otherwise returns FALSE.
+ Returns true if the receiver of the event handles the tablet
+ event; otherwise returns false.
*/
/*!
@@ -2196,14 +2196,14 @@ TQTabletEvent::TQTabletEvent( Type t, const TQPoint &pos, const TQPoint &globalP
/*!
\fn bool TQChildEvent::inserted() const
- Returns TRUE if the widget received a new child; otherwise returns
- FALSE.
+ Returns true if the widget received a new child; otherwise returns
+ false.
*/
/*!
\fn bool TQChildEvent::removed() const
- Returns TRUE if the object lost a child; otherwise returns FALSE.
+ Returns true if the object lost a child; otherwise returns false.
*/
@@ -2357,16 +2357,16 @@ TQCustomEvent::TQCustomEvent( int type )
/*!
\fn bool TQDropEvent::isAccepted () const
- Returns TRUE if the drop target accepts the event; otherwise
- returns FALSE.
+ Returns true if the drop target accepts the event; otherwise
+ returns false.
*/
/*!
- \fn void TQDropEvent::accept(bool y=TRUE)
+ \fn void TQDropEvent::accept(bool y=true)
Call this function to indicate whether the event provided data
- which your widget processed. Set \a y to TRUE (the default) if
- your widget could process the data, otherwise set \a y to FALSE.
+ which your widget processed. Set \a y to true (the default) if
+ your widget could process the data, otherwise set \a y to false.
To get the data, use encodedData(), or preferably, the decode()
methods of existing TQDragObject subclasses, such as
TQTextDrag::decode(), or your own subclasses.
@@ -2375,12 +2375,12 @@ TQCustomEvent::TQCustomEvent( int type )
*/
/*!
- \fn void TQDropEvent::acceptAction(bool y=TRUE)
+ \fn void TQDropEvent::acceptAction(bool y=true)
Call this to indicate that the action described by action() is
- accepted (i.e. if \a y is TRUE, which is the default), not merely
- the default copy action. If you call acceptAction(TRUE), there is
- no need to also call accept(TRUE).
+ accepted (i.e. if \a y is true, which is the default), not merely
+ the default copy action. If you call acceptAction(true), there is
+ no need to also call accept(true).
*/
/*!
@@ -2448,8 +2448,8 @@ TQCustomEvent::TQCustomEvent( int type )
/*!
\fn bool TQDropEvent::isActionAccepted () const
- Returns TRUE if the drop action was accepted by the drop site;
- otherwise returns FALSE.
+ Returns true if the drop action was accepted by the drop site;
+ otherwise returns false.
*/
@@ -2518,12 +2518,12 @@ TQCustomEvent::TQCustomEvent( int type )
This event is sent just before TQWidget::hide() returns, and also
when a top-level window has been hidden (iconified) by the user.
- If spontaneous() is TRUE the event originated outside the
+ If spontaneous() is true the event originated outside the
application, i.e. the user hid the window using the window manager
controls, either by iconifying the window or by switching to
another virtual desktop where the window isn't visible. The window
will become hidden but not withdrawn. If the window was iconified,
- TQWidget::isMinimized() returns TRUE.
+ TQWidget::isMinimized() returns true.
\sa TQShowEvent
*/
diff --git a/src/kernel/tqevent.h b/src/kernel/tqevent.h
index 6011dd35e..96205c0a7 100644
--- a/src/kernel/tqevent.h
+++ b/src/kernel/tqevent.h
@@ -144,7 +144,7 @@ public:
};
- TQEvent( Type type ) : t(type), posted(FALSE), spont(FALSE) {}
+ TQEvent( Type type ) : t(type), posted(false), spont(false) {}
virtual ~TQEvent();
Type type() const { return t; }
bool spontaneous() const { return spont; }
@@ -180,7 +180,7 @@ public:
TQMouseEvent( Type type, const TQPoint &pos, const TQPoint&globalPos,
int button, int state )
- : TQEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(TRUE) {};
+ : TQEvent(type), p(pos), g(globalPos), b((ushort)button),s((ushort)state),accpt(true) {};
const TQPoint &pos() const { return p; }
const TQPoint &globalPos() const { return g; }
@@ -192,8 +192,8 @@ public:
ButtonState state() const { return (ButtonState) s; }
ButtonState stateAfter() const;
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQPoint p;
TQPoint g;
@@ -210,7 +210,7 @@ public:
TQWheelEvent( const TQPoint &pos, int delta, int state, Orientation orient = Vertical );
TQWheelEvent( const TQPoint &pos, const TQPoint& globalPos, int delta, int state, Orientation orient = Vertical )
: TQEvent(Wheel), p(pos), g(globalPos), d(delta), s((ushort)state),
- accpt(TRUE), o(orient) {}
+ accpt(true), o(orient) {}
int delta() const { return d; }
const TQPoint &pos() const { return p; }
const TQPoint &globalPos() const { return g; }
@@ -221,8 +221,8 @@ public:
ButtonState state() const { return ButtonState(s); }
Orientation orientation() const { return o; }
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQPoint p;
TQPoint g;
@@ -243,7 +243,7 @@ public:
int pressure, int xTilt, int yTilt, const TQPair<int,int> &uId )
: TQEvent( TabletMove ), mPos( pos ), mGPos( globalPos ), mDev( device ),
mPress( pressure ), mXT( xTilt ), mYT( yTilt ), mType( uId.first ),
- mPhy( uId.second ), mbAcc(TRUE)
+ mPhy( uId.second ), mbAcc(true)
{}
int pressure() const { return mPress; }
int xTilt() const { return mXT; }
@@ -256,8 +256,8 @@ public:
int globalY() const { return mGPos.y(); }
TabletDevice device() const { return TabletDevice(mDev); }
int isAccepted() const { return mbAcc; }
- void accept() { mbAcc = TRUE; }
- void ignore() { mbAcc = FALSE; }
+ void accept() { mbAcc = true; }
+ void ignore() { mbAcc = false; }
TQPair<int,int> uniqueId() { return TQPair<int,int>( mType, mPhy); }
protected:
TQPoint mPos;
@@ -276,12 +276,12 @@ class TQ_EXPORT TQKeyEvent : public TQEvent
{
public:
TQKeyEvent( Type type, int key, int ascii, int state,
- const TQString& text=TQString::null, bool autorep=FALSE, ushort count=1 )
+ const TQString& text=TQString::null, bool autorep=false, ushort count=1 )
: TQEvent(type), txt(text), k((ushort)key), s((ushort)state),
- a((uchar)ascii), accpt(TRUE), autor(autorep), c(count)
+ a((uchar)ascii), accpt(true), autor(autorep), c(count)
{
if ( key >= Key_Back && key <= Key_MediaLast )
- accpt = FALSE;
+ accpt = false;
}
int key() const { return k; }
int ascii() const { return a; }
@@ -291,8 +291,8 @@ public:
TQString text() const { return txt; }
bool isAutoRepeat() const { return autor; }
int count() const { return int(c); }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
TQString txt;
@@ -328,17 +328,17 @@ private:
class TQ_EXPORT TQPaintEvent : public TQEvent
{
public:
- TQPaintEvent( const TQRegion& paintRegion, bool erased = TRUE)
+ TQPaintEvent( const TQRegion& paintRegion, bool erased = true)
: TQEvent(Paint),
rec(paintRegion.boundingRect()),
reg(paintRegion),
erase(erased){}
- TQPaintEvent( const TQRect &paintRect, bool erased = TRUE )
+ TQPaintEvent( const TQRect &paintRect, bool erased = true )
: TQEvent(Paint),
rec(paintRect),
reg(paintRect),
erase(erased){}
- TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased = TRUE )
+ TQPaintEvent( const TQRegion &paintRegion, const TQRect &paintRect, bool erased = true )
: TQEvent(Paint),
rec(paintRect),
reg(paintRegion),
@@ -388,10 +388,10 @@ class TQ_EXPORT TQCloseEvent : public TQEvent
{
public:
TQCloseEvent()
- : TQEvent(Close), accpt(FALSE) {}
+ : TQEvent(Close), accpt(false) {}
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
bool accpt;
};
@@ -401,11 +401,11 @@ class TQ_EXPORT TQIconDragEvent : public TQEvent
{
public:
TQIconDragEvent()
- : TQEvent(IconDrag), accpt(FALSE) {}
+ : TQEvent(IconDrag), accpt(false) {}
bool isAccepted() const { return accpt; }
- void accept() { accpt = TRUE; }
- void ignore() { accpt = FALSE; }
+ void accept() { accpt = true; }
+ void ignore() { accpt = false; }
protected:
bool accpt;
};
@@ -430,7 +430,7 @@ class TQ_EXPORT TQContextMenuEvent : public TQEvent
public:
enum Reason { Mouse, Keyboard, Other };
TQContextMenuEvent( Reason reason, const TQPoint &pos, const TQPoint &globalPos, int state )
- : TQEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( TRUE ), consum( TRUE ),
+ : TQEvent( ContextMenu ), p( pos ), gp( globalPos ), accpt( true ), consum( true ),
reas( reason ), s((ushort)state) {}
TQContextMenuEvent( Reason reason, const TQPoint &pos, int state );
@@ -445,9 +445,9 @@ public:
ButtonState state() const { return (ButtonState) s; }
bool isAccepted() const { return accpt; }
bool isConsumed() const { return consum; }
- void consume() { accpt = FALSE; consum = TRUE; }
- void accept() { accpt = TRUE; consum = TRUE; }
- void ignore() { accpt = FALSE; consum = FALSE; }
+ void consume() { accpt = false; consum = true; }
+ void accept() { accpt = true; consum = true; }
+ void ignore() { accpt = false; consum = false; }
Reason reason() const { return Reason( reas ); }
@@ -465,12 +465,12 @@ class TQ_EXPORT TQIMEvent : public TQEvent
{
public:
TQIMEvent( Type type, const TQString &text, int cursorPosition )
- : TQEvent(type), txt(text), cpos(cursorPosition), a(TRUE) {}
+ : TQEvent(type), txt(text), cpos(cursorPosition), a(true) {}
const TQString &text() const { return txt; }
int cursorPos() const { return cpos; }
bool isAccepted() const { return a; }
- void accept() { a = TRUE; }
- void ignore() { a = FALSE; }
+ void accept() { a = true; }
+ void ignore() { a = false; }
int selectionLength() const;
private:
@@ -516,11 +516,11 @@ public:
{}
const TQPoint &pos() const { return p; }
bool isAccepted() const { return accpt || accptact; }
- void accept(bool y=TRUE) { accpt = y; }
- void ignore() { accpt = FALSE; }
+ void accept(bool y=true) { accpt = y; }
+ void ignore() { accpt = false; }
bool isActionAccepted() const { return accptact; }
- void acceptAction(bool y=TRUE) { accptact = y; }
+ void acceptAction(bool y=true) { accptact = y; }
enum Action { Copy, Link, Move, Private, UserAction=100 };
void setAction( Action a ) { act = (uint)a; }
Action action() const { return Action(act); }
@@ -552,9 +552,9 @@ public:
: TQDropEvent(pos,typ),
rect( pos, TQSize( 1, 1 ) ) {}
TQRect answerRect() const { return rect; }
- void accept( bool y=TRUE ) { TQDropEvent::accept(y); }
- void accept( const TQRect & r) { accpt = TRUE; rect = r; }
- void ignore( const TQRect & r) { accpt =FALSE; rect = r; }
+ void accept( bool y=true ) { TQDropEvent::accept(y); }
+ void accept( const TQRect & r) { accpt = true; rect = r; }
+ void ignore( const TQRect & r) { accpt =false; rect = r; }
void ignore() { TQDropEvent::ignore(); }
protected:
diff --git a/src/kernel/tqeventloop.cpp b/src/kernel/tqeventloop.cpp
index 6d6c6c5c2..9b3d3cb2b 100644
--- a/src/kernel/tqeventloop.cpp
+++ b/src/kernel/tqeventloop.cpp
@@ -176,9 +176,9 @@ int TQEventLoop::exec()
// cleanup
d->looplevel = 0;
- d->quitnow = FALSE;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->quitnow = false;
+ d->exitloop = false;
+ d->shortcut = false;
// don't reset quitcode!
return d->quitcode;
@@ -205,9 +205,9 @@ void TQEventLoop::exit( int retcode )
if ( d->quitnow ) // preserve existing quitcode
return;
d->quitcode = retcode;
- d->quitnow = TRUE;
- d->exitloop = TRUE;
- d->shortcut = TRUE;
+ d->quitnow = true;
+ d->exitloop = true;
+ d->shortcut = true;
}
@@ -220,8 +220,8 @@ int TQEventLoop::enterLoop()
{
// save the current exitloop state
bool old_exitloop = d->exitloop;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->exitloop = false;
+ d->shortcut = false;
d->looplevel++;
while ( ! d->exitloop ) {
@@ -229,15 +229,15 @@ int TQEventLoop::enterLoop()
}
d->looplevel--;
- // restore the exitloop state, but if quitnow is TRUE, we need to keep
+ // restore the exitloop state, but if quitnow is true, we need to keep
// exitloop set so that all other event loops drop out.
d->exitloop = old_exitloop || d->quitnow;
d->shortcut = d->quitnow;
if ( d->looplevel < 1 ) {
- d->quitnow = FALSE;
- d->exitloop = FALSE;
- d->shortcut = FALSE;
+ d->quitnow = false;
+ d->exitloop = false;
+ d->shortcut = false;
emit tqApp->aboutToQuit();
// send deferred deletes
@@ -254,8 +254,8 @@ int TQEventLoop::enterLoop()
*/
void TQEventLoop::exitLoop()
{
- d->exitloop = TRUE;
- d->shortcut = TRUE;
+ d->exitloop = true;
+ d->shortcut = true;
}
/*! \fn void TQEventLoop::loopLevel() const
@@ -323,15 +323,15 @@ void TQEventLoop::processEvents( ProcessEventsFlags flags, int maxTime )
NOTE: This function will not process events continuously; it
returns after all available events are processed.
- This function returns TRUE if an event was processed; otherwise it
- returns FALSE.
+ This function returns true if an event was processed; otherwise it
+ returns false.
\sa ProcessEvents hasPendingEvents()
*/
/*! \fn bool TQEventLoop::hasPendingEvents() const
- Returns TRUE if there is an event waiting, otherwise it returns FALSE.
+ Returns true if there is an event waiting, otherwise it returns false.
*/
/*! \fn void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
diff --git a/src/kernel/tqeventloop_p.h b/src/kernel/tqeventloop_p.h
index 395d90a85..c996b73b4 100644
--- a/src/kernel/tqeventloop_p.h
+++ b/src/kernel/tqeventloop_p.h
@@ -108,9 +108,9 @@ public:
void reset() {
looplevel = 0;
quitcode = 0;
- quitnow = FALSE;
- exitloop = FALSE;
- shortcut = FALSE;
+ quitnow = false;
+ exitloop = false;
+ shortcut = false;
}
int looplevel;
diff --git a/src/kernel/tqeventloop_unix.cpp b/src/kernel/tqeventloop_unix.cpp
index fc0a0b48b..00bb78ae3 100644
--- a/src/kernel/tqeventloop_unix.cpp
+++ b/src/kernel/tqeventloop_unix.cpp
@@ -67,14 +67,14 @@
Arguments:
int timerId timer identifier
Returns:
- bool TRUE if successful
+ bool true if successful
qKillTimer( obj )
Stops all timers that are sent to the specified object.
Arguments:
TQObject *obj object receiving timer events
Returns:
- bool TRUE if successful
+ bool true if successful
*****************************************************************************/
//
@@ -232,14 +232,14 @@ static void repairTimer( const timeval &time ) // repair broken timer
timeval *qt_wait_timer()
{
static timeval tm;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
if ( timerList && timerList->count() ) { // there are waiting timers
getTime( currentTime );
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
TimerInfo *t = timerList->first(); // first waiting timer
@@ -270,7 +270,7 @@ static void initTimers() // initialize timers
timerBitVec->clearBit( i );
timerList = new TimerList;
TQ_CHECK_PTR( timerList );
- timerList->setAutoDelete( TRUE );
+ timerList->setAutoDelete( true );
gettimeofday( &watchtime, 0 );
}
@@ -311,7 +311,7 @@ bool qKillTimer( int id )
TimerInfo *t;
if ( !timerList || id <= 0 ||
id > (int)timerBitVec->size() || !timerBitVec->testBit( id-1 ) )
- return FALSE; // not init'd or invalid timer
+ return false; // not init'd or invalid timer
t = timerList->first();
while ( t && t->id != id ) // find timer info in list
t = timerList->next();
@@ -320,14 +320,14 @@ bool qKillTimer( int id )
return timerList->remove();
}
else // id not found
- return FALSE;
+ return false;
}
bool qKillTimer( TQObject *obj )
{
TimerInfo *t;
if ( !timerList ) // not initialized
- return FALSE;
+ return false;
t = timerList->first();
while ( t ) { // check all timers
if ( t->obj == obj ) { // object found
@@ -338,7 +338,7 @@ bool qKillTimer( TQObject *obj )
t = timerList->next();
}
}
- return TRUE;
+ return true;
}
/*****************************************************************************
@@ -381,7 +381,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
// create new list, the TQSockNotType destructor will delete it for us
list = new TQPtrList<TQSockNot>;
TQ_CHECK_PTR( list );
- list->setAutoDelete( TRUE );
+ list->setAutoDelete( true );
d->sn_vec[type].list = list;
}
@@ -526,7 +526,7 @@ int TQEventLoop::activateTimers()
{
if ( !timerList || !timerList->count() ) // no timers
return 0;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0;
@@ -539,7 +539,7 @@ int TQEventLoop::activateTimers()
if ( first ) {
if ( currentTime < watchtime ) // clock was turned back
repairTimer( currentTime );
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
t = timerList->first();
diff --git a/src/kernel/tqeventloop_unix_glib.cpp b/src/kernel/tqeventloop_unix_glib.cpp
index eec66d0af..93182ded5 100644
--- a/src/kernel/tqeventloop_unix_glib.cpp
+++ b/src/kernel/tqeventloop_unix_glib.cpp
@@ -79,14 +79,14 @@ extern TQMutex *tqt_timerListMutex;
Arguments:
int timerId timer identifier
Returns:
- bool TRUE if successful
+ bool true if successful
qKillTimer( obj )
Stops all timers that are sent to the specified object.
Arguments:
TQObject *obj object receiving timer events
Returns:
- bool TRUE if successful
+ bool true if successful
*****************************************************************************/
//
@@ -262,7 +262,7 @@ timeval *qt_wait_timer()
tqt_timerListMutex->lock();
#endif
static timeval tm;
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
if ( timerList && timerList->count() ) { // there are waiting timers
getTime( currentTime );
@@ -270,7 +270,7 @@ timeval *qt_wait_timer()
if ( currentTime < watchtime ) { // clock was turned back
repairTimer( currentTime );
}
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
TimerInfo *t = timerList->first(); // first waiting timer
@@ -316,7 +316,7 @@ static void initTimers() // initialize timers
tqt_timerListMutex = new TQMutex(true);
#endif
TQ_CHECK_PTR( timerList );
- timerList->setAutoDelete( TRUE );
+ timerList->setAutoDelete( true );
gettimeofday( &watchtime, 0 );
}
@@ -375,7 +375,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE; // not init'd or invalid timer
+ return false; // not init'd or invalid timer
}
t = timerList->first();
while ( t && t->id != id ) { // find timer info in list
@@ -394,7 +394,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE;
+ return false;
}
}
@@ -408,7 +408,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE;
+ return false;
}
t = timerList->first();
while ( t ) { // check all timers
@@ -424,7 +424,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -436,7 +436,7 @@ TQEventLoopPrivate::TQEventLoopPrivate() {
x_gPollFD.revents = 0;
#endif // TQ_WS_X11
gSource = nullptr;
- singletoolkit = TRUE;
+ singletoolkit = true;
ctx = nullptr;
mainloop = nullptr;
ctx_is_default = false;
@@ -450,9 +450,9 @@ TQEventLoopPrivate::~TQEventLoopPrivate() {
void TQEventLoopPrivate::reset() {
looplevel = 0;
quitcode = 0;
- quitnow = FALSE;
- exitloop = FALSE;
- shortcut = FALSE;
+ quitnow = false;
+ exitloop = false;
+ shortcut = false;
}
@@ -486,7 +486,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
// create new list, the TQSockNotType destructor will delete it for us
list = new TQPtrList<TQSockNot>;
TQ_CHECK_PTR( list );
- list->setAutoDelete( TRUE );
+ list->setAutoDelete( true );
d->sn_list = list;
}
*/
@@ -510,7 +510,7 @@ void TQEventLoop::registerSocketNotifier( TQSocketNotifier *notifier )
sn->gPollFD.fd = sockfd;
sn->gPollFD.events = events;
sn->events = events; // save events!
- sn->pending = FALSE;
+ sn->pending = false;
list->append( sn );
@@ -589,7 +589,7 @@ void TQEventLoop::setSocketNotifierPending( TQSocketNotifier *notifier )
if ( !sn->pending ) {
d->sn_pending_list.insert( (rand() & 0xff) %
(d->sn_pending_list.count()+1), sn );
- sn->pending = TRUE; // add it only once!
+ sn->pending = true; // add it only once!
}
}
@@ -639,7 +639,7 @@ int TQEventLoop::activateTimers()
#endif
return 0;
}
- bool first = TRUE;
+ bool first = true;
timeval currentTime;
int n_act = 0, maxCount = timerList->count();
TimerInfo *begin = 0;
@@ -654,7 +654,7 @@ int TQEventLoop::activateTimers()
if ( currentTime < watchtime ) { // clock was turned back
repairTimer( currentTime );
}
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
t = timerList->first();
@@ -728,7 +728,7 @@ int TQEventLoop::activateSocketNotifiers()
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("activate sn : send event fd=%d\n", sn->gPollFD.fd );
#endif
- sn->pending = FALSE;
+ sn->pending = false;
#if defined(TQT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
if ((!sn->obj) ||
diff --git a/src/kernel/tqeventloop_x11.cpp b/src/kernel/tqeventloop_x11.cpp
index 97fb570dd..74014ddbd 100644
--- a/src/kernel/tqeventloop_x11.cpp
+++ b/src/kernel/tqeventloop_x11.cpp
@@ -152,7 +152,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
// also flushes output buffer
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
@@ -194,25 +194,25 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
nevents++;
if ( tqApp->x11ProcessEvent( &event ) == 1 )
- return TRUE;
+ return true;
}
}
}
}
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
TQApplication::sendPostedEvents();
const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;
if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {
- return TRUE;
+ return true;
}
// don't block if exitLoop() or exit()/quit() has been called.
- bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
+ bool canWait = d->exitloop || d->quitnow ? false : (flags & WaitForMore);
// Process timers and socket notifiers - the common UNIX stuff
@@ -346,7 +346,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
static const char *t[] = { "Read", "Write", "Exception" };
tqWarning("TQSocketNotifier: invalid socket %d and type '%s', disabling...",
sn->fd, t[type]);
- sn->obj->setEnabled(FALSE);
+ sn->obj->setEnabled(false);
}
sn = list->next();
diff --git a/src/kernel/tqeventloop_x11_glib.cpp b/src/kernel/tqeventloop_x11_glib.cpp
index fa449ca07..d031d21ee 100644
--- a/src/kernel/tqeventloop_x11_glib.cpp
+++ b/src/kernel/tqeventloop_x11_glib.cpp
@@ -321,7 +321,7 @@ bool TQEventLoop::processX11Events()
// also flushes output buffer
while ( XPending( TQPaintDevice::x11AppDisplay() ) ) {
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
XNextEvent( TQPaintDevice::x11AppDisplay(), &event );
@@ -363,7 +363,7 @@ bool TQEventLoop::processX11Events()
nevents++;
if ( tqApp->x11ProcessEvent( &event ) == 1 ) {
- return TRUE;
+ return true;
}
}
}
@@ -371,16 +371,16 @@ bool TQEventLoop::processX11Events()
}
if ( d->shortcut ) {
- return FALSE;
+ return false;
}
TQApplication::sendPostedEvents();
const uint exclude_all = ExcludeSocketNotifiers | ExcludeTimers;
if ( nevents > 0 && ( flags & exclude_all ) == exclude_all && ( flags & WaitForMore ) ) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -399,7 +399,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#endif
// don't block if exitLoop() or exit()/quit() has been called.
- bool canWait = d->exitloop || d->quitnow ? FALSE : (flags & WaitForMore);
+ bool canWait = d->exitloop || d->quitnow ? false : (flags & WaitForMore);
// Process timers and socket notifiers - the common UNIX stuff
@@ -463,7 +463,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3a)\n");
#endif
- return FALSE;
+ return false;
}
// stay in poll until something happens?
@@ -472,7 +472,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourcePrepare(3b) timeout=%d \n", *timeout);
#endif
- return FALSE;
+ return false;
}
// else timeout >=0
@@ -482,7 +482,7 @@ bool TQEventLoop::gsourcePrepare(GSource *gs, int * timeout)
printf("inside gsourcePrepare(3c) timeout=%d \n", *timeout);
#endif
- return FALSE;
+ return false;
}
@@ -503,7 +503,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
while ( (sn=it.current()) ) {
++it;
if ( sn->gPollFD.revents ) {
- return TRUE;
+ return true;
}
}
}
@@ -513,21 +513,21 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) xfd!\n");
#endif
- return TRUE; // we got events!
+ return true; // we got events!
}
if (d->threadPipe_gPollFD.revents) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) threadpipe!!\n");
#endif
- return TRUE; // we got events!
+ return true; // we got events!
}
if (hasPendingEvents()) {
#ifdef DEBUG_QT_GLIBMAINLOOP
printf("inside gsourceCheck(2) pendingEvents!\n");
#endif
- return TRUE; // we got more X11 events!
+ return true; // we got more X11 events!
}
// check if we have timers to activate?
@@ -538,7 +538,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) qtwaittimer!\n");
#endif
- return TRUE;
+ return true;
}
}
@@ -547,7 +547,7 @@ bool TQEventLoop::gsourceCheck(GSource *gs) {
printf("inside gsourceCheck(2) nothing to dispatch!\n");
#endif
- return FALSE;
+ return false;
}
@@ -639,10 +639,10 @@ bool TQEventLoop::gsourceDispatch(GSource *gs) {
}
if (d->singletoolkit) {
- return TRUE; // Eat the event
+ return true; // Eat the event
}
else {
- return FALSE; // Pass the event on to GTK
+ return false; // Pass the event on to GTK
}
}
diff --git a/src/kernel/tqfont.cpp b/src/kernel/tqfont.cpp
index c8395d342..5dce75b20 100644
--- a/src/kernel/tqfont.cpp
+++ b/src/kernel/tqfont.cpp
@@ -65,7 +65,7 @@
#ifdef TQFONTCACHE_DEBUG
# define FC_DEBUG tqDebug
#else
-# define FC_DEBUG if (FALSE) tqDebug
+# define FC_DEBUG if (false) tqDebug
#endif
@@ -93,21 +93,21 @@ bool TQFontDef::operator==( const TQFontDef &other ) const
*/
if (pixelSize != -1 && other.pixelSize != -1) {
if (pixelSize != other.pixelSize)
- return FALSE;
+ return false;
} else if (pointSize != -1 && other.pointSize != -1) {
if (pointSize != other.pointSize
&& (TQABS(pointSize - other.pointSize) >= 5
|| tqRound(pointSize/10.) != tqRound(other.pointSize/10.)))
- return FALSE;
+ return false;
} else {
- return FALSE;
+ return false;
}
if (!ignorePitch && !other.ignorePitch && fixedPitch != other.fixedPitch)
- return FALSE;
+ return false;
if (stretch != 0 && other.stretch != 0 && stretch != other.stretch)
- return FALSE;
+ return false;
TQString this_family, this_foundry, other_family, other_foundry;
TQFontDatabase::parseFontName(family, this_foundry, this_family);
@@ -132,7 +132,7 @@ bool TQFontDef::operator==( const TQFontDef &other ) const
TQFontPrivate::TQFontPrivate()
: engineData( 0 ), paintdevice( 0 ),
- rawMode( FALSE ), underline( FALSE ), overline( FALSE ), strikeOut( FALSE ),
+ rawMode( false ), underline( false ), overline( false ), strikeOut( false ),
mask( 0 )
{
#ifdef TQ_WS_X11
@@ -250,7 +250,7 @@ TQFontEngineData::~TQFontEngineData()
attributes, or if no matching font exists, TQt will use the closest
matching installed font. The attributes of the font that is
actually used are retrievable from a TQFontInfo object. If the
- window system provides an exact match exactMatch() returns TRUE.
+ window system provides an exact match exactMatch() returns true.
Use TQFontMetrics to get measurements, e.g. the pixel length of a
string using TQFontMetrics::width().
@@ -831,7 +831,7 @@ void TQFont::setPixelSizeFloat( float pixelSize )
}
/*!
- Returns TRUE if italic has been set; otherwise returns FALSE.
+ Returns true if italic has been set; otherwise returns false.
\sa setItalic()
*/
@@ -841,7 +841,7 @@ bool TQFont::italic() const
}
/*!
- If \a enable is TRUE, italic is set on; otherwise italic is set
+ If \a enable is true, italic is set on; otherwise italic is set
off.
\sa italic(), TQFontInfo
@@ -907,8 +907,8 @@ void TQFont::setWeight( int weight )
/*!
\fn bool TQFont::bold() const
- Returns TRUE if weight() is a value greater than \link Weight
- TQFont::Normal \endlink; otherwise returns FALSE.
+ Returns true if weight() is a value greater than \link Weight
+ TQFont::Normal \endlink; otherwise returns false.
\sa weight(), setBold(), TQFontInfo::bold()
*/
@@ -926,7 +926,7 @@ void TQFont::setWeight( int weight )
*/
/*!
- Returns TRUE if underline has been set; otherwise returns FALSE.
+ Returns true if underline has been set; otherwise returns false.
\sa setUnderline()
*/
@@ -936,7 +936,7 @@ bool TQFont::underline() const
}
/*!
- If \a enable is TRUE, sets underline on; otherwise sets underline
+ If \a enable is true, sets underline on; otherwise sets underline
off.
\sa underline(), TQFontInfo
@@ -950,7 +950,7 @@ void TQFont::setUnderline( bool enable )
}
/*!
- Returns TRUE if overline has been set; otherwise returns FALSE.
+ Returns true if overline has been set; otherwise returns false.
\sa setOverline()
*/
@@ -960,7 +960,7 @@ bool TQFont::overline() const
}
/*!
- If \a enable is TRUE, sets overline on; otherwise sets overline off.
+ If \a enable is true, sets overline on; otherwise sets overline off.
\sa overline(), TQFontInfo
*/
@@ -973,7 +973,7 @@ void TQFont::setOverline( bool enable )
}
/*!
- Returns TRUE if strikeout has been set; otherwise returns FALSE.
+ Returns true if strikeout has been set; otherwise returns false.
\sa setStrikeOut()
*/
@@ -983,7 +983,7 @@ bool TQFont::strikeOut() const
}
/*!
- If \a enable is TRUE, sets strikeout on; otherwise sets strikeout
+ If \a enable is true, sets strikeout on; otherwise sets strikeout
off.
\sa strikeOut(), TQFontInfo
@@ -997,7 +997,7 @@ void TQFont::setStrikeOut( bool enable )
}
/*!
- Returns TRUE if fixed pitch has been set; otherwise returns FALSE.
+ Returns true if fixed pitch has been set; otherwise returns false.
\sa setFixedPitch(), TQFontInfo::fixedPitch()
*/
@@ -1007,7 +1007,7 @@ bool TQFont::fixedPitch() const
}
/*!
- If \a enable is TRUE, sets fixed pitch on; otherwise sets fixed
+ If \a enable is true, sets fixed pitch on; otherwise sets fixed
pitch off.
\sa fixedPitch(), TQFontInfo
@@ -1017,7 +1017,7 @@ void TQFont::setFixedPitch( bool enable )
detach();
d->request.fixedPitch = enable;
- d->request.ignorePitch = FALSE;
+ d->request.ignorePitch = false;
d->mask |= TQFontPrivate::FixedPitch;
}
@@ -1220,7 +1220,7 @@ void TQFont::setStretch( int factor )
}
/*!
- If \a enable is TRUE, turns raw mode on; otherwise turns raw mode
+ If \a enable is true, turns raw mode on; otherwise turns raw mode
off. This function only has an effect under X11.
If raw mode is enabled, TQt will search for an X font with a
@@ -1246,7 +1246,7 @@ void TQFont::setRawMode( bool enable )
}
/*!
- Returns TRUE if a window system font exactly matching the settings
+ Returns true if a window system font exactly matching the settings
of this font is available.
\sa TQFontInfo
@@ -1263,8 +1263,8 @@ bool TQFont::exactMatch() const
}
/*!
- Returns TRUE if this font is equal to \a f; otherwise returns
- FALSE.
+ Returns true if this font is equal to \a f; otherwise returns
+ false.
Two TQFonts are considered equal if their font attributes are
equal. If rawMode() is enabled for both fonts, only the family
@@ -1281,8 +1281,8 @@ bool TQFont::operator==( const TQFont &f ) const
}
/*!
- Returns TRUE if this font is different from \a f; otherwise
- returns FALSE.
+ Returns true if this font is different from \a f; otherwise
+ returns false.
Two TQFonts are considered to be different if their font attributes
are different. If rawMode() is enabled for both fonts, only the
@@ -1296,7 +1296,7 @@ bool TQFont::operator!=( const TQFont &f ) const
}
/*!
- Returns TRUE if this font and \a f are copies of each other, i.e.
+ Returns true if this font and \a f are copies of each other, i.e.
one of them was created as a copy of the other and neither has
been modified since. This is much stricter than equality.
@@ -1308,8 +1308,8 @@ bool TQFont::isCopyOf( const TQFont & f ) const
}
/*!
- Returns TRUE if raw mode is used for font name matching; otherwise
- returns FALSE.
+ Returns true if raw mode is used for font name matching; otherwise
+ returns false.
\sa setRawMode() rawName()
*/
@@ -1402,9 +1402,9 @@ static void initFontSubst()
if (fontSubst)
return;
- fontSubst = new TQFontSubst(17, FALSE);
+ fontSubst = new TQFontSubst(17, false);
TQ_CHECK_PTR( fontSubst );
- fontSubst->setAutoDelete( TRUE );
+ fontSubst->setAutoDelete( true );
tqfont_cleanup_fontsubst.set(&fontSubst);
for ( int i=0; initTbl[i] != 0; i += 2 )
@@ -1662,7 +1662,7 @@ bool TQFont::fromString(const TQString &descrip)
descrip.isEmpty() ? "(empty)" : descrip.latin1());
#endif
- return FALSE;
+ return false;
}
setFamily(l[0]);
@@ -1688,7 +1688,7 @@ bool TQFont::fromString(const TQString &descrip)
setRawMode(l[9].toInt());
}
- return TRUE;
+ return true;
}
/*! \internal
@@ -2137,8 +2137,8 @@ int TQFontMetrics::maxWidth() const
}
/*!
- Returns TRUE if character \a ch is a valid character in the font;
- otherwise returns FALSE.
+ Returns true if character \a ch is a valid character in the font;
+ otherwise returns false.
*/
bool TQFontMetrics::inFont(TQChar ch) const
{
@@ -2150,7 +2150,7 @@ bool TQFontMetrics::inFont(TQChar ch) const
Q_ASSERT( engine != 0 );
#endif // QT_CHECK_STATE
- if ( engine->type() == TQFontEngine::Box ) return FALSE;
+ if ( engine->type() == TQFontEngine::Box ) return false;
return engine->canRender( &ch, 1 );
}
@@ -2181,7 +2181,7 @@ int TQFontMetrics::leftBearing(TQChar ch) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return gi.x;
@@ -2215,7 +2215,7 @@ int TQFontMetrics::rightBearing(TQChar ch) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return gi.xoff - gi.x - gi.width;
@@ -2266,7 +2266,7 @@ int TQFontMetrics::width( const TQString &str, int len ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( ch, 1, glyphs, advances, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
if ( uc < TQFontEngineData::widthCacheSize && advances[0] > 0 && advances[0] < 0x100 )
@@ -2395,7 +2395,7 @@ TQRect TQFontMetrics::boundingRect( TQChar ch ) const
glyph_t glyphs[10];
int nglyphs = 9;
- engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, 0, &nglyphs, false );
glyph_metrics_t gi = engine->boundingBox( glyphs[0] );
return TQRect( gi.x, gi.y, gi.width, gi.height );
}
@@ -2790,8 +2790,8 @@ int TQFontInfo::weight() const
/*!
\fn bool TQFontInfo::bold() const
- Returns TRUE if weight() would return a value greater than \c
- TQFont::Normal; otherwise returns FALSE.
+ Returns true if weight() would return a value greater than \c
+ TQFont::Normal; otherwise returns false.
\sa weight(), TQFont::bold()
*/
@@ -2856,9 +2856,9 @@ bool TQFontInfo::fixedPitch() const
glyph_t g[2];
int l = 2;
advance_t a[2];
- engine->stringToCMap(ch, 2, g, a, &l, FALSE);
+ engine->stringToCMap(ch, 2, g, a, &l, false);
engine->fontDef.fixedPitch = a[0] == a[1];
- engine->fontDef.fixedPitchComputed = TRUE;
+ engine->fontDef.fixedPitchComputed = true;
}
#endif
return engine->fontDef.fixedPitch;
@@ -2881,8 +2881,8 @@ TQFont::StyleHint TQFontInfo::styleHint() const
}
/*!
- Returns TRUE if the font is a raw mode font; otherwise returns
- FALSE.
+ Returns true if the font is a raw mode font; otherwise returns
+ false.
If it is a raw mode font, all other functions in TQFontInfo will
return the same values set in the TQFont, regardless of the font
@@ -2896,8 +2896,8 @@ bool TQFontInfo::rawMode() const
}
/*!
- Returns TRUE if the matched window system font is exactly the same
- as the one specified by the font; otherwise returns FALSE.
+ Returns true if the matched window system font is exactly the same
+ as the one specified by the font; otherwise returns false.
\sa TQFont::exactMatch()
*/
@@ -2936,7 +2936,7 @@ static TQSingleCleanupHandler<TQFontCache> cleanup_fontcache;
TQFontCache::TQFontCache()
: TQObject( tqApp, "global font cache" ), total_cost( 0 ), max_cost( min_cost ),
- current_timestamp( 0 ), fast( FALSE ), timer_id( -1 )
+ current_timestamp( 0 ), fast( false ), timer_id( -1 )
{
Q_ASSERT( instance == 0 );
instance = this;
@@ -3048,7 +3048,7 @@ void TQFontCache::increaseCost( uint cost )
if (timer_id != -1) killTimer( timer_id );
timer_id = startTimer( fast_timeout );
- fast = TRUE;
+ fast = true;
}
}
}
@@ -3145,7 +3145,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = -1;
- fast = FALSE;
+ fast = false;
return;
}
@@ -3220,7 +3220,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = startTimer( slow_timeout );
- fast = FALSE;
+ fast = false;
}
return;
@@ -3229,7 +3229,7 @@ void TQFontCache::timerEvent( TQTimerEvent * )
killTimer( timer_id );
timer_id = startTimer( fast_timeout );
- fast = TRUE;
+ fast = true;
}
max_cost = new_max_cost;
diff --git a/src/kernel/tqfont.h b/src/kernel/tqfont.h
index 435b604df..5ac1a2d4e 100644
--- a/src/kernel/tqfont.h
+++ b/src/kernel/tqfont.h
@@ -101,10 +101,10 @@ public:
// specific font
#ifdef Q_QDOC
TQFont( const TQString &family, int pointSize = 12, int weight = Normal,
- bool italic = FALSE );
+ bool italic = false );
#else
TQFont( const TQString &family, int pointSize = -1, int weight = -1,
- bool italic = FALSE );
+ bool italic = false );
#endif
// copy constructor
TQFont( const TQFont & );
diff --git a/src/kernel/tqfont_x11.cpp b/src/kernel/tqfont_x11.cpp
index 92cd8b113..4a91f65dc 100644
--- a/src/kernel/tqfont_x11.cpp
+++ b/src/kernel/tqfont_x11.cpp
@@ -69,7 +69,7 @@
#define TQFONTLOADER_DEBUG
#define TQFONTLOADER_DEBUG_VERBOSE
-TQ_EXPORT bool tqt_has_xft = FALSE;
+TQ_EXPORT bool tqt_has_xft = false;
#ifndef TQT_NO_XFTFREETYPE
TQt::HANDLE qt_xft_handle(const TQFont &font)
@@ -197,7 +197,7 @@ void TQFont::initialize()
#ifndef TQT_NO_CODECS
#ifndef TQT_NO_BIG_CODECS
- static bool codecs_once = FALSE;
+ static bool codecs_once = false;
if ( ! codecs_once ) {
(void) new TQFontJis0201Codec;
(void) new TQFontJis0208Codec;
@@ -208,7 +208,7 @@ void TQFont::initialize()
(void) new TQFontBig5Codec;
(void) new TQFontBig5hkscsCodec;
(void) new TQFontLaoCodec;
- codecs_once = TRUE;
+ codecs_once = true;
}
#endif // TQT_NO_BIG_CODECS
#endif // TQT_NO_CODECS
@@ -419,8 +419,8 @@ void TQFontPrivate::load( TQFont::Script script )
}
/*!
- Returns TRUE if the font attributes have been changed and the font
- has to be (re)loaded; otherwise returns FALSE.
+ Returns true if the font attributes have been changed and the font
+ has to be (re)loaded; otherwise returns false.
*/
bool TQFont::dirty() const
{
@@ -507,7 +507,7 @@ void TQFont::setRawName( const TQString &name )
#endif // QT_CHECK_STATE
setFamily( name );
- setRawMode( TRUE );
+ setRawMode( true );
} else {
d->mask = TQFontPrivate::Complete;
}
@@ -581,7 +581,7 @@ static const char * const tryFonts[] = {
0
};
-// Returns TRUE if the font exists, FALSE otherwise
+// Returns true if the font exists, false otherwise
static bool fontExists( const TQString &fontName )
{
int count;
@@ -666,7 +666,7 @@ int TQFontMetrics::width( TQChar ch ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( &ch, 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, 1, glyphs, advances, &nglyphs, false );
// ### can nglyphs != 1 happen at all? Not currently I think
if ( uc < TQFontEngineData::widthCacheSize && advances[0] > 0 && advances[0] < 0x100 )
@@ -720,7 +720,7 @@ int TQFontMetrics::charWidth( const TQString &str, int pos ) const
glyph_t glyphs[8];
advance_t advances[8];
int nglyphs = 7;
- engine->stringToCMap( &ch, isSurrogate ? 2 : 1, glyphs, advances, &nglyphs, FALSE );
+ engine->stringToCMap( &ch, isSurrogate ? 2 : 1, glyphs, advances, &nglyphs, false );
width = advances[0];
}
if ( uc < TQFontEngineData::widthCacheSize && width > 0 && width < 0x100 )
diff --git a/src/kernel/tqfontdata_p.h b/src/kernel/tqfontdata_p.h
index 6b42c6bcf..89efd70d4 100644
--- a/src/kernel/tqfontdata_p.h
+++ b/src/kernel/tqfontdata_p.h
@@ -67,10 +67,10 @@ struct TQFontDef
inline TQFontDef()
: pointSize( -1 ), pixelSize( -1 ),
styleHint( TQFont::AnyStyle ), styleStrategy( TQFont::PreferDefault ),
- weight( 50 ), italic( FALSE ), fixedPitch( FALSE ), stretch( 100 ),
- ignorePitch(TRUE)
+ weight( 50 ), italic( false ), fixedPitch( false ), stretch( 100 ),
+ ignorePitch(true)
#ifdef TQ_WS_MAC
- ,fixedPitchComputed(FALSE)
+ ,fixedPitchComputed(false)
#endif
{
}
@@ -111,7 +111,7 @@ struct TQFontDef
if ( addStyle != other.addStyle ) return addStyle < other.addStyle;
#endif // TQ_WS_X11
- return FALSE;
+ return false;
}
};
diff --git a/src/kernel/tqfontdatabase.cpp b/src/kernel/tqfontdatabase.cpp
index bda119a03..26a2c00c0 100644
--- a/src/kernel/tqfontdatabase.cpp
+++ b/src/kernel/tqfontdatabase.cpp
@@ -59,14 +59,14 @@
#ifdef TQFONTDATABASE_DEBUG
# define FD_DEBUG tqDebug
#else
-# define FD_DEBUG if (FALSE) tqDebug
+# define FD_DEBUG if (false) tqDebug
#endif
//#define FONT_MATCH_DEBUG
#ifdef FONT_MATCH_DEBUG
# define FM_DEBUG tqDebug
#else
-# define FM_DEBUG if (FALSE) tqDebug
+# define FM_DEBUG if (false) tqDebug
#endif
#if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
@@ -144,7 +144,7 @@ struct TQtFontSize
int count;
TQtFontEncoding *encodings;
TQtFontEncoding *encodingID( int id, uint xpoint = 0, uint xres = 0,
- uint yres = 0, uint avgwidth = 0, bool add = FALSE);
+ uint yres = 0, uint avgwidth = 0, bool add = false);
#endif // TQ_WS_X11
};
@@ -179,7 +179,7 @@ struct TQtFontStyle
{
struct Key {
Key( const TQString &styleString );
- Key() : italic( FALSE ), oblique( FALSE ),
+ Key() : italic( false ), oblique( false ),
weight( TQFont::Normal ), stretch( 0 ) { }
Key( const Key &o ) : italic( o.italic ), oblique( o.oblique ),
weight( o.weight ), stretch( o.stretch ) { }
@@ -205,8 +205,8 @@ struct TQtFontStyle
};
TQtFontStyle( const Key &k )
- : key( k ), bitmapScalable( FALSE ), smoothScalable( FALSE ),
- fakeOblique( FALSE ), count( 0 ), pixelSizes( 0 )
+ : key( k ), bitmapScalable( false ), smoothScalable( false ),
+ fakeOblique( false ), count( 0 ), pixelSizes( 0 )
{
#if defined(TQ_WS_X11)
weightName = setwidthName = 0;
@@ -235,18 +235,18 @@ struct TQtFontStyle
const char *setwidthName;
#endif // TQ_WS_X11
- TQtFontSize *pixelSize( unsigned short size, bool = FALSE );
+ TQtFontSize *pixelSize( unsigned short size, bool = false );
};
TQtFontStyle::Key::Key( const TQString &styleString )
- : italic( FALSE ), oblique( FALSE ), weight( TQFont::Normal ), stretch( 0 )
+ : italic( false ), oblique( false ), weight( TQFont::Normal ), stretch( 0 )
{
weight = getFontWeight( styleString );
if ( styleString.contains( "Italic" ) )
- italic = TRUE;
+ italic = true;
else if ( styleString.contains( "Oblique" ) )
- oblique = TRUE;
+ oblique = true;
}
TQtFontSize *TQtFontStyle::pixelSize( unsigned short size, bool add )
@@ -283,7 +283,7 @@ struct TQtFontFoundry
int count;
TQtFontStyle **styles;
- TQtFontStyle *style( const TQtFontStyle::Key &, bool = FALSE );
+ TQtFontStyle *style( const TQtFontStyle::Key &, bool = false );
};
TQtFontStyle *TQtFontFoundry::style( const TQtFontStyle::Key &key, bool create )
@@ -327,17 +327,17 @@ struct TQtFontFamily
TQtFontFamily(const TQString &n )
:
#ifdef TQ_WS_X11
- fixedPitch( TRUE ), hasXft( FALSE ), xftScriptCheck( FALSE ), xlfdLoaded( FALSE ), synthetic(FALSE),
+ fixedPitch( true ), hasXft( false ), xftScriptCheck( false ), xlfdLoaded( false ), synthetic(false),
#else
- fixedPitch( FALSE ),
+ fixedPitch( false ),
#endif
#ifdef TQ_WS_WIN
- scriptCheck( FALSE ),
+ scriptCheck( false ),
#endif
#if defined(Q_OS_MAC)
- fixedPitchComputed(FALSE),
+ fixedPitchComputed(false),
#endif
- fullyLoaded( FALSE ),
+ fullyLoaded( false ),
name( n ), count( 0 ), foundries( 0 ) {
memset( scripts, 0, sizeof( scripts ) );
}
@@ -378,7 +378,7 @@ struct TQtFontFamily
unsigned char scripts[TQFont::LastPrivateScript];
- TQtFontFoundry *foundry( const TQString &f, bool = FALSE );
+ TQtFontFoundry *foundry( const TQString &f, bool = false );
};
TQtFontFoundry *TQtFontFamily::foundry( const TQString &f, bool create )
@@ -410,7 +410,7 @@ public:
delete families[count];
free( families );
}
- TQtFontFamily *family( const TQString &f, bool = FALSE );
+ TQtFontFamily *family( const TQString &f, bool = false );
int count;
TQtFontFamily **families;
@@ -611,7 +611,7 @@ static inline bool requiresOpenType(TQFont::Script s)
static inline bool canRender( TQFontEngine *fe, TQFont::Script script )
{
- if ( !fe ) return FALSE;
+ if ( !fe ) return false;
bool hasChar = true;
@@ -635,7 +635,7 @@ static inline bool canRender( TQFontEngine *fe, TQFont::Script script )
if (hasChar && requiresOpenType(script)) {
TQOpenType *ot = fe->openType();
if (!ot || !ot->supportsScript(script))
- return FALSE;
+ return false;
}
#endif
@@ -924,7 +924,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
if ( fp->rawMode ) {
fe = loadEngine( script, fp, request, 0, 0, 0
#ifdef TQ_WS_X11
- , 0, 0, FALSE
+ , 0, 0, false
#endif
);
@@ -995,7 +995,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
script, scriptName( script ).latin1(),
request.weight, request.italic, request.stretch, request.pixelSize, pitch );
- bool usesFontConfig = FALSE;
+ bool usesFontConfig = false;
if (family_name.isEmpty()
|| family_name == "Sans Serif"
|| family_name == "Serif"
@@ -1168,7 +1168,7 @@ TQFontDatabase::findFont( TQFont::Script script, const TQFontPrivate *fp,
fe->fontDef.italic = best_style->key.italic || best_style->key.oblique;
fe->fontDef.fixedPitch = best_family->fixedPitch;
fe->fontDef.stretch = best_style->key.stretch;
- fe->fontDef.ignorePitch = FALSE;
+ fe->fontDef.ignorePitch = false;
}
}
@@ -1282,7 +1282,7 @@ static TQString styleString( int weight, bool italic, bool oblique )
TQString TQFontDatabase::styleString( const TQFont &f )
{
// ### fix oblique here
- return ::styleString( f.weight(), f.italic(), FALSE );
+ return ::styleString( f.weight(), f.italic(), false );
}
@@ -1544,7 +1544,7 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const
for ( int k = 0; k < foundry->count; k++ ) {
TQtFontStyle::Key ke( foundry->styles[k]->key );
ke.stretch = 0;
- allStyles.style( ke, TRUE );
+ allStyles.style( ke, true );
}
}
}
@@ -1557,8 +1557,8 @@ TQStringList TQFontDatabase::styles( const TQString &family ) const
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is fixed pitch; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is fixed pitch; otherwise returns false.
*/
bool TQFontDatabase::isFixedPitch(const TQString &family,
@@ -1577,7 +1577,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
if (!f->fixedPitchComputed) {
TQFontMetrics fm(familyName);
f->fixedPitch = fm.width('i') == fm.width('m');
- f->fixedPitchComputed = TRUE;
+ f->fixedPitchComputed = true;
}
}
#endif
@@ -1586,8 +1586,8 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is a scalable bitmap font; otherwise returns FALSE. Scaling
+ Returns true if the font that has family \a family and style \a
+ style is a scalable bitmap font; otherwise returns false. Scaling
a bitmap font usually produces an unattractive hardly readable
result, because the pixels of the font are scaled. If you need to
scale a bitmap font it is better to scale it to one of the fixed
@@ -1598,7 +1598,7 @@ bool TQFontDatabase::isFixedPitch(const TQString &family,
bool TQFontDatabase::isBitmapScalable( const TQString &family,
const TQString &style) const
{
- bool bitmapScalable = FALSE;
+ bool bitmapScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1615,7 +1615,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
for ( int k = 0; k < foundry->count; k++ )
if ((style.isEmpty() || foundry->styles[k]->key == styleKey) &&
foundry->styles[k]->bitmapScalable && !foundry->styles[k]->smoothScalable) {
- bitmapScalable = TRUE;
+ bitmapScalable = true;
goto end;
}
}
@@ -1626,9 +1626,9 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is smoothly scalable; otherwise returns FALSE. If this
- function returns TRUE, it's safe to scale this font to any size,
+ Returns true if the font that has family \a family and style \a
+ style is smoothly scalable; otherwise returns false. If this
+ function returns true, it's safe to scale this font to any size,
and the result will always look attractive.
\sa isScalable(), isBitmapScalable()
@@ -1636,7 +1636,7 @@ bool TQFontDatabase::isBitmapScalable( const TQString &family,
bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
const TQString &style) const
{
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1652,7 +1652,7 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
if ((style.isEmpty() || foundry->styles[k]->key == styleKey) && foundry->styles[k]->smoothScalable) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
}
@@ -1662,8 +1662,8 @@ bool TQFontDatabase::isSmoothlyScalable( const TQString &family,
}
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is scalable; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is scalable; otherwise returns false.
\sa isBitmapScalable(), isSmoothlyScalable()
*/
@@ -1671,7 +1671,7 @@ bool TQFontDatabase::isScalable( const TQString &family,
const TQString &style) const
{
if ( isSmoothlyScalable( family, style) )
- return TRUE;
+ return true;
return isBitmapScalable( family, style);
}
@@ -1692,7 +1692,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
Q_UNUSED( style );
return standardSizes();
#else
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1712,7 +1712,7 @@ TQValueList<int> TQFontDatabase::pointSizes( const TQString &family,
if ( !style ) continue;
if ( style->smoothScalable ) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
for ( int l = 0; l < style->count; l++ ) {
@@ -1761,7 +1761,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style,
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1771,7 +1771,7 @@ TQFont TQFontDatabase::font( const TQString &family, const TQString &style,
if ( !s ) // no styles found?
return TQApplication::font();
return TQFont( family, pointSize, s->key.weight,
- s->key.italic ? TRUE : s->key.oblique ? TRUE : FALSE );
+ s->key.italic ? true : s->key.oblique );
}
@@ -1791,7 +1791,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
Q_UNUSED( style );
return TQFontDatabase::standardSizes();
#else
- bool smoothScalable = FALSE;
+ bool smoothScalable = false;
TQString familyName, foundryName;
parseFontName( family, foundryName, familyName );
@@ -1813,7 +1813,7 @@ TQValueList<int> TQFontDatabase::smoothSizes( const TQString &family,
if ( !style ) continue;
if ( style->smoothScalable ) {
- smoothScalable = TRUE;
+ smoothScalable = true;
goto end;
}
for ( int l = 0; l < style->count; l++ ) {
@@ -1858,8 +1858,8 @@ TQValueList<int> TQFontDatabase::standardSizes()
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is italic; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is italic; otherwise returns false.
\sa weight(), bold()
*/
@@ -1873,13 +1873,13 @@ bool TQFontDatabase::italic( const TQString &family,
TQtFontFoundry allStyles( foundryName );
TQtFontFamily *f = d->family( familyName );
- if ( !f ) return FALSE;
+ if ( !f ) return false;
for ( int j = 0; j < f->count; j++ ) {
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() || ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1890,8 +1890,8 @@ bool TQFontDatabase::italic( const TQString &family,
/*!
- Returns TRUE if the font that has family \a family and style \a
- style is bold; otherwise returns FALSE.
+ Returns true if the font that has family \a family and style \a
+ style is bold; otherwise returns false.
\sa italic(), weight()
*/
@@ -1905,14 +1905,14 @@ bool TQFontDatabase::bold( const TQString &family,
TQtFontFoundry allStyles( foundryName );
TQtFontFamily *f = d->family( familyName );
- if ( !f ) return FALSE;
+ if ( !f ) return false;
for ( int j = 0; j < f->count; j++ ) {
TQtFontFoundry *foundry = f->foundries[j];
if ( foundryName.isEmpty() ||
ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
@@ -1946,7 +1946,7 @@ int TQFontDatabase::weight( const TQString &family,
if ( foundryName.isEmpty() ||
ucstricmp( foundry->name, foundryName ) == 0 ) {
for ( int k = 0; k < foundry->count; k++ )
- allStyles.style( foundry->styles[k]->key, TRUE );
+ allStyles.style( foundry->styles[k]->key, true );
}
}
diff --git a/src/kernel/tqfontdatabase_x11.cpp b/src/kernel/tqfontdatabase_x11.cpp
index ee7387387..b26842fc7 100644
--- a/src/kernel/tqfontdatabase_x11.cpp
+++ b/src/kernel/tqfontdatabase_x11.cpp
@@ -61,7 +61,7 @@
#ifdef TQFONTDATABASE_DEBUG
# define FD_DEBUG tqDebug
#else
-# define FD_DEBUG if (FALSE) tqDebug
+# define FD_DEBUG if (false) tqDebug
#endif // TQFONTDATABASE_DEBUG
// from tqfont_x11.cpp
@@ -71,7 +71,7 @@ extern double qt_pixelSize(double pointSize, TQPaintDevice *paintdevice, int scr
static inline void capitalize ( char *s )
{
- bool space = TRUE;
+ bool space = true;
while( *s ) {
if ( space )
*s = toupper( *s );
@@ -535,7 +535,7 @@ static bool parseXFontName( char *fontName, char **tokens )
{
if ( ! fontName || fontName[0] == '0' || fontName[0] != '-' ) {
tokens[0] = 0;
- return FALSE;
+ return false;
}
int i;
@@ -557,10 +557,10 @@ static bool parseXFontName( char *fontName, char **tokens )
if ( i < NFontFields ) {
for ( int j = i ; j < NFontFields; ++j )
tokens[j] = 0;
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static inline bool isZero(char *x)
@@ -593,7 +593,7 @@ static inline bool isFixedPitch( char **tokens )
Fills in a font definition (TQFontDef) from an XLFD (X Logical Font
Description).
- Returns TRUE if the the given xlfd is valid. The fields lbearing
+ Returns true if the the given xlfd is valid. The fields lbearing
and rbearing are not given any values.
*/
bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
@@ -601,7 +601,7 @@ bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
char *tokens[NFontFields];
TQCString buffer = xlfd.copy();
if ( ! parseXFontName(buffer.data(), tokens) )
- return FALSE;
+ return false;
capitalize(tokens[Family]);
capitalize(tokens[Foundry]);
@@ -638,14 +638,14 @@ bool qt_fillFontDef( const TQCString &xlfd, TQFontDef *fd, int screen )
fd->pixelSize = tqRound(qt_pixelSize(fd->pointSize / 10., 0, screen));
}
- return TRUE;
+ return true;
}
/*
Fills in a font definition (TQFontDef) from the font properties in an
XFontStruct.
- Returns TRUE if the TQFontDef could be filled with properties from
+ Returns true if the TQFontDef could be filled with properties from
the XFontStruct. The fields lbearing and rbearing are not given any
values.
*/
@@ -653,7 +653,7 @@ static bool qt_fillFontDef( XFontStruct *fs, TQFontDef *fd, int screen )
{
unsigned long value;
if ( fs && !XGetFontProperty( fs, XA_FONT, &value ) )
- return FALSE;
+ return false;
char *n = XGetAtomName( TQPaintDevice::x11AppDisplay(), value );
TQCString xlfd( n );
@@ -674,14 +674,14 @@ static TQtFontStyle::Key getStyle( char ** tokens )
char slant1 = tolower( (uchar) tokens[Slant][1] );
if ( slant1 == 'o' )
- key.oblique = TRUE;
+ key.oblique = true;
else if ( slant1 == 'i' )
- key.italic = TRUE;
+ key.italic = true;
}
} else if ( slant0 == 'o' )
- key.oblique = TRUE;
+ key.oblique = true;
else if ( slant0 == 'i' )
- key.italic = TRUE;
+ key.italic = true;
key.weight = getFontWeight( tokens[Weight] );
@@ -702,7 +702,7 @@ static TQtFontStyle::Key getStyle( char ** tokens )
extern bool tqt_has_xft; // defined in tqfont_x11.cpp
-static bool xlfdsFullyLoaded = FALSE;
+static bool xlfdsFullyLoaded = false;
static unsigned char encodingLoaded[numEncodings];
static void loadXlfds( const char *reqFamily, int encoding_id )
@@ -748,13 +748,13 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
capitalize( foundryName );
TQtFontStyle::Key styleKey = getStyle( tokens );
- bool smooth_scalable = FALSE;
- bool bitmap_scalable = FALSE;
+ bool smooth_scalable = false;
+ bool bitmap_scalable = false;
if ( isScalable(tokens) ) {
if ( isSmoothlyScalable( tokens ) )
- smooth_scalable = TRUE;
+ smooth_scalable = true;
else
- bitmap_scalable = TRUE;
+ bitmap_scalable = true;
}
uint pixelSize = atoi( tokens[PixelSize] );
uint xpointSize = atoi( tokens[PointSize] );
@@ -773,10 +773,10 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
continue;
}
- TQtFontFamily *family = fontFamily ? fontFamily : db->family( familyName, TRUE );
+ TQtFontFamily *family = fontFamily ? fontFamily : db->family( familyName, true );
family->fontFileIndex = -1;
- TQtFontFoundry *foundry = family->foundry( foundryName, TRUE );
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
+ TQtFontFoundry *foundry = family->foundry( foundryName, true );
+ TQtFontStyle *style = foundry->style( styleKey, true );
delete [] style->weightName;
style->weightName = tqstrdup( tokens[Weight] );
@@ -784,18 +784,18 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
style->setwidthName = tqstrdup( tokens[Width] );
if ( smooth_scalable ) {
- style->smoothScalable = TRUE;
- style->bitmapScalable = FALSE;
+ style->smoothScalable = true;
+ style->bitmapScalable = false;
pixelSize = SMOOTH_SCALABLE;
}
if ( !style->smoothScalable && bitmap_scalable )
- style->bitmapScalable = TRUE;
+ style->bitmapScalable = true;
if ( !fixedPitch )
- family->fixedPitch = FALSE;
+ family->fixedPitch = false;
- TQtFontSize *size = style->pixelSize( pixelSize, TRUE );
+ TQtFontSize *size = style->pixelSize( pixelSize, true );
TQtFontEncoding *enc =
- size->encodingID( encoding_id, xpointSize, xres, yres, avgwidth, TRUE );
+ size->encodingID( encoding_id, xpointSize, xres, yres, avgwidth, true );
enc->pitch = *tokens[Spacing];
if ( !enc->pitch ) enc->pitch = '*';
@@ -806,14 +806,14 @@ static void loadXlfds( const char *reqFamily, int encoding_id )
family->scripts[script] |= TQtFontFamily::UnSupported_Xlfd;
}
if ( encoding_id == -1 )
- family->xlfdLoaded = TRUE;
+ family->xlfdLoaded = true;
}
if ( !reqFamily ) {
// mark encoding as loaded
if ( encoding_id == -1 )
- xlfdsFullyLoaded = TRUE;
+ xlfdsFullyLoaded = true;
else
- encodingLoaded[encoding_id] = TRUE;
+ encodingLoaded[encoding_id] = true;
}
XFreeFontNames( fontList );
@@ -847,20 +847,20 @@ static void loadXft()
bool fixed;
};
const XftDefaultFont defaults[] = {
- { "Serif", "serif", FALSE },
- { "Sans Serif", "sans-serif", FALSE },
- { "Monospace", "monospace", TRUE },
- { 0, 0, FALSE }
+ { "Serif", "serif", false },
+ { "Sans Serif", "sans-serif", false },
+ { "Monospace", "monospace", true },
+ { 0, 0, false }
};
const XftDefaultFont *f = defaults;
while (f->qtname) {
- TQtFontFamily *family = db->family( f->qtname, TRUE );
+ TQtFontFamily *family = db->family( f->qtname, true );
family->fixedPitch = f->fixed;
family->rawName = f->rawname;
- family->hasXft = TRUE;
- family->synthetic = TRUE;
+ family->hasXft = true;
+ family->synthetic = true;
TQtFontFoundry *foundry
- = family->foundry( TQString::null, TRUE );
+ = family->foundry( TQString::null, true );
for ( int i = 0; i < TQFont::LastPrivateScript; ++i ) {
if (i == TQFont::UnknownScript)
@@ -869,14 +869,14 @@ static void loadXft()
}
TQtFontStyle::Key styleKey;
- styleKey.oblique = FALSE;
+ styleKey.oblique = false;
for (int i = 0; i < 4; ++i) {
styleKey.italic = (i%2);
styleKey.weight = (i > 1) ? TQFont::Bold : TQFont::Normal;
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
- style->smoothScalable = TRUE;
- TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE, TRUE );
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontStyle *style = foundry->style( styleKey, true );
+ style->smoothScalable = true;
+ TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE, true );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
enc->pitch = (f->fixed ? 'm' : 'p');
}
++f;
@@ -893,29 +893,29 @@ static void checkXftMatrix( TQtFontFamily* family ) {
TQtFontSize *size = style->pixelSize( SMOOTH_SCALABLE );
if ( ! size ) continue;
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
if ( ! enc ) continue;
TQtFontStyle::Key key = style->key;
// does this style have an italic equivalent?
- key.italic = TRUE;
+ key.italic = true;
TQtFontStyle *equiv = foundry->style( key );
if ( equiv ) continue;
// does this style have an oblique equivalent?
- key.italic = FALSE;
- key.oblique = TRUE;
+ key.italic = false;
+ key.oblique = true;
equiv = foundry->style( key );
if ( equiv ) continue;
// let's fake one...
- equiv = foundry->style( key, TRUE );
- equiv->fakeOblique = TRUE;
- equiv->smoothScalable = TRUE;
+ equiv = foundry->style( key, true );
+ equiv->fakeOblique = true;
+ equiv->smoothScalable = true;
- TQtFontSize *equiv_size = equiv->pixelSize( SMOOTH_SCALABLE, TRUE );
- TQtFontEncoding *equiv_enc = equiv_size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontSize *equiv_size = equiv->pixelSize( SMOOTH_SCALABLE, true );
+ TQtFontEncoding *equiv_enc = equiv_size->encodingID( -1, 0, 0, 0, 0, true );
// keep the same pitch
equiv_enc->pitch = enc->pitch;
@@ -958,9 +958,9 @@ static bool loadXftFont( FcPattern* font )
FcPatternGetBool(font, FC_SCALABLE, 0, &scalable);
foundry_value = 0;
XftPatternGetString(font, FC_FOUNDRY, 0, &foundry_value);
- TQtFontFamily *family = db->family( familyName, TRUE );
+ TQtFontFamily *family = db->family( familyName, true );
family->rawName = rawName;
- family->hasXft = TRUE;
+ family->hasXft = true;
FcCharSet *charset = 0;
FcResult res = FcPatternGetCharSet(font, FC_CHARSET, 0, &charset);
@@ -979,7 +979,7 @@ static bool loadXftFont( FcPattern* font )
family->scripts[i] |= TQtFontFamily::UnSupported_Xft;
}
}
- family->xftScriptCheck = TRUE;
+ family->xftScriptCheck = true;
} else {
// we set UnknownScript to supported for symbol fonts. It makes no sense to merge these
// with other ones, as they are special in a way.
@@ -1005,23 +1005,23 @@ static bool loadXftFont( FcPattern* font )
}
TQtFontFoundry *foundry
- = family->foundry( foundry_value ? TQString::fromUtf8(foundry_value) : TQString::null, TRUE );
- TQtFontStyle *style = foundry->style( styleKey, TRUE );
+ = family->foundry( foundry_value ? TQString::fromUtf8(foundry_value) : TQString::null, true );
+ TQtFontStyle *style = foundry->style( styleKey, true );
if (spacing_value < XFT_MONO )
- family->fixedPitch = FALSE;
+ family->fixedPitch = false;
TQtFontSize *size;
if (scalable) {
- style->smoothScalable = TRUE;
- size = style->pixelSize( SMOOTH_SCALABLE, TRUE );
+ style->smoothScalable = true;
+ size = style->pixelSize( SMOOTH_SCALABLE, true );
}
else {
double pixel_size = 0;
XftPatternGetDouble (font, FC_PIXEL_SIZE, 0, &pixel_size);
- size = style->pixelSize( (int)pixel_size, TRUE );
+ size = style->pixelSize( (int)pixel_size, true );
}
- TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
+ TQtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, true );
enc->pitch = ( spacing_value >= XFT_CHARCELL ? 'c' :
( spacing_value >= XFT_MONO ? 'm' : 'p' ) );
@@ -1071,7 +1071,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
}
}
} else {
- TQtFontFamily *f = db->family( family, TRUE );
+ TQtFontFamily *f = db->family( family, true );
if ( !f->fullyLoaded ) {
#ifndef TQT_NO_XFTFREETYPE
@@ -1097,7 +1097,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
mfamily.replace(TQChar(' '), TQChar('-'));
goto redo;
}
- f->fullyLoaded = TRUE;
+ f->fullyLoaded = true;
return;
}
#endif // TQT_NO_XFTFREETYPE
@@ -1107,7 +1107,7 @@ static void load( const TQString &family = TQString::null, int script = -1 )
( !f->hasXft && !(f->scripts[script] & TQtFontFamily::Supported) &&
!(f->scripts[script] & TQtFontFamily::UnSupported_Xlfd) ) ) {
loadXlfds( family, -1 );
- f->fullyLoaded = TRUE;
+ f->fullyLoaded = true;
}
}
}
@@ -1531,7 +1531,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
key.weight = request.weight;
key.stretch = request.stretch;
- double scale = addPatternProps(pattern, key, FALSE, TRUE, fp, request);
+ double scale = addPatternProps(pattern, key, false, true, fp, request);
#ifdef FONT_MATCH_DEBUG
tqDebug("original pattern contains:");
FcPatternPrint(pattern);
@@ -1666,7 +1666,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
XftPattern *pattern = XftPatternDuplicate(font);
// add properties back in as the font selected from the list doesn't contain them.
- addPatternProps(pattern, key, FALSE, TRUE, fp, request);
+ addPatternProps(pattern, key, false, true, fp, request);
XftPattern *result =
XftFontMatch( TQPaintDevice::x11AppDisplay(), fp->screen, pattern, &res );
@@ -1720,7 +1720,7 @@ static TQFontEngine *loadFontConfigFont(const TQFontPrivate *fp, const TQFontDef
XftPatternGetInteger(xft->pattern(), XFT_SPACING, 0, &spacing);
xft->fontDef.fixedPitch = spacing != XFT_PROPORTIONAL;
- xft->fontDef.ignorePitch = FALSE;
+ xft->fontDef.ignorePitch = false;
break;
}
}
diff --git a/src/kernel/tqfontengine_p.h b/src/kernel/tqfontengine_p.h
index 86fdda8f0..e7d7f2162 100644
--- a/src/kernel/tqfontengine_p.h
+++ b/src/kernel/tqfontengine_p.h
@@ -434,7 +434,7 @@ public:
void selectScript(unsigned int script, const Features *features = 0);
bool shape(TQShaperItem *item, const unsigned int *properties = 0);
- bool positionAndAdd(TQShaperItem *item, bool doLogClusters = TRUE);
+ bool positionAndAdd(TQShaperItem *item, bool doLogClusters = true);
OTL_GlyphItem glyphs() const { return otl_buffer->in_string; }
int len() const { return otl_buffer->in_length; }
diff --git a/src/kernel/tqfontengine_x11.cpp b/src/kernel/tqfontengine_x11.cpp
index aa116b93d..9276a5a93 100644
--- a/src/kernel/tqfontengine_x11.cpp
+++ b/src/kernel/tqfontengine_x11.cpp
@@ -71,17 +71,17 @@ static void drawLines( TQPainter *p, TQFontEngine *fe, int baseline, int x1, int
int lw = fe->lineThickness();
if ( textFlags & TQt::Underline ) {
int pos = fe->underlinePosition();
- qt_draw_transformed_rect( p, x1, baseline+pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline+pos, w, lw, true );
}
if ( textFlags & TQt::Overline ) {
int pos = fe->ascent()+1;
if ( !pos ) pos = 1;
- qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, true );
}
if ( textFlags & TQt::StrikeOut ) {
int pos = fe->ascent()/3;
if ( !pos ) pos = 1;
- qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, TRUE );
+ qt_draw_transformed_rect( p, x1, baseline-pos, w, lw, true );
}
}
@@ -161,7 +161,7 @@ static void drawScaled(int x, int y, const TQTextEngine *engine, const TQScriptI
mat1.scale(scale, scale);
w += h; // add some pixels to width because of italic correction
- TQBitmap bm( w, h, TRUE ); // create bitmap
+ TQBitmap bm( w, h, true ); // create bitmap
TQPainter paint;
paint.begin( &bm ); // draw text in bitmap
fe->draw( &paint, 0, si->ascent/scale, engine, si, textFlags );
@@ -280,7 +280,7 @@ void TQFontEngineBox::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
int s = _size - 3;
for (int k = 0; k < si->num_glyphs; k++) {
if (!glyphAttributes[k].zeroWidth)
- qt_draw_transformed_rect( p, xp, yp, s, s, FALSE );
+ qt_draw_transformed_rect( p, xp, yp, s, s, false );
xp += _size;
}
} else {
@@ -383,7 +383,7 @@ const char *TQFontEngineBox::name() const
bool TQFontEngineBox::canRender( const TQChar *, int )
{
- return TRUE;
+ return true;
}
TQFontEngine::Type TQFontEngineBox::type() const
@@ -474,10 +474,10 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len,
}
if ( _codec ) {
- bool haveNbsp = FALSE;
+ bool haveNbsp = false;
for ( int i = 0; i < len; i++ )
if ( str[i].unicode() == 0xa0 ) {
- haveNbsp = TRUE;
+ haveNbsp = true;
break;
}
@@ -549,10 +549,10 @@ TQFontEngine::Error TQFontEngineXLFD::stringToCMap( const TQChar *str, int len,
extern "C" {
#endif
-static bool x_font_load_error = FALSE;
+static bool x_font_load_error = false;
static int x_font_errorhandler(Display *, XErrorEvent *)
{
- x_font_load_error = TRUE;
+ x_font_load_error = true;
return 0;
}
@@ -572,7 +572,7 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
TQt::HANDLE hd = p->device()->handle();
GC gc = p->gc;
- bool transform = FALSE;
+ bool transform = false;
int xorig = x;
int yorig = y;
@@ -644,10 +644,10 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
//tqDebug("m: %2.2f %2.2f %2.2f %2.2f, matrix=%s", p->m11(), p->m12(), p->m21(), p->m22(), matrix.data());
xlfd_transformed.replace( pos, endPos-pos, matrix );
- x_font_load_error = FALSE;
+ x_font_load_error = false;
XErrorHandler old_handler = XSetErrorHandler( x_font_errorhandler );
font_id = XLoadFont( dpy, xlfd_transformed.data() );
- XSync( dpy, FALSE );
+ XSync( dpy, false );
XSetErrorHandler( old_handler );
if ( x_font_load_error ) {
//tqDebug( "couldn't load transformed font" );
@@ -673,7 +673,7 @@ void TQFontEngineXLFD::draw( TQPainter *p, int x, int y, const TQTextEngine *eng
_scale = tmp;
return;
}
- transform = TRUE;
+ transform = true;
} else if ( p->txop == TQPainter::TxTranslate ) {
p->map( x, y, &x, &y );
}
@@ -942,15 +942,15 @@ bool TQFontEngineXLFD::canRender( const TQChar *string, int len )
glyph_t glyphs[256];
int nglyphs = 255;
glyph_t *g = glyphs;
- if ( stringToCMap( string, len, g, 0, &nglyphs, FALSE ) == OutOfMemory ) {
+ if ( stringToCMap( string, len, g, 0, &nglyphs, false ) == OutOfMemory ) {
g = (glyph_t *)malloc( nglyphs*sizeof(glyph_t) );
- stringToCMap( string, len, g, 0, &nglyphs, FALSE );
+ stringToCMap( string, len, g, 0, &nglyphs, false );
}
- bool allExist = TRUE;
+ bool allExist = true;
for ( int i = 0; i < nglyphs; i++ ) {
if ( !g[i] || !charStruct( _fs, g[i] ) ) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -1029,10 +1029,10 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
int i;
for ( i = 0; i < mib_count; ++i ) {
const int mib = qt_mib_for_xlfd_encoding( alternate_encodings[i] );
- bool skip = FALSE;
+ bool skip = false;
for ( int e = 0; e < _count; ++e ) {
if ( _engines[e]->cmap() == mib ) {
- skip = TRUE;
+ skip = true;
break;
}
}
@@ -1080,7 +1080,7 @@ void TQFontEngineLatinXLFD::findEngine( const TQChar &ch )
chars[i] = i;
chars[0x200] = 0x20ac;
int glyphCount = 0x201;
- engine->stringToCMap( (const TQChar *) chars, 0x201, glyphs, advances, &glyphCount, FALSE );
+ engine->stringToCMap( (const TQChar *) chars, 0x201, glyphs, advances, &glyphCount, false );
// merge member data with the above
for ( i = 0; i < 0x200; ++i ) {
@@ -1104,7 +1104,7 @@ TQFontEngineLatinXLFD::stringToCMap( const TQChar *str, int len, glyph_t *glyphs
}
int i;
- bool missing = FALSE;
+ bool missing = false;
const TQChar *c = str+len;
glyph_t *g = glyphs+len;
if ( advances ) {
@@ -1382,21 +1382,21 @@ const char *TQFontEngineLatinXLFD::name() const
bool TQFontEngineLatinXLFD::canRender( const TQChar *string, int len )
{
- bool all = TRUE;
+ bool all = true;
int i;
for ( i = 0; i < len; ++i ) {
if ( string[i].unicode() >= 0x200 ||
glyphIndices[string[i].unicode()] == 0 ) {
if (string[i].unicode() != 0x20ac || euroIndex == 0)
- all = FALSE;
+ all = false;
break;
}
}
if ( all )
- return TRUE;
+ return true;
- all = TRUE;
+ all = true;
for ( i = 0; i < len; ++i ) {
if ( string[i].unicode() >= 0x200 ) {
if (string[i].unicode() == 0x20ac) {
@@ -1407,14 +1407,14 @@ bool TQFontEngineLatinXLFD::canRender( const TQChar *string, int len )
if (euroIndex)
continue;
}
- all = FALSE;
+ all = false;
break;
}
if ( glyphIndices[string[i].unicode()] != 0 ) continue;
findEngine( string[i] );
if ( glyphIndices[string[i].unicode()] == 0 ) {
- all = FALSE;
+ all = false;
break;
}
}
@@ -1432,7 +1432,7 @@ void TQFontEngineLatinXLFD::setScale( double scale )
chars[i] = i;
int glyphCount = 0x200;
_engines[0]->stringToCMap( (const TQChar *)chars, 0x200,
- glyphIndices, glyphAdvances, &glyphCount, FALSE );
+ glyphIndices, glyphAdvances, &glyphCount, false );
}
@@ -1491,7 +1491,7 @@ TQFontEngineXft::TQFontEngineXft( XftFont *font, XftPattern *pattern, int cmap )
// if the Xft font is not antialiased, it uses bitmaps instead of
// 8-bit alpha maps... adjust the cache_cost to reflect this
- Bool antialiased = TRUE;
+ Bool antialiased = true;
if ( XftPatternGetBool( pattern, XFT_ANTIALIAS,
0, &antialiased ) == XftResultMatch &&
! antialiased ) {
@@ -1616,12 +1616,12 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
GlyphAttributes *glyphAttributes = engine->glyphAttributes( si );
XftFont *fnt = _font;
- bool transform = FALSE;
+ bool transform = false;
if ( p->txop >= TQPainter::TxScale || p->rop != TQt::CopyROP || _scale < 0.9999 || _scale > 1.001) {
bool can_scale = (_face->face_flags & FT_FACE_FLAG_SCALABLE) && p->rop == TQt::CopyROP;
double size = (p->m11()*p->m22() - p->m12()*p->m21())*_scale*_scale*fontDef.pixelSize*fontDef.pixelSize;
if (size > 256*256 || _scale < .9999 || _scale > 1.001)
- can_scale = FALSE;
+ can_scale = false;
if (!can_scale) {
// font doesn't support transformations, need to do it by hand
float tmp = _scale;
@@ -1686,7 +1686,7 @@ void TQFontEngineXft::draw( TQPainter *p, int x, int y, const TQTextEngine *engi
trf->next = transformed_fonts;
transformed_fonts = trf;
}
- transform = TRUE;
+ transform = true;
} else if ( p->txop == TQPainter::TxTranslate ) {
p->map( x, y, &x, &y );
}
@@ -1948,7 +1948,7 @@ int TQFontEngineXft::minRightBearing() const
TQChar *ch = (TQChar *)char_table;
glyph_t glyphs[char_table_entries];
int ng = char_table_entries;
- stringToCMap(ch, char_table_entries, glyphs, 0, &ng, FALSE);
+ stringToCMap(ch, char_table_entries, glyphs, 0, &ng, false);
while (--ng) {
if (glyphs[ng]) {
glyph_metrics_t gi = that->boundingBox( glyphs[ng] );
@@ -1980,14 +1980,14 @@ void TQFontEngineXft::setScale( double scale )
bool TQFontEngineXft::canRender( const TQChar *string, int len )
{
- bool allExist = TRUE;
+ bool allExist = true;
if (_cmap != -1) {
for ( int i = 0; i < len; i++ ) {
uint uc = getCodepoint(string, i, len);
if (!XftCharExists(0, _font, uc)
&& getAdobeCharIndex(_font, _cmap, uc) == 0) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -1995,7 +1995,7 @@ bool TQFontEngineXft::canRender( const TQChar *string, int len )
for ( int i = 0; i < len; i++ ) {
uint uc = getCodepoint(string, i, len);
if (!XftCharExists(0, _font, uc)) {
- allExist = FALSE;
+ allExist = false;
break;
}
}
@@ -2259,7 +2259,7 @@ bool TQOpenType::checkScript(unsigned int script)
if (requirements & RequiresGsub) {
if (!gsub)
- return FALSE;
+ return false;
FT_UShort script_index;
FT_Error error = TT_GSUB_Select_Script(gsub, tag, &script_index);
@@ -2267,13 +2267,13 @@ bool TQOpenType::checkScript(unsigned int script)
#ifdef OT_DEBUG
tqDebug("could not select script %d in GSub table: %d", (int)script, error);
#endif
- return FALSE;
+ return false;
}
}
if (requirements & RequiresGpos) {
if (!gpos)
- return FALSE;
+ return false;
FT_UShort script_index;
FT_Error error = TT_GPOS_Select_Script(gpos, script, &script_index);
@@ -2281,11 +2281,11 @@ bool TQOpenType::checkScript(unsigned int script)
#ifdef OT_DEBUG
tqDebug("could not select script in gpos table: %d", error);
#endif
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
@@ -2436,8 +2436,8 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
face = lockFTFace(static_cast<TQFontEngineXft *>(fontEngine)->font());
#endif
memset(otl_buffer->positions, 0, otl_buffer->in_length*sizeof(OTL_PositionRec));
- // #### check that passing "FALSE,FALSE" is correct
- TT_GPOS_Apply_String(face, gpos, loadFlags, otl_buffer, FALSE, FALSE);
+ // #### check that passing "false,false" is correct
+ TT_GPOS_Apply_String(face, gpos, loadFlags, otl_buffer, false, false);
#ifdef TQ_WS_X11
unlockFTFace(static_cast<TQFontEngineXft *>(fontEngine)->font());
#endif
@@ -2446,14 +2446,14 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
// make sure we have enough space to write everything back
if (item->num_glyphs < (int)otl_buffer->in_length) {
item->num_glyphs = otl_buffer->in_length;
- return FALSE;
+ return false;
}
for (unsigned int i = 0; i < otl_buffer->in_length; ++i) {
item->glyphs[i] = otl_buffer->in_string[i].gindex;
item->attributes[i] = tmpAttributes[otl_buffer->in_string[i].cluster];
if (i && otl_buffer->in_string[i].cluster == otl_buffer->in_string[i-1].cluster)
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].clusterStart = false;
}
item->num_glyphs = otl_buffer->in_length;
@@ -2519,7 +2519,7 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
// tqDebug(" ->\tadv=%d\tpos=(%d/%d)",
// glyphs[i].advance.x.toInt(), glyphs[i].offset.x.toInt(), glyphs[i].offset.y.toInt());
}
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else {
qt_heuristicPosition(item);
}
@@ -2539,7 +2539,7 @@ bool TQOpenType::positionAndAdd(TQShaperItem *item, bool doLogClusters)
item->offsets[i].x, item->offsets[i].y);
tqDebug("-----------------------------------------");
#endif
- return TRUE;
+ return true;
}
#endif
diff --git a/src/kernel/tqguardedptr.cpp b/src/kernel/tqguardedptr.cpp
index a08fe1aae..ab18f5ed2 100644
--- a/src/kernel/tqguardedptr.cpp
+++ b/src/kernel/tqguardedptr.cpp
@@ -147,9 +147,9 @@
\fn bool TQGuardedPtr::operator==( const TQGuardedPtr<T> &p ) const
Equality operator; implements traditional pointer semantics.
- Returns TRUE if both \a p and this guarded pointer are 0, or if
+ Returns true if both \a p and this guarded pointer are 0, or if
both \a p and this pointer point to the same object; otherwise
- returns FALSE.
+ returns false.
\sa operator!=()
*/
@@ -158,15 +158,15 @@
\fn bool TQGuardedPtr::operator!= ( const TQGuardedPtr<T>& p ) const
Inequality operator; implements pointer semantics, the negation of
- operator==(). Returns TRUE if \a p and this guarded pointer are
- not pointing to the same object; otherwise returns FALSE.
+ operator==(). Returns true if \a p and this guarded pointer are
+ not pointing to the same object; otherwise returns false.
*/
/*!
\fn bool TQGuardedPtr::isNull() const
- Returns \c TRUE if the referenced object has been destroyed or if
- there is no referenced object; otherwise returns FALSE.
+ Returns \c true if the referenced object has been destroyed or if
+ there is no referenced object; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqiconset.cpp b/src/kernel/tqiconset.cpp
index 22e8a8f1d..d22116207 100644
--- a/src/kernel/tqiconset.cpp
+++ b/src/kernel/tqiconset.cpp
@@ -263,7 +263,7 @@ TQIconSetIcon *TQIconSetPrivate::icon( const TQIconSet *iconSet,
22 x 22, while the default large size is 32 x 32. These sizes only
affect generated icons.
- The isGenerated() function returns TRUE if an icon was generated by
+ The isGenerated() function returns true if an icon was generated by
TQIconSet or by a factory; clearGenerated() clears all cached
pixmaps.
@@ -551,8 +551,8 @@ TQPixmap TQIconSet::pixmap( Size size, Mode mode, State state ) const
icon->pixmap = new TQPixmap( d->defaultPix );
} else {
/*
- No icons are available for { TRUE, Normal, Off } and
- { FALSE, Normal, Off }. Try the other 10 combinaisons,
+ No icons are available for { true, Normal, Off } and
+ { false, Normal, Off }. Try the other 10 combinaisons,
best ones first.
*/
const int N = 10;
@@ -561,16 +561,16 @@ TQPixmap TQIconSet::pixmap( Size size, Mode mode, State state ) const
Mode mode;
State state;
} tryList[N] = {
- { TRUE, Active, Off },
- { TRUE, Normal, On },
- { TRUE, Active, On },
- { FALSE, Active, Off },
- { FALSE, Normal, On },
- { FALSE, Active, On },
- { TRUE, Disabled, Off },
- { TRUE, Disabled, On },
- { FALSE, Disabled, Off },
- { FALSE, Disabled, On }
+ { true, Active, Off },
+ { true, Normal, On },
+ { true, Active, On },
+ { false, Active, Off },
+ { false, Normal, On },
+ { false, Active, On },
+ { true, Disabled, Off },
+ { true, Disabled, On },
+ { false, Disabled, Off },
+ { false, Disabled, On }
};
for ( int i = 0; i < N; i++ ) {
@@ -648,16 +648,16 @@ TQPixmap TQIconSet::pixmap() const
}
/*!
- Returns TRUE if the pixmap with size \a size, mode \a mode and
+ Returns true if the pixmap with size \a size, mode \a mode and
state \a state is generated from other pixmaps; otherwise returns
- FALSE.
+ false.
A pixmap obtained from a TQIconFactory is considered non-generated.
*/
bool TQIconSet::isGenerated( Size size, Mode mode, State state ) const
{
if ( !d )
- return TRUE;
+ return true;
return d->icon( this, size, mode, state )->origin == Generated;
}
@@ -693,7 +693,7 @@ void TQIconSet::installIconFactory( TQIconFactory *factory )
}
/*!
- Returns TRUE if the icon set is empty; otherwise returns FALSE.
+ Returns true if the icon set is empty; otherwise returns false.
*/
bool TQIconSet::isNull() const
{
@@ -857,7 +857,7 @@ TQPixmap *TQIconSet::createDisabled( Size size, State state ) const
By reimplementing createPixmap(), you can override TQIconSet's
default algorithm for computing pixmaps not supplied by the user.
- Call setAutoDelete(TRUE) if you want the factory to automatically
+ Call setAutoDelete(true) if you want the factory to automatically
delete itself when it is no longer needed by TQIconSet.
\sa TQIconSet
@@ -899,9 +899,9 @@ TQPixmap *TQIconFactory::createPixmap( const TQIconSet& /* iconSet */,
/*!
\fn void TQIconFactory::setAutoDelete( bool autoDelete )
- If \a autoDelete is TRUE, sets the icon factory to automatically
+ If \a autoDelete is true, sets the icon factory to automatically
delete itself when it is no longer referenced by any TQIconSet and
- isn't the default factory. If \a autoDelete is FALSE (the default)
+ isn't the default factory. If \a autoDelete is false (the default)
auto-deletion is disabled.
\sa autoDelete(), defaultFactory()
@@ -910,7 +910,7 @@ TQPixmap *TQIconFactory::createPixmap( const TQIconSet& /* iconSet */,
/*!
\fn bool TQIconFactory::autoDelete() const
- Returns TRUE if auto-deletion is enabled; otherwise returns FALSE.
+ Returns true if auto-deletion is enabled; otherwise returns false.
\sa setAutoDelete()
*/
@@ -924,7 +924,7 @@ TQIconFactory *TQIconFactory::defaultFactory()
{
if ( !defaultFac ) {
defaultFac = new TQIconFactory;
- defaultFac->setAutoDelete( TRUE );
+ defaultFac->setAutoDelete( true );
defaultFac->ref();
q_cleanup_icon_factory.set( &defaultFac );
}
diff --git a/src/kernel/tqimage.cpp b/src/kernel/tqimage.cpp
index 177c0a6af..35dabb6e7 100644
--- a/src/kernel/tqimage.cpp
+++ b/src/kernel/tqimage.cpp
@@ -486,12 +486,12 @@ TQImage::TQImage( uchar* yourdata, int w, int h, int depth,
data->nbytes = bpl*h;
if ( colortable || !data->ncols ) {
data->ctbl = colortable;
- data->ctbl_mine = FALSE;
+ data->ctbl_mine = false;
} else {
// calloc since we realloc, etc. later (ick)
data->ctbl = (TQRgb*)calloc( data->ncols*sizeof(TQRgb), data->ncols );
TQ_CHECK_PTR(data->ctbl);
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
}
uchar** jt = (uchar**)malloc(h*sizeof(uchar*));
TQ_CHECK_PTR(jt);
@@ -667,14 +667,14 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
// alpha channel should be only copied, not used by bitBlt(), and
// this is mutable, we will restore the image state before returning
TQImage *that = (TQImage *) this;
- that->setAlphaBuffer( FALSE );
+ that->setAlphaBuffer( false );
}
memcpy( image.colorTable(), colorTable(), numColors()*sizeof(TQRgb) );
bitBlt( &image, dx, dy, this, x, y, -1, -1, conversion_flags );
if ( has_alpha ) {
// restore image state
TQImage *that = (TQImage *) this;
- that->setAlphaBuffer( TRUE );
+ that->setAlphaBuffer( true );
}
image.setAlphaBuffer(hasAlphaBuffer());
image.data->dpmx = dotsPerMeterX();
@@ -702,7 +702,7 @@ TQImage TQImage::copy(int x, int y, int w, int h, int conversion_flags) const
/*!
\fn bool TQImage::isNull() const
- Returns TRUE if it is a null image; otherwise returns FALSE.
+ Returns true if it is a null image; otherwise returns false.
A null image has all parameters set to zero and no allocated data.
*/
@@ -977,7 +977,7 @@ void TQImage::fill( uint pixel )
/*!
Inverts all pixel values in the image.
- If the depth is 32: if \a invertAlpha is TRUE, the alpha bits are
+ If the depth is 32: if \a invertAlpha is true, the alpha bits are
also inverted, otherwise they are left unchanged.
If the depth is not 32, the argument \a invertAlpha has no
@@ -1085,7 +1085,7 @@ void TQImage::setNumColors( int numColors )
if ( data->ctbl_mine )
free( data->ctbl );
else
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
data->ctbl = 0;
}
data->ncols = 0;
@@ -1099,7 +1099,7 @@ void TQImage::setNumColors( int numColors )
} else { // create new color table
data->ctbl = (TQRgb*)calloc( numColors*sizeof(TQRgb), 1 );
TQ_CHECK_PTR(data->ctbl);
- data->ctbl_mine = TRUE;
+ data->ctbl_mine = true;
}
data->ncols = data->ctbl == 0 ? 0 : numColors;
}
@@ -1108,14 +1108,14 @@ void TQImage::setNumColors( int numColors )
/*!
\fn bool TQImage::hasAlphaBuffer() const
- Returns TRUE if alpha buffer mode is enabled; otherwise returns
- FALSE.
+ Returns true if alpha buffer mode is enabled; otherwise returns
+ false.
\sa setAlphaBuffer()
*/
/*!
- Enables alpha buffer mode if \a enable is TRUE, otherwise disables
+ Enables alpha buffer mode if \a enable is true, otherwise disables
it. The default setting is disabled.
An 8-bpp image has 8-bit pixels. A pixel is an index into the
@@ -1144,8 +1144,8 @@ void TQImage::setAlphaBuffer( bool enable )
/*!
Sets the image \a width, \a height, \a depth, its number of colors
- (in \a numColors), and bit order. Returns TRUE if successful, or
- FALSE if the parameters are incorrect or if memory cannot be
+ (in \a numColors), and bit order. Returns true if successful, or
+ false if the parameters are incorrect or if memory cannot be
allocated.
The \a width and \a height is limited to 32767. \a depth must be
@@ -1169,12 +1169,12 @@ bool TQImage::create( int width, int height, int depth, int numColors,
{
reset(); // reset old data
if ( width <= 0 || height <= 0 || depth <= 0 || numColors < 0 )
- return FALSE; // invalid parameter(s)
+ return false; // invalid parameter(s)
if ( depth == 1 && bitOrder == IgnoreEndian ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQImage::create: Bit order is required for 1 bpp images" );
#endif
- return FALSE;
+ return false;
}
if ( depth != 1 )
bitOrder = IgnoreEndian;
@@ -1195,18 +1195,18 @@ bool TQImage::create( int width, int height, int depth, int numColors,
#endif
break;
default: // invalid depth
- return FALSE;
+ return false;
}
if ( depth == 32 )
numColors = 0;
setNumColors( numColors );
if ( data->ncols != numColors ) // could not alloc color table
- return FALSE;
+ return false;
if ( INT_MAX / uint(depth) < uint(width) ) { // sanity check for potential overflow
setNumColors( 0 );
- return FALSE;
+ return false;
}
const int bpl = ((width*depth+31)/32)*4; // bytes per scanline
// #### WWA: shouldn't this be (width*depth+7)/8:
@@ -1215,7 +1215,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
|| bpl < 0
|| INT_MAX / sizeof(uchar *) < uint(height) ) { // sanity check for potential overflow
setNumColors( 0 );
- return FALSE;
+ return false;
}
int nbytes = bpl*height; // image size
int ptbl = height*sizeof(uchar*); // pointer table size
@@ -1224,7 +1224,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
TQ_CHECK_PTR(p);
if ( !p ) { // no memory
setNumColors( 0 );
- return FALSE;
+ return false;
}
data->w = width;
data->h = height;
@@ -1240,7 +1240,7 @@ bool TQImage::create( int width, int height, int depth, int numColors,
memset( d+bpl-pad, 0, pad );
d += bpl;
}
- return TRUE;
+ return true;
}
/*!
@@ -1271,7 +1271,7 @@ void TQImage::reinit()
data->ctbl = 0;
data->bits = 0;
data->bitordr = TQImage::IgnoreEndian;
- data->alpha = FALSE;
+ data->alpha = false;
#ifndef TQT_NO_IMAGE_TEXT
data->misc = 0;
#endif
@@ -1318,18 +1318,18 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
{
TQRgb *p;
uchar *b;
- bool do_quant = FALSE;
+ bool do_quant = false;
int y, x;
if ( !dst->create(src->width(), src->height(), 8, 256) )
- return FALSE;
+ return false;
const int tablesize = 997; // prime
TQRgbMap table[tablesize];
int pix=0;
TQRgb amask = src->hasAlphaBuffer() ? 0xffffffff : 0x00ffffff;
if ( src->hasAlphaBuffer() )
- dst->setAlphaBuffer(TRUE);
+ dst->setAlphaBuffer(true);
if ( palette ) {
// Preload palette into table.
@@ -1363,7 +1363,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
}
if ( (conversion_flags & TQt::DitherMode_Mask) == TQt::PreferDither ) {
- do_quant = TRUE;
+ do_quant = true;
} else {
for ( y=0; y<src->height(); y++ ) { // check if <= 256 colors
p = (TQRgb *)src->scanLine(y);
@@ -1384,7 +1384,7 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
} else {
// Cannot be in table
if ( pix == 256 ) { // too many colors
- do_quant = TRUE;
+ do_quant = true;
// Break right out
x = 0;
y = src->height();
@@ -1616,14 +1616,14 @@ static bool convert_32_to_8( const TQImage *src, TQImage *dst, int conversion_fl
}
- return TRUE;
+ return true;
}
static bool convert_8_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -1632,14 +1632,14 @@ static bool convert_8_to_32( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = src->color(*b++);
}
- return TRUE;
+ return true;
}
static bool convert_1_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // could not create
+ return false; // could not create
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -1659,14 +1659,14 @@ static bool convert_1_to_32( const TQImage *src, TQImage *dst )
}
}
}
- return TRUE;
+ return true;
}
#endif // TQT_NO_IMAGE_TRUECOLOR
static bool convert_1_to_8( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 8, 2) )
- return FALSE; // something failed
+ return false; // something failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
if (src->numColors() >= 2) {
dst->setColor( 0, src->color(0) ); // copy color table
@@ -1697,7 +1697,7 @@ static bool convert_1_to_8( const TQImage *src, TQImage *dst )
}
}
}
- return TRUE;
+ return true;
}
#ifndef TQT_NO_IMAGE_DITHER_TO_1
@@ -1709,7 +1709,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
int conversion_flags, bool fromalpha )
{
if ( !dst->create(src->width(), src->height(), 1, 2, TQImage::BigEndian) )
- return FALSE; // something failed
+ return false; // something failed
enum { Threshold, Ordered, Diffuse } dithermode;
@@ -1756,7 +1756,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
int *line2 = new int[w];
int bmwidth = (w+7)/8;
if ( !(line1 && line2) )
- return FALSE;
+ return false;
uchar *p;
uchar *end;
int *b1, *b2;
@@ -1986,7 +1986,7 @@ static bool dither_to_1( const TQImage *src, TQImage *dst,
}
}
}
- return TRUE;
+ return true;
}
#endif
@@ -2004,7 +2004,7 @@ static inline bool is16BitGray( ushort c )
static bool convert_16_to_32( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 32) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
uint *p = (uint *)dst->scanLine(y);
@@ -2013,14 +2013,14 @@ static bool convert_16_to_32( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = qt_conv16ToRgb( *s++ );
}
- return TRUE;
+ return true;
}
static bool convert_32_to_16( const TQImage *src, TQImage *dst )
{
if ( !dst->create(src->width(), src->height(), 16) )
- return FALSE; // create failed
+ return false; // create failed
dst->setAlphaBuffer( src->hasAlphaBuffer() );
for ( int y=0; y<dst->height(); y++ ) { // for each scan line...
ushort *p = (ushort *)dst->scanLine(y);
@@ -2029,7 +2029,7 @@ static bool convert_32_to_16( const TQImage *src, TQImage *dst )
while ( p < end )
*p++ = qt_convRgbTo16( *s++ );
}
- return TRUE;
+ return true;
}
@@ -2059,7 +2059,7 @@ TQImage TQImage::convertDepth( int depth, int conversion_flags ) const
image = *this; // no conversion
#ifndef TQT_NO_IMAGE_DITHER_TO_1
else if ( (data->d == 8 || data->d == 32) && depth == 1 ) // dither
- dither_to_1( this, &image, conversion_flags, FALSE );
+ dither_to_1( this, &image, conversion_flags, false );
#endif
#ifndef TQT_NO_IMAGE_TRUECOLOR
else if ( data->d == 32 && depth == 8 ) // 32 -> 8
@@ -2104,8 +2104,8 @@ TQImage TQImage::convertDepth( int depth ) const
}
/*!
- Returns TRUE if ( \a x, \a y ) is a valid coordinate in the image;
- otherwise returns FALSE.
+ Returns true if ( \a x, \a y ) is a valid coordinate in the image;
+ otherwise returns false.
\sa width() height() pixelIndex()
*/
@@ -2306,9 +2306,9 @@ bool isGray(TQRgb c)
}
/*!
- Returns TRUE if all the colors in the image are shades of gray
+ Returns true if all the colors in the image are shades of gray
(i.e. their red, green and blue components are equal); otherwise
- returns FALSE.
+ returns false.
This function is slow for large 32-bit images.
@@ -2322,33 +2322,33 @@ bool TQImage::allGray() const
TQRgb* b = (TQRgb*)bits();
while (p--)
if (!isGray(*b++))
- return FALSE;
+ return false;
#ifndef TQT_NO_IMAGE_16_BIT
} else if (depth()==16) {
int p = width()*height();
ushort* b = (ushort*)bits();
while (p--)
if (!is16BitGray(*b++))
- return FALSE;
+ return false;
#endif
} else
#endif //TQT_NO_IMAGE_TRUECOLOR
{
- if (!data->ctbl) return TRUE;
+ if (!data->ctbl) return true;
for (int i=0; i<numColors(); i++)
if (!isGray(data->ctbl[i]))
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
For 32-bit images, this function is
equivalent to allGray().
- For 8-bpp images, this function returns TRUE if color(i) is
+ For 8-bpp images, this function returns true if color(i) is
TQRgb(i,i,i) for all indices of the color table; otherwise returns
- FALSE.
+ false.
\sa allGray() depth()
*/
@@ -2365,11 +2365,11 @@ bool TQImage::isGrayscale() const
case 8: {
for (int i=0; i<numColors(); i++)
if (data->ctbl[i] != tqRgb(i,i,i))
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
}
- return FALSE;
+ return false;
}
#ifndef TQT_NO_IMAGE_SMOOTHSCALE
@@ -2428,7 +2428,7 @@ void pnmscale(const TQImage& src, TQImage& dst)
tempxelrow = new TQRgb[cols];
if ( src.hasAlphaBuffer() ) {
- dst.setAlphaBuffer(TRUE);
+ dst.setAlphaBuffer(true);
as = new long[cols];
for ( col = 0; col < cols; ++col )
as[col] = HALFSCALE;
@@ -2982,7 +2982,6 @@ TQImage TQImage::xForm( const TQWMatrix &matrix ) const
TQImage TQImage::createAlphaMask( int conversion_flags ) const
{
if ( conversion_flags == 1 ) {
- // Old code is passing "TRUE".
conversion_flags = TQt::DiffuseAlphaDither;
}
@@ -2997,7 +2996,7 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
}
TQImage mask1;
- dither_to_1( this, &mask1, conversion_flags, TRUE );
+ dither_to_1( this, &mask1, conversion_flags, true );
return mask1;
}
#endif
@@ -3015,7 +3014,7 @@ TQImage TQImage::createAlphaMask( int conversion_flags ) const
The returned image has little-endian bit order, which you can
convert to big-endianness using convertBitOrder().
- If \a clipTight is TRUE the mask is just large enough to cover the
+ If \a clipTight is true the mask is just large enough to cover the
pixels; otherwise, the mask is larger than the data pixels.
This function disregards the \link hasAlphaBuffer() alpha buffer
@@ -3057,10 +3056,10 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
}
int x,y;
- bool done = FALSE;
+ bool done = false;
uchar *ypp, *ypc, *ypn;
while( !done ) {
- done = TRUE;
+ done = true;
ypn = m.scanLine(0);
ypc = 0;
for ( y = 0; y < h; y++ ) {
@@ -3078,7 +3077,7 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
!(*(ypn + (x >> 3)) & (1 << (x & 7))) ) &&
( (*(ypc + (x >> 3)) & (1 << (x & 7))) ) &&
( (*p & 0x00ffffff) == background ) ) {
- done = FALSE;
+ done = false;
*(ypc + (x >> 3)) &= ~(1 << (x & 7));
}
p++;
@@ -3128,7 +3127,7 @@ TQImage TQImage::createHeuristicMask( bool clipTight ) const
Returns a mirror of the image, mirrored in the horizontal and/or
the vertical direction depending on whether \a horizontal and \a
- vertical are set to TRUE or FALSE. The original image is not
+ vertical are set to true or false. The original image is not
changed.
\sa smoothScale()
@@ -3231,7 +3230,7 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const
TQImage TQImage::mirror() const
{
- return mirror(FALSE,TRUE);
+ return mirror(false,true);
}
#endif //TQT_NO_IMAGE_MIRROR
@@ -3368,8 +3367,8 @@ TQStrList TQImage::outputFormats()
/*!
- Loads an image from the file \a fileName. Returns TRUE if the
- image was successfully loaded; otherwise returns FALSE.
+ Loads an image from the file \a fileName. Returns true if the
+ image was successfully loaded; otherwise returns false.
If \a format is specified, the loader attempts to read the image
using the specified format. If \a format is not specified (which
@@ -3393,8 +3392,8 @@ bool TQImage::load( const TQString &fileName, const char* format )
/*!
Loads an image from the first \a len bytes of binary data in \a
- buf. Returns TRUE if the image was successfully loaded; otherwise
- returns FALSE.
+ buf. Returns true if the image was successfully loaded; otherwise
+ returns false.
If \a format is specified, the loader attempts to read the image
using the specified format. If \a format is not specified (which
@@ -3439,8 +3438,8 @@ bool TQImage::loadFromData( TQByteArray buf, const char *format )
compressed files, 100 for large uncompressed files, and -1 (the
default) to use the default settings.
- Returns TRUE if the image was successfully saved; otherwise
- returns FALSE.
+ Returns true if the image was successfully saved; otherwise
+ returns false.
\sa load() loadFromData() imageFormat() TQPixmap::save() TQImageIO
*/
@@ -3448,7 +3447,7 @@ bool TQImage::loadFromData( TQByteArray buf, const char *format )
bool TQImage::save( const TQString &fileName, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( fileName, format );
return doImageIO( &io, quality );
}
@@ -3471,7 +3470,7 @@ bool TQImage::save( const TQString &fileName, const char* format, int quality )
bool TQImage::save( TQIODevice* device, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( device, format );
return doImageIO( &io, quality );
}
@@ -3482,7 +3481,7 @@ bool TQImage::save( TQIODevice* device, const char* format, int quality ) const
bool TQImage::doImageIO( TQImageIO* io, int quality ) const
{
if ( !io )
- return FALSE;
+ return false;
io->setImage( *this );
#if defined(QT_CHECK_RANGE)
if ( quality > 100 || quality < -1 )
@@ -3822,7 +3821,7 @@ void tqt_init_image_handlers() // initialize image handlers
if ( !imageHandlers ) {
imageHandlers = new TQIHList;
TQ_CHECK_PTR( imageHandlers );
- imageHandlers->setAutoDelete( TRUE );
+ imageHandlers->setAutoDelete( true );
tqAddPostRoutine( cleanup );
#ifndef TQT_NO_IMAGEIO_BMP
TQImageIO::defineIOHandler( "BMP", "^BM", 0,
@@ -4303,8 +4302,8 @@ TQStrList TQImageIO::outputFormats()
/*!
- Reads an image into memory and returns TRUE if the image was
- successfully read; otherwise returns FALSE.
+ Reads an image into memory and returns true if the image was
+ successfully read; otherwise returns false.
Before reading an image you must set an IO device or a file name.
If both an IO device and a file name have been set, the IO device
@@ -4340,10 +4339,10 @@ bool TQImageIO::read()
} else if ( !fname.isEmpty() ) { // read from file
file.setName( fname );
if ( !file.open(IO_ReadOnly) )
- return FALSE; // cannot open file
+ return false; // cannot open file
iodev = &file;
} else { // no file name or io device
- return FALSE;
+ return false;
}
if (frmt.isEmpty()) {
// Try to guess format
@@ -4353,7 +4352,7 @@ bool TQImageIO::read()
file.close();
iodev = 0;
}
- return FALSE;
+ return false;
}
} else {
image_format = frmt;
@@ -4391,8 +4390,8 @@ bool TQImageIO::read()
/*!
- Writes an image to an IO device and returns TRUE if the image was
- successfully written; otherwise returns FALSE.
+ Writes an image to an IO device and returns true if the image was
+ successfully written; otherwise returns false.
Before writing an image you must set an IO device or a file name.
If both an IO device and a file name have been set, the IO device
@@ -4409,7 +4408,7 @@ bool TQImageIO::read()
iio.setFileName( "vegeburger.bmp" );
iio.setFormat( "BMP" );
if ( iio.write() )
- // returned TRUE if written successfully
+ // returned true if written successfully
\endcode
\sa setIODevice() setFileName() setFormat() read() TQPixmap::save()
@@ -4418,7 +4417,7 @@ bool TQImageIO::read()
bool TQImageIO::write()
{
if ( frmt.isEmpty() )
- return FALSE;
+ return false;
TQImageHandler *h = get_image_handler( frmt );
if ( !h && !plugin_manager) {
tqt_init_image_plugins();
@@ -4429,7 +4428,7 @@ bool TQImageIO::write()
tqWarning( "TQImageIO::write: No such image format handler: %s",
format() );
#endif
- return FALSE;
+ return false;
}
TQFile file;
if ( !iodev && !fname.isEmpty() ) {
@@ -4437,7 +4436,7 @@ bool TQImageIO::write()
bool translate = h->text_mode==TQImageHandler::TranslateInOut;
int fmode = translate ? IO_WriteOnly|IO_Translate : IO_WriteOnly;
if ( !file.open(fmode) ) // couldn't create file
- return FALSE;
+ return false;
iodev = &file;
}
iostat = 1;
@@ -4559,7 +4558,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
s >> bi; // read BMP info header
if ( d->atEnd() ) // end of stream/file
- return FALSE;
+ return false;
#if 0
tqDebug( "offset...........%d", offset );
tqDebug( "startpos.........%d", startpos );
@@ -4587,12 +4586,12 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
if ( !(nbits == 1 || nbits == 4 || nbits == 8 || nbits == 16 || nbits == 24 || nbits == 32) ||
bi.biPlanes != 1 || comp > BMP_BITFIELDS )
- return FALSE; // weird BMP image
+ return false; // weird BMP image
if ( !(comp == BMP_RGB || (nbits == 4 && comp == BMP_RLE4) ||
(nbits == 8 && comp == BMP_RLE8) || ((nbits == 16 || nbits == 32) && comp == BMP_BITFIELDS)) )
- return FALSE; // weird compression type
+ return false; // weird compression type
if ((w < 0) || ((w * abs(h)) > (16384 * 16384)))
- return FALSE;
+ return false;
int ncols;
int depth;
@@ -4617,7 +4616,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
image.create( w, h, depth, ncols, nbits == 1 ?
TQImage::BigEndian : TQImage::IgnoreEndian );
if ( image.isNull() ) // could not create image
- return FALSE;
+ return false;
image.setDotsPerMeterX( bi.biXPelsPerMeter );
image.setDotsPerMeterY( bi.biYPelsPerMeter );
@@ -4629,29 +4628,29 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
int rgb_len = t == BMP_OLD ? 3 : 4;
for ( int i=0; i<ncols; i++ ) {
if ( d->readBlock( (char *)rgb, rgb_len ) != rgb_len )
- return FALSE;
+ return false;
image.setColor( i, tqRgb(rgb[2],rgb[1],rgb[0]) );
if ( d->atEnd() ) // truncated file
- return FALSE;
+ return false;
}
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
if ( (TQ_ULONG)d->readBlock( (char *)&red_mask, sizeof(red_mask) ) != sizeof(red_mask) )
- return FALSE;
+ return false;
if ( (TQ_ULONG)d->readBlock( (char *)&green_mask, sizeof(green_mask) ) != sizeof(green_mask) )
- return FALSE;
+ return false;
if ( (TQ_ULONG)d->readBlock( (char *)&blue_mask, sizeof(blue_mask) ) != sizeof(blue_mask) )
- return FALSE;
+ return false;
red_shift = calc_shift(red_mask);
if (((red_mask >> red_shift) + 1) == 0)
- return FALSE;
+ return false;
red_scale = 256 / ((red_mask >> red_shift) + 1);
green_shift = calc_shift(green_mask);
if (((green_mask >> green_shift) + 1) == 0)
- return FALSE;
+ return false;
green_scale = 256 / ((green_mask >> green_shift) + 1);
blue_shift = calc_shift(blue_mask);
if (((blue_mask >> blue_shift) + 1) == 0)
- return FALSE;
+ return false;
blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
} else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
blue_mask = 0x000000ff;
@@ -4662,7 +4661,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
red_shift = 16;
blue_scale = green_scale = red_scale = 1;
} else if (comp == BMP_RGB && nbits == 16) // don't support RGB values for 15/16 bpp
- return FALSE;
+ return false;
// offset can be bogus, be careful
if (offset>=0 && startpos + offset > (TQ_LONG)d->at() )
@@ -4801,7 +4800,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
b = endp-p;
if ( d->readBlock( (char *)p, b ) != b )
- return FALSE;
+ return false;
if ( (b & 1) == 1 )
d->getch(); // align on word boundary
x += b;
@@ -4852,7 +4851,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image )
delete[] buf24;
}
- return TRUE;
+ return true;
}
bool qt_read_dib( TQDataStream& s, TQImage& image )
@@ -4938,7 +4937,7 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
for ( y=image.height()-1; y>=0; y-- ) {
d->writeBlock( (char*)image.scanLine(y), bpl );
}
- return TRUE;
+ return true;
}
uchar *buf = new uchar[bpl_bmp];
@@ -4970,11 +4969,11 @@ bool qt_write_dib( TQDataStream& s, TQImage image )
}
if ( bpl_bmp != d->writeBlock( (char*)buf, bpl_bmp ) ) {
delete[] buf;
- return FALSE;
+ return false;
}
}
delete[] buf;
- return TRUE;
+ return true;
}
@@ -5581,14 +5580,14 @@ static void write_xbm_image( TQImageIO *iio )
// Skip until ", read until the next ", return the rest in *buf
-// Returns FALSE on error, TRUE on success
+// Returns false on error, true on success
static bool read_xpm_string( TQCString &buf, TQIODevice *d,
const char * const *source, int &index )
{
if ( source ) {
buf = source[index++];
- return TRUE;
+ return true;
}
if ( buf.size() < 69 ) //# just an approximation
@@ -5599,7 +5598,7 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
int i;
while ( (c=d->getch()) != EOF && c != '"' ) { }
if ( c == EOF ) {
- return FALSE;
+ return false;
}
i = 0;
while ( (c=d->getch()) != EOF && c != '"' ) {
@@ -5608,13 +5607,13 @@ static bool read_xpm_string( TQCString &buf, TQIODevice *d,
buf[i++] = c;
}
if ( c == EOF ) {
- return FALSE;
+ return false;
}
if ( i == (int)buf.size() ) // always use a 0 terminator
buf.resize( i+1 );
buf[i] = '\0';
- return TRUE;
+ return true;
}
@@ -5706,7 +5705,7 @@ static void read_xpm_image_or_array( TQImageIO * iio, const char * const * sourc
buf.truncate(end);
buf = buf.stripWhiteSpace();
if ( buf == "none" ) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
int transparentColor = currentColor;
if ( image.depth() == 8 ) {
image.setColor( transparentColor,
@@ -5955,14 +5954,14 @@ static
bool
haveSamePalette(const TQImage& a, const TQImage& b)
{
- if (a.depth() != b.depth()) return FALSE;
- if (a.numColors() != b.numColors()) return FALSE;
+ if (a.depth() != b.depth()) return false;
+ if (a.numColors() != b.numColors()) return false;
TQRgb* ca = a.colorTable();
TQRgb* cb = b.colorTable();
for (int i=a.numColors(); i--; ) {
- if (*ca++ != *cb++) return FALSE;
+ if (*ca++ != *cb++) return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -6157,8 +6156,8 @@ void bitBlt( TQImage* dst, int dx, int dy, const TQImage* src,
/*!
- Returns TRUE if this image and image \a i have the same contents;
- otherwise returns FALSE. The comparison can be slow, unless there
+ Returns true if this image and image \a i have the same contents;
+ otherwise returns false. The comparison can be slow, unless there
is some obvious difference, such as different widths, in which
case the function will return quickly.
@@ -6169,14 +6168,14 @@ bool TQImage::operator==( const TQImage & i ) const
{
// same object, or shared?
if ( i.data == data )
- return TRUE;
+ return true;
// obviously different stuff?
if ( i.data->h != data->h ||
i.data->w != data->w )
- return FALSE;
+ return false;
// not equal if one has alphabuffer and the other does not
if ( i.hasAlphaBuffer() != hasAlphaBuffer() )
- return FALSE;
+ return false;
// that was the fast bit...
TQImage i1 = convertDepth( 32 );
TQImage i2 = i.convertDepth( 32 );
@@ -6193,21 +6192,21 @@ bool TQImage::operator==( const TQImage & i ) const
// compare pixels of scanline individually
for ( m=0; m < data->w; m++ )
if ( (i1line[m] ^ i2line[m]) & 0x00FFFFFF )
- return FALSE;
+ return false;
}
} else {
// yay, we can do fast binary comparison on entire scanlines
for( l=0; l < data->h; l++ )
if ( memcmp( i1.scanLine( l ), i2.scanLine( l ), 4*data->w ) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if this image and image \a i have different contents;
- otherwise returns FALSE. The comparison can be slow, unless there
+ Returns true if this image and image \a i have different contents;
+ otherwise returns false. The comparison can be slow, unless there
is some obvious difference, such as different widths, in which
case the function will return quickly.
diff --git a/src/kernel/tqimage.h b/src/kernel/tqimage.h
index 605b3551c..41e8b717c 100644
--- a/src/kernel/tqimage.h
+++ b/src/kernel/tqimage.h
@@ -131,7 +131,7 @@ public:
void reset();
void fill( uint pixel );
- void invertPixels( bool invertAlpha = TRUE );
+ void invertPixels( bool invertAlpha = true );
TQImage convertDepth( int ) const;
#ifndef TQT_NO_IMAGE_TRUECOLOR
@@ -161,7 +161,7 @@ public:
TQImage createAlphaMask( int conversion_flags=0 ) const;
#endif
#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
- TQImage createHeuristicMask( bool clipTight=TRUE ) const;
+ TQImage createHeuristicMask( bool clipTight=true ) const;
#endif
#ifndef TQT_NO_IMAGE_MIRROR
TQImage mirror() const;
diff --git a/src/kernel/tqimageformatplugin.cpp b/src/kernel/tqimageformatplugin.cpp
index ad9057d2c..c7da8581d 100644
--- a/src/kernel/tqimageformatplugin.cpp
+++ b/src/kernel/tqimageformatplugin.cpp
@@ -168,7 +168,7 @@ bool TQImageFormatPlugin::loadImage( const TQString &format, const TQString &fil
Q_UNUSED( format )
Q_UNUSED( filename )
Q_UNUSED( image )
- return FALSE;
+ return false;
}
/*! \internal
@@ -178,7 +178,7 @@ bool TQImageFormatPlugin::saveImage( const TQString &format, const TQString &fil
Q_UNUSED( format )
Q_UNUSED( filename )
Q_UNUSED( image )
- return FALSE;
+ return false;
}
#endif // TQT_NO_IMAGEFORMATPLUGIN
diff --git a/src/kernel/tqinputcontext.cpp b/src/kernel/tqinputcontext.cpp
index 7f0d5501d..913b0da5f 100644
--- a/src/kernel/tqinputcontext.cpp
+++ b/src/kernel/tqinputcontext.cpp
@@ -52,8 +52,8 @@ class TQInputContextPrivate
{
public:
TQInputContextPrivate()
- : holderWidget( 0 ), composingWidget( 0 ), hasFocus( FALSE ),
- isComposing( FALSE )
+ : holderWidget( 0 ), composingWidget( 0 ), hasFocus( false ),
+ isComposing( false )
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
, preeditString( TQString::null ),
cursorPosition( -1 ), selLength ( 0 )
@@ -75,7 +75,7 @@ public:
}
void resetComposingState() {
- isComposing = FALSE;
+ isComposing = false;
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
preeditString = TQString::null;
cursorPosition = -1;
@@ -265,7 +265,7 @@ public:
a text widget -> a non-text widget -> another text widget
To enable the preedit relocation feature, the input context class
- have to reimplement isPreeditRelocationEnabled() as returns TRUE.
+ have to reimplement isPreeditRelocationEnabled() as returns true.
The implementation requires that the preedit preservation is also
enabled since preedit relocation is a special case of the preedit
preservation. If the preedit relocation is disabled, the input
@@ -376,14 +376,14 @@ void TQInputContext::setFocusWidget( TQWidget *w )
d->composingWidget );
// invoke sendIMEventInternal() rather than sendIMEvent() to
// avoid altering the composing state
- if ( isPreeditRelocation == TRUE ) {
+ if ( isPreeditRelocation ) {
// clear preedit of previously focused text
// widget. preserved preedit may be exist even if
- // isPreeditRelocationEnabled() == FALSE.
+ // isPreeditRelocationEnabled() == false.
sendIMEventInternal( TQEvent::IMEnd );
}
d->composingWidget = w; // changes recipient of TQIMEvent
- if ( isPreeditRelocation == TRUE ) {
+ if ( isPreeditRelocation ) {
#if !defined(TQT_NO_IM_PREEDIT_RELOCATION)
if ( isPreeditRelocationEnabled() ) {
// copy preedit state to the widget that gaining focus
@@ -399,7 +399,7 @@ void TQInputContext::setFocusWidget( TQWidget *w )
}
}
}
- d->hasFocus = w ? TRUE : FALSE;
+ d->hasFocus = w;
}
@@ -413,14 +413,14 @@ void TQInputContext::releaseComposingWidget( TQWidget *w )
{
if ( d->composingWidget == w ) {
d->composingWidget = 0;
- d->hasFocus = FALSE;
+ d->hasFocus = false;
}
}
#endif // TQ_WS_X11
/*!
\internal
- This function can be reimplemented in a subclass as returning TRUE
+ This function can be reimplemented in a subclass as returning true
if you want making your input method enable the preedit
relocation. See the description for preedit relocation of
TQInputContext.
@@ -429,13 +429,13 @@ void TQInputContext::releaseComposingWidget( TQWidget *w )
*/
bool TQInputContext::isPreeditRelocationEnabled()
{
- return FALSE;
+ return false;
}
/*!
This function indicates whether IMStart event had been sent to the
text widget. It is ensured that an input context can send IMCompose
- or IMEnd event safely if this function returned TRUE.
+ or IMEnd event safely if this function returned true.
The state is automatically being tracked through sendIMEvent().
@@ -451,7 +451,7 @@ bool TQInputContext::isComposing() const
This function can be reimplemented in a subclass to filter input
events.
- Return TRUE if the \a event has been consumed. Otherwise, the
+ Return true if the \a event has been consumed. Otherwise, the
unfiltered \a event will be forwarded to widgets as ordinary
way. Although the input events have accept() and ignore()
methods, leave it untouched.
@@ -478,7 +478,7 @@ bool TQInputContext::isComposing() const
bool TQInputContext::filterEvent( const TQEvent *event )
{
Q_UNUSED(event);
- return FALSE;
+ return false;
}
@@ -602,7 +602,7 @@ void TQInputContext::sendIMEvent( TQEvent::Type type, const TQString &text,
if ( type == TQEvent::IMStart ) {
sendIMEventInternal( type, text, cursorPosition, selLength );
- d->isComposing = TRUE;
+ d->isComposing = true;
} else if ( type == TQEvent::IMEnd ) {
d->resetComposingState();
sendIMEventInternal( type, text, cursorPosition, selLength );
diff --git a/src/kernel/tqinputcontext_x11.cpp b/src/kernel/tqinputcontext_x11.cpp
index 70fa9f160..227a016f3 100644
--- a/src/kernel/tqinputcontext_x11.cpp
+++ b/src/kernel/tqinputcontext_x11.cpp
@@ -55,7 +55,7 @@
other input methods may use this to implement some special
features such as distinguishing Shift_L and Shift_R.
- Return TRUE if the \a event has been consumed. Otherwise, the
+ Return true if the \a event has been consumed. Otherwise, the
unfiltered \a event will be translated into TQEvent and forwarded
to filterEvent(). Filtering at both x11FilterEvent() and
filterEvent() in single input method is allowed.
@@ -69,7 +69,7 @@ bool TQInputContext::x11FilterEvent( TQWidget *keywidget, XEvent *event )
{
Q_UNUSED(keywidget);
Q_UNUSED(event);
- return FALSE;
+ return false;
}
#endif //Q_NO_IM
diff --git a/src/kernel/tqinternal.cpp b/src/kernel/tqinternal.cpp
index 11243d1d2..98524dfdd 100644
--- a/src/kernel/tqinternal.cpp
+++ b/src/kernel/tqinternal.cpp
@@ -56,9 +56,9 @@ static TQSharedDoubleBuffer* qdb_owner = 0;
TQCleanupHandler<TQPixmap> qdb_pixmap_cleanup;
#ifdef TQ_WS_MACX
-bool TQSharedDoubleBuffer::dblbufr = FALSE;
+bool TQSharedDoubleBuffer::dblbufr = false;
#else
-bool TQSharedDoubleBuffer::dblbufr = TRUE;
+bool TQSharedDoubleBuffer::dblbufr = true;
#endif
@@ -174,7 +174,7 @@ void TQSharedDoubleBufferCleaner::doCleanup( void )
bool TQSharedDoubleBufferCleaner::event( TQEvent *e )
{
if ( e->type() != TQEvent::Timer )
- return FALSE;
+ return false;
TQTimerEvent *event = (TQTimerEvent *) e;
if ( event->timerId() == timer_id ) {
@@ -184,11 +184,11 @@ bool TQSharedDoubleBufferCleaner::event( TQEvent *e )
#ifdef QT_CHECK_STATE
else {
tqWarning( "TQSharedDoubleBufferCleaner::event: invalid timer event received." );
- return FALSE;
+ return false;
}
#endif // QT_CHECK_STATE
- return TRUE;
+ return true;
}
// static instance
@@ -338,7 +338,7 @@ bool TQSharedDoubleBuffer::begin( TQPainter* painter, int x, int y, int w, int h
tqWarning( "TQSharedDoubleBuffer::begin: Buffer is already active."
"\n\tYou must end() the buffer before a second begin()" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
external_p = painter;
@@ -372,7 +372,7 @@ bool TQSharedDoubleBuffer::begin( TQPainter* painter, int x, int y, int w, int h
p = external_p;
}
- return TRUE;
+ return true;
}
/* \internal
@@ -393,7 +393,7 @@ bool TQSharedDoubleBuffer::begin( TQWidget* widget, int x, int y, int w, int h )
tqWarning( "TQSharedDoubleBuffer::begin: Buffer is already active."
"\n\tYou must end() the buffer before a second begin()" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
state = Active;
@@ -433,7 +433,7 @@ bool TQSharedDoubleBuffer::begin( TQWidget* widget, int x, int y, int w, int h )
wid->erase( rx, ry, rw, rh );
}
}
- return TRUE;
+ return true;
}
/* \internal
@@ -450,7 +450,7 @@ bool TQSharedDoubleBuffer::end()
tqWarning( "TQSharedDoubleBuffer::end: Buffer is not active."
"\n\tYou must call begin() before calling end()." );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if ( ! ( state & ExternalPainter ) ) {
@@ -472,7 +472,7 @@ bool TQSharedDoubleBuffer::end()
p = external_p = 0;
pix = 0;
- return TRUE;
+ return true;
}
/* \internal
@@ -598,13 +598,13 @@ void TQSharedDoubleBuffer::releasePixmap()
/* \internal
\fn bool TQSharedDoubleBuffer::isDisabled()
- Returns TRUE if double buffering is disabled globally, FALSE otherwise.
+ Returns true if double buffering is disabled globally, false otherwise.
*/
/* \internal
\fn void TQSharedDoubleBuffer::setDisabled( bool off )
- Disables global double buffering \a off is TRUE, otherwise global
+ Disables global double buffering \a off is true, otherwise global
double buffering is enabled.
*/
@@ -644,13 +644,13 @@ void TQSharedDoubleBuffer::cleanup()
/* \internal
\fn bool TQSharedDoubleBuffer::isActive() const
- Returns TRUE if double buffered painting is active, FALSE otherwise.
+ Returns true if double buffered painting is active, false otherwise.
*/
/* \internal
\fn bool TQSharedDoubleBuffer::isBuffered() const
- Returns TRUE if painting is double buffered, FALSE otherwise.
+ Returns true if painting is double buffered, false otherwise.
*/
@@ -666,7 +666,7 @@ void TQSharedDoubleBuffer::cleanup()
TQMembuf::TQMembuf() : _size(0), _index(0)
{
buf = new TQPtrList<TQByteArray>;
- buf->setAutoDelete( TRUE );
+ buf->setAutoDelete( true );
}
TQMembuf::~TQMembuf()
@@ -682,7 +682,7 @@ TQMembuf::~TQMembuf()
bool TQMembuf::consumeBytes( TQ_ULONG nbytes, char *sink )
{
if ( nbytes <= 0 || nbytes > _size )
- return FALSE;
+ return false;
_size -= nbytes;
for ( ;; ) {
TQByteArray *a = buf->first();
@@ -706,20 +706,20 @@ bool TQMembuf::consumeBytes( TQ_ULONG nbytes, char *sink )
break;
}
}
- return TRUE;
+ return true;
}
/*! \internal
Scans for any occurrence of '\n' in the buffer. If \a store
is not 0 the text up to the first '\n' (or terminating 0) is
written to \a store, and a terminating 0 is appended to \a store
- if necessary. Returns TRUE if a '\n' was found; otherwise returns
- FALSE.
+ if necessary. Returns true if a '\n' was found; otherwise returns
+ false.
*/
bool TQMembuf::scanNewline( TQByteArray *store )
{
if ( _size == 0 )
- return FALSE;
+ return false;
int i = 0; // index into 'store'
TQByteArray *a = 0;
char *p;
@@ -728,13 +728,13 @@ bool TQMembuf::scanNewline( TQByteArray *store )
if ( !a ) {
a = buf->first();
if ( !a || a->size() == 0 )
- return FALSE;
+ return false;
p = a->data() + _index;
n = a->size() - _index;
} else {
a = buf->next();
if ( !a || a->size() == 0 )
- return FALSE;
+ return false;
p = a->data();
n = a->size();
}
@@ -747,11 +747,11 @@ bool TQMembuf::scanNewline( TQByteArray *store )
switch ( *p ) {
case '\0':
store->resize( i );
- return FALSE;
+ return false;
case '\n':
*(store->data()+i) = '\0';
store->resize( i );
- return TRUE;
+ return true;
}
p++;
}
@@ -759,9 +759,9 @@ bool TQMembuf::scanNewline( TQByteArray *store )
while ( n-- > 0 ) {
switch ( *p++ ) {
case '\0':
- return FALSE;
+ return false;
case '\n':
- return TRUE;
+ return true;
}
}
}
diff --git a/src/kernel/tqjpegio.cpp b/src/kernel/tqjpegio.cpp
index f76aad44d..ec7b892ab 100644
--- a/src/kernel/tqjpegio.cpp
+++ b/src/kernel/tqjpegio.cpp
@@ -124,7 +124,7 @@ boolean qt_fill_input_buffer(j_decompress_ptr cinfo)
#if defined(Q_OS_UNIXWARE)
return B_TRUE;
#else
- return TRUE;
+ return true;
#endif
}
@@ -143,7 +143,7 @@ void qt_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
while (num_bytes > (long) src->bytes_in_buffer) {
num_bytes -= (long) src->bytes_in_buffer;
(void) qt_fill_input_buffer(cinfo);
- /* note we assume that qt_fill_input_buffer will never return FALSE,
+ /* note we assume that qt_fill_input_buffer will never return false,
* so suspension need not be handled.
*/
}
@@ -210,7 +210,7 @@ void read_jpeg_image(TQImageIO* iio)
#if defined(Q_OS_UNIXWARE)
(void) jpeg_read_header(&cinfo, B_TRUE);
#else
- (void) jpeg_read_header(&cinfo, TRUE);
+ (void) jpeg_read_header(&cinfo, true);
#endif
(void) jpeg_start_decompress(&cinfo);
@@ -253,7 +253,7 @@ void read_jpeg_image(TQImageIO* iio)
scaleSize( sWidth, sHeight, cinfo.output_width, cinfo.output_height, sMode );
// tqDebug( "Scaling the jpeg to %i x %i", sWidth, sHeight, sModeStr );
- bool created = FALSE;
+ bool created = false;
if ( cinfo.output_components == 3 || cinfo.output_components == 4) {
created = image.create( sWidth, sHeight, 32 );
} else if ( cinfo.output_components == 1 ) {
@@ -302,7 +302,7 @@ void read_jpeg_image(TQImageIO* iio)
} else {
- bool created = FALSE;
+ bool created = false;
if ( cinfo.output_components == 3 || cinfo.output_components == 4) {
created = image.create( cinfo.output_width, cinfo.output_height, 32 );
} else if ( cinfo.output_components == 1 ) {
@@ -402,7 +402,7 @@ boolean qt_empty_output_buffer(j_compress_ptr cinfo)
#if defined(Q_OS_UNIXWARE)
return B_TRUE;
#else
- return TRUE;
+ return true;
#endif
}
@@ -463,12 +463,12 @@ void write_jpeg_image(TQImageIO* iio)
cinfo.image_height = image.height();
TQRgb* cmap=0;
- bool gray=FALSE;
+ bool gray=false;
switch ( image.depth() ) {
case 1:
case 8:
cmap = image.colorTable();
- gray = TRUE;
+ gray = true;
int i;
for (i=image.numColors(); gray && i--; ) {
gray = gray & ( tqRed(cmap[i]) == tqGreen(cmap[i]) &&
@@ -503,8 +503,8 @@ void write_jpeg_image(TQImageIO* iio)
jpeg_set_quality(&cinfo, quality, B_TRUE /* limit to baseline-JPEG values */);
jpeg_start_compress(&cinfo, B_TRUE);
#else
- jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */);
- jpeg_start_compress(&cinfo, TRUE);
+ jpeg_set_quality(&cinfo, quality, true /* limit to baseline-JPEG values */);
+ jpeg_start_compress(&cinfo, true);
#endif
row_pointer[0] = new uchar[cinfo.image_width*cinfo.input_components];
diff --git a/src/kernel/tqkeysequence.cpp b/src/kernel/tqkeysequence.cpp
index 659057784..007bf83be 100644
--- a/src/kernel/tqkeysequence.cpp
+++ b/src/kernel/tqkeysequence.cpp
@@ -337,8 +337,8 @@ uint TQKeySequence::count() const
/*!
- Returns TRUE if the key sequence is empty; otherwise returns
- FALSE.
+ Returns true if the key sequence is empty; otherwise returns
+ false.
*/
bool TQKeySequence::isEmpty() const
{
@@ -422,7 +422,7 @@ int TQKeySequence::decodeString( const TQString& str )
if ( sl.contains( (*it).name ) ) {
ret |= (*it).qt_key;
#ifndef TQT_NO_REGEXP
- accel.remove( TQRegExp(TQRegExp::escape((*it).name), FALSE) );
+ accel.remove( TQRegExp(TQRegExp::escape((*it).name), false) );
#else
accel.remove( (*it).name );
#endif
@@ -448,13 +448,13 @@ int TQKeySequence::decodeString( const TQString& str )
} else {
// Check through translation table for the correct key name
// ...or fall back on english table.
- bool found = FALSE;
+ bool found = false;
for ( int tran = 0; tran < 2; tran++ ) {
for ( int i = 0; keyname[i].name; i++ ) {
if ( tran ? accel == TQAccel::tr(keyname[i].name)
: accel == keyname[i].name ) {
ret |= keyname[i].key;
- found = TRUE;
+ found = true;
break;
}
}
@@ -648,8 +648,8 @@ TQKeySequence &TQKeySequence::operator=( const TQKeySequence & keysequence )
/*!
- Returns TRUE if \a keysequence is equal to this key
- sequence; otherwise returns FALSE.
+ Returns true if \a keysequence is equal to this key
+ sequence; otherwise returns false.
*/
@@ -663,8 +663,8 @@ bool TQKeySequence::operator==( const TQKeySequence& keysequence ) const
/*!
- Returns TRUE if \a keysequence is not equal to this key sequence;
- otherwise returns FALSE.
+ Returns true if \a keysequence is not equal to this key sequence;
+ otherwise returns false.
*/
bool TQKeySequence::operator!= ( const TQKeySequence& keysequence ) const
{
diff --git a/src/kernel/tqlayout.cpp b/src/kernel/tqlayout.cpp
index 814f1565b..02e35d49c 100644
--- a/src/kernel/tqlayout.cpp
+++ b/src/kernel/tqlayout.cpp
@@ -148,7 +148,7 @@ public:
inline void setReversed( bool r, bool c ) { hReversed = c; vReversed = r; }
inline bool horReversed() const { return hReversed; }
inline bool verReversed() const { return vReversed; }
- inline void setDirty() { needRecalc = TRUE; hfw_width = -1; }
+ inline void setDirty() { needRecalc = true; hfw_width = -1; }
inline bool isDirty() const { return needRecalc; }
bool hasHeightForWidth( int space );
int heightForWidth( int, int, int );
@@ -167,7 +167,7 @@ private:
void addHfwData ( TQGridBox *box, int width );
void init();
TQSize findSize( TQCOORD TQLayoutStruct::*, int ) const;
- void addData( TQGridBox *b, bool r = TRUE, bool c = TRUE );
+ void addData( TQGridBox *b, bool r = true, bool c = true );
void setSize( int rows, int cols );
void setupLayoutData( int space );
void setupHfwLayoutData( int space );
@@ -210,11 +210,11 @@ TQGridLayoutData::TQGridLayoutData( int nRows, int nCols )
init();
if ( nRows < 0 ) {
nRows = 1;
- addVertical = FALSE;
+ addVertical = false;
}
if ( nCols < 0 ) {
nCols = 1;
- addVertical = TRUE;
+ addVertical = true;
}
setSize( nRows, nCols );
}
@@ -230,15 +230,15 @@ TQGridLayoutData::~TQGridLayoutData()
void TQGridLayoutData::init()
{
- addVertical = FALSE;
+ addVertical = false;
setDirty();
multi = 0;
rr = cc = 0;
nextR = nextC = 0;
hfwData = 0;
- things.setAutoDelete( TRUE );
- hReversed = FALSE;
- vReversed = FALSE;
+ things.setAutoDelete( true );
+ hReversed = false;
+ vReversed = false;
}
bool TQGridLayoutData::hasHeightForWidth( int spacing )
@@ -310,7 +310,7 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
*row = box->row;
if ( col )
*col = box->col;
- return TRUE;
+ return true;
}
}
if ( multi ) {
@@ -324,12 +324,12 @@ bool TQGridLayoutData::findWidget( TQWidget* w, int *row, int *col )
*row = box->row;
if ( col )
*col = box->col;
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
TQSize TQGridLayoutData::findSize( TQCOORD TQLayoutStruct::*size, int spacer ) const
@@ -482,7 +482,7 @@ void TQGridLayoutData::add( TQGridBox *box, int row1, int row2, int col1,
TQGridMultiBox *mbox = new TQGridMultiBox( box, row2, col2 );
if ( !multi ) {
multi = new TQPtrList<TQGridMultiBox>;
- multi->setAutoDelete( TRUE );
+ multi->setAutoDelete( true );
}
multi->append( mbox );
setDirty();
@@ -543,9 +543,9 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
// Empty boxes (i.e. spacers) do not get borders. This is
// hacky, but compatible.
if ( c )
- colData[box->col].empty = FALSE;
+ colData[box->col].empty = false;
if ( r )
- rowData[box->row].empty = FALSE;
+ rowData[box->row].empty = false;
}
}
@@ -562,7 +562,7 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing,
w += chain[i].minimumSize;
wh += chain[i].sizeHint;
max += chain[i].maximumSize;
- chain[i].empty = FALSE;
+ chain[i].empty = false;
if ( stretchArray[i] == 0 )
chain[i].stretch = TQMAX(chain[i].stretch,stretch);
}
@@ -616,7 +616,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
if ( !needRecalc )
return;
#endif
- has_hfw = FALSE;
+ has_hfw = false;
int i;
for ( i = 0; i < rr; i++ )
@@ -650,17 +650,17 @@ void TQGridLayoutData::setupLayoutData( int spacing )
TQSize hint = box->sizeHint();
TQSize min = box->minimumSize();
if ( box->hasHeightForWidth() )
- has_hfw = TRUE;
+ has_hfw = true;
if ( r1 == r2 ) {
- addData( box, TRUE, FALSE );
+ addData( box, true, false );
} else {
distributeMultiBox( rowData, spacing, r1, r2,
min.height(), hint.height(),
rStretch, box->vStretch() );
}
if ( c1 == c2 ) {
- addData( box, FALSE, TRUE );
+ addData( box, false, true );
} else {
distributeMultiBox( colData, spacing, c1, c2,
min.width(), hint.width(),
@@ -673,7 +673,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
for ( i = 0; i < cc; i++ )
colData[i].expansive = colData[i].expansive || colData[i].stretch > 0;
- needRecalc = FALSE;
+ needRecalc = false;
}
void TQGridLayoutData::addHfwData( TQGridBox *box, int width )
@@ -849,7 +849,7 @@ public:
TQLayoutItem *next() {
idx++;
if ( !multi && idx >= (int)data->things.count() ) {
- multi = TRUE;
+ multi = true;
idx = 0;
}
return current();
@@ -1076,8 +1076,8 @@ TQSize TQGridLayout::maximumSize() const
}
/*!
- Returns TRUE if this layout's preferred height depends on its
- width; otherwise returns FALSE.
+ Returns true if this layout's preferred height depends on its
+ width; otherwise returns false.
*/
bool TQGridLayout::hasHeightForWidth() const
{
@@ -1103,7 +1103,7 @@ int TQGridLayout::minimumHeightForWidth( int w ) const
/*!
Searches for widget \a w in this layout (not including child
layouts). If \a w is found, it sets \c \a row and \c \a col to
- the row and column and returns TRUE; otherwise returns FALSE.
+ the row and column and returns true; otherwise returns false.
Note: if a widget spans multiple rows/columns, the top-left cell
is returned.
@@ -1157,7 +1157,7 @@ void TQGridLayout::expand( int nRows, int nCols )
*/
void TQGridLayout::init( int nRows, int nCols )
{
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
data = new TQGridLayoutData( nRows, nCols );
}
@@ -1209,8 +1209,8 @@ void TQGridLayout::addMultiCell( TQLayoutItem *item, int fromRow, int toRow,
}
/*
- Returns TRUE if the widget \a w can be added to the layout \a l;
- otherwise returns FALSE.
+ Returns true if the widget \a w can be added to the layout \a l;
+ otherwise returns false.
*/
static bool checkWidget( TQLayout *l, TQWidget *w )
{
@@ -1219,7 +1219,7 @@ static bool checkWidget( TQLayout *l, TQWidget *w )
tqWarning( "TQLayout: Cannot add null widget to %s/%s", l->className(),
l->name() );
#endif
- return FALSE;
+ return false;
}
if ( w->parentWidget() != l->mainWidget() && l->mainWidget() ) {
#if defined(QT_CHECK_STATE)
@@ -1233,9 +1233,9 @@ static bool checkWidget( TQLayout *l, TQWidget *w )
" %s/%s", w->className(), w->name(),
l->mainWidget()->className(), l->mainWidget()->name() );
#endif
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -1516,7 +1516,7 @@ TQLayoutIterator TQGridLayout::iterator()
struct TQBoxLayoutItem
{
TQBoxLayoutItem( TQLayoutItem *it, int stretch_ = 0 )
- : item( it ), stretch( stretch_ ), magic( FALSE ) { }
+ : item( it ), stretch( stretch_ ), magic( false ) { }
~TQBoxLayoutItem() { delete item; }
int hfw( int w ) {
@@ -1556,8 +1556,8 @@ struct TQBoxLayoutItem
class TQBoxLayoutData
{
public:
- TQBoxLayoutData() : geomArray( 0 ), hfwWidth( -1 ), dirty( TRUE )
- { list.setAutoDelete( TRUE ); }
+ TQBoxLayoutData() : geomArray( 0 ), hfwWidth( -1 ), dirty( true )
+ { list.setAutoDelete( true ); }
~TQBoxLayoutData() { delete geomArray; }
void setDirty() {
@@ -1565,7 +1565,7 @@ public:
geomArray = 0;
hfwWidth = -1;
hfwHeight = -1;
- dirty = TRUE;
+ dirty = true;
}
TQPtrList<TQBoxLayoutItem> list;
@@ -1732,7 +1732,7 @@ TQBoxLayout::TQBoxLayout( TQWidget *parent, Direction d,
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1749,7 +1749,7 @@ TQBoxLayout::TQBoxLayout( TQLayout *parentLayout, Direction d, int spacing,
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1765,7 +1765,7 @@ TQBoxLayout::TQBoxLayout( Direction d, int spacing, const char *name )
{
data = new TQBoxLayoutData;
dir = d;
- setSupportsMargin( TRUE );
+ setSupportsMargin( true );
}
/*!
@@ -1821,8 +1821,8 @@ TQSize TQBoxLayout::maximumSize() const
}
/*!
- Returns TRUE if this layout's preferred height depends on its width;
- otherwise returns FALSE.
+ Returns true if this layout's preferred height depends on its width;
+ otherwise returns false.
*/
bool TQBoxLayout::hasHeightForWidth() const
{
@@ -2001,7 +2001,7 @@ void TQBoxLayout::insertSpacing( int index, int size )
TQSizePolicy::Fixed );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b );
- it->magic = TRUE;
+ it->magic = true;
data->list.insert( index, it );
invalidate();
}
@@ -2028,7 +2028,7 @@ void TQBoxLayout::insertStretch( int index, int stretch )
TQSizePolicy::Expanding );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b, stretch );
- it->magic = TRUE;
+ it->magic = true;
data->list.insert( index, it );
invalidate();
}
@@ -2179,7 +2179,7 @@ void TQBoxLayout::addStrut( int size )
TQSizePolicy::Fixed );
TQBoxLayoutItem *it = new TQBoxLayoutItem( b );
- it->magic = TRUE;
+ it->magic = true;
data->list.append( it );
invalidate();
}
@@ -2202,8 +2202,8 @@ int TQBoxLayout::findWidget( TQWidget* w )
/*!
Sets the stretch factor for widget \a w to \a stretch and returns
- TRUE if \a w is found in this layout (not including child
- layouts); otherwise returns FALSE.
+ true if \a w is found in this layout (not including child
+ layouts); otherwise returns false.
*/
bool TQBoxLayout::setStretchFactor( TQWidget *w, int stretch )
{
@@ -2214,18 +2214,18 @@ bool TQBoxLayout::setStretchFactor( TQWidget *w, int stretch )
if ( box->item->widget() == w ) {
box->stretch = stretch;
invalidate();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
\overload
Sets the stretch factor for the layout \a l to \a stretch and
- returns TRUE if \a l is found in this layout (not including child
- layouts); otherwise returns FALSE.
+ returns true if \a l is found in this layout (not including child
+ layouts); otherwise returns false.
*/
bool TQBoxLayout::setStretchFactor( TQLayout *l, int stretch )
{
@@ -2236,10 +2236,10 @@ bool TQBoxLayout::setStretchFactor( TQLayout *l, int stretch )
if ( box->item->layout() == l ) {
box->stretch = stretch;
invalidate();
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
/*!
@@ -2306,17 +2306,17 @@ void TQBoxLayout::setupGeom()
int hintw = 0;
int hinth = 0;
- bool horexp = FALSE;
- bool verexp = FALSE;
+ bool horexp = false;
+ bool verexp = false;
- data->hasHfw = FALSE;
+ data->hasHfw = false;
delete data->geomArray;
int n = data->list.count();
data->geomArray = new TQMemArray<TQLayoutStruct>( n );
TQMemArray<TQLayoutStruct>& a = *data->geomArray;
- bool first = TRUE;
+ bool first = true;
for ( int i = 0; i < n; i++ ) {
TQBoxLayoutItem *box = data->list.at( i );
TQSize max = box->item->maximumSize();
@@ -2380,7 +2380,7 @@ void TQBoxLayout::setupGeom()
.expandedTo( data->minSize )
.boundedTo( data->maxSize );
- data->dirty = FALSE;
+ data->dirty = false;
}
/*
@@ -2403,7 +2403,7 @@ void TQBoxLayout::calcHfw( int w )
} else {
TQPtrListIterator<TQBoxLayoutItem> it( data->list );
TQBoxLayoutItem *box;
- bool first = TRUE;
+ bool first = true;
while ( (box = it.current()) != 0 ) {
++it;
bool empty = box->item->isEmpty();
@@ -2444,7 +2444,7 @@ void TQBoxLayout::calcHfw( int w )
The simplest use of the class is like this:
\code
TQBoxLayout * l = new TQHBoxLayout( widget );
- l->setAutoAdd( TRUE );
+ l->setAutoAdd( true );
new TQSomeWidget( widget );
new TQSomeOtherWidget( widget );
new TQAnotherWidget( widget );
diff --git a/src/kernel/tqlayoutengine.cpp b/src/kernel/tqlayoutengine.cpp
index 9eee672e6..131e64d4b 100644
--- a/src/kernel/tqlayoutengine.cpp
+++ b/src/kernel/tqlayoutengine.cpp
@@ -73,12 +73,12 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
int sumStretch = 0;
int spacerCount = 0;
- bool wannaGrow = FALSE; // anyone who really wants to grow?
- // bool canShrink = FALSE; // anyone who could be persuaded to shrink?
+ bool wannaGrow = false; // anyone who really wants to grow?
+ // bool canShrink = false; // anyone who could be persuaded to shrink?
int i;
for ( i = start; i < start + count; i++ ) {
- chain[i].done = FALSE;
+ chain[i].done = false;
cHint += chain[i].smartSizeHint();
cMin += chain[i].minimumSize;
cMax += chain[i].maximumSize;
@@ -94,7 +94,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( space < cMin + spacerCount * spacer ) {
for ( i = start; i < start+count; i++ ) {
chain[i].size = chain[i].minimumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
}
} else if ( space < cHint + spacerCount*spacer ) {
/*
@@ -112,7 +112,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done
&& chain[i].minimumSize >= chain[i].smartSizeHint() ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
// sumStretch -= chain[i].stretch;
n--;
@@ -120,7 +120,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
}
bool finished = n == 0;
while ( !finished ) {
- finished = TRUE;
+ finished = true;
fixed fp_over = toFixed( overdraft );
fixed fp_w = 0;
@@ -135,9 +135,9 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
chain[i].size = chain[i].smartSizeHint() - w;
fp_w -= toFixed( w ); // give the difference to the next
if ( chain[i].size < chain[i].minimumSize ) {
- chain[i].done = TRUE;
+ chain[i].done = true;
chain[i].size = chain[i].minimumSize;
- finished = FALSE;
+ finished = false;
overdraft -= ( chain[i].smartSizeHint()
- chain[i].minimumSize );
// sumStretch -= chain[i].stretch;
@@ -155,7 +155,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
&& (chain[i].maximumSize <= chain[i].smartSizeHint()
|| (wannaGrow && !chain[i].expansive && chain[i].stretch == 0)) ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
sumStretch -= chain[i].stretch;
n--;
@@ -201,7 +201,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done &&
chain[i].size < chain[i].smartSizeHint() ) {
chain[i].size = chain[i].smartSizeHint();
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].smartSizeHint();
sumStretch -= chain[i].stretch;
n--;
@@ -214,7 +214,7 @@ TQ_EXPORT void qGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int coun
if ( !chain[i].done &&
chain[i].size > chain[i].maximumSize ) {
chain[i].size = chain[i].maximumSize;
- chain[i].done = TRUE;
+ chain[i].done = true;
space_left -= chain[i].maximumSize;
sumStretch -= chain[i].stretch;
n--;
diff --git a/src/kernel/tqlayoutengine_p.h b/src/kernel/tqlayoutengine_p.h
index efb1295e8..eee74de79 100644
--- a/src/kernel/tqlayoutengine_p.h
+++ b/src/kernel/tqlayoutengine_p.h
@@ -67,8 +67,8 @@ struct TQLayoutStruct
stretch = stretchFactor;
minimumSize = sizeHint = spacing;
maximumSize = TQLAYOUTSIZE_MAX;
- expansive = FALSE;
- empty = TRUE;
+ expansive = false;
+ empty = true;
}
TQCOORD smartSizeHint() {
diff --git a/src/kernel/tqlocalfs.cpp b/src/kernel/tqlocalfs.cpp
index 69e2eba72..d4d14065a 100644
--- a/src/kernel/tqlocalfs.cpp
+++ b/src/kernel/tqlocalfs.cpp
@@ -128,7 +128,7 @@ void TQLocalFs::operationListChildren( TQNetworkOperation *op )
dir = TQDir( url()->path() );
dir.setNameFilter( url()->nameFilter() );
- dir.setMatchAllDirs( TRUE );
+ dir.setMatchAllDirs( true );
if ( !dir.isReadable() ) {
TQString msg = tr( "Could not read directory\n%1" ).arg( url()->path() );
op->setState( StFailed );
@@ -206,14 +206,14 @@ void TQLocalFs::operationRemove( TQNetworkOperation *op )
#endif
op->setState( StInProgress );
TQString name = TQUrl( op->arg( 0 ) ).path();
- bool deleted = FALSE;
+ bool deleted = false;
dir = TQDir( url()->path() );
TQFileInfo fi( dir, name );
if ( fi.isDir() ) {
if ( dir.rmdir( name ) )
- deleted = TRUE;
+ deleted = true;
}
if ( deleted || dir.remove( name ) ) {
diff --git a/src/kernel/tqmetaobject.cpp b/src/kernel/tqmetaobject.cpp
index 4e5686295..4464f716d 100644
--- a/src/kernel/tqmetaobject.cpp
+++ b/src/kernel/tqmetaobject.cpp
@@ -173,7 +173,7 @@ typedef const TQMetaData TQConstMetaData;
class TQ_EXPORT TQMemberDict : public TQAsciiDict<TQConstMetaData>
{
public:
- TQMemberDict( int size = 17, bool cs = TRUE, bool ck = TRUE ) :
+ TQMemberDict( int size = 17, bool cs = true, bool ck = true ) :
TQAsciiDict<TQConstMetaData>(size,cs,ck) {}
TQMemberDict( const TQMemberDict &dict ) : TQAsciiDict<TQConstMetaData>(dict) {}
~TQMemberDict() { clear(); }
@@ -325,7 +325,7 @@ TQMetaObject::~TQMetaObject()
/*!
Returns the number of slots for this class.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
\sa slotNames()
*/
@@ -340,7 +340,7 @@ int TQMetaObject::numSlots( bool super ) const // number of slots
/*!
Returns the number of signals for this class.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
\sa signalNames()
*/
@@ -358,7 +358,7 @@ int TQMetaObject::numSignals( bool super ) const // number of signals
Returns the meta data of the slot with the name \a n or 0 if no
such slot exists.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
*/
const TQMetaData* TQMetaObject::slot( int index, bool super ) const
{
@@ -376,7 +376,7 @@ const TQMetaData* TQMetaObject::slot( int index, bool super ) const
Returns the meta data of the signal with the name \a n or 0 if no
such signal exists.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
const TQMetaData* TQMetaObject::signal( int index, bool super ) const
{
@@ -411,7 +411,7 @@ const TQMetaData* TQMetaObject::signal( int index, bool super ) const
/*! \internal
Returns the index of the signal with name \n or -1 if no such signal exists.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
int TQMetaObject::findSignal( const char* n, bool super ) const
{
@@ -450,7 +450,7 @@ int TQMetaObject::findSignal( const char* n, bool super ) const
/*! \internal
Returns the index of the slot with name \n or -1 if no such slot exists.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
*/
int TQMetaObject::findSlot( const char* n, bool super ) const
{
@@ -510,7 +510,7 @@ TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n )
{
if ( n == 0 ) // nothing, then make no dict
return 0;
- TQMemberDict *dict = new TQMemberDict( optDictSize(n), TRUE, FALSE );
+ TQMemberDict *dict = new TQMemberDict( optDictSize(n), true, false );
TQ_CHECK_PTR( dict );
while ( n-- ) { // put all members into dict
dict->insert( data->name, data );
@@ -523,7 +523,7 @@ TQMemberDict *TQMetaObject::init( const TQMetaData * data, int n )
Returns the number of items of class information available for
this class.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
int TQMetaObject::numClassInfo( bool super ) const
{
@@ -534,7 +534,7 @@ int TQMetaObject::numClassInfo( bool super ) const
Returns the class information with index \a index or 0 if no such
information exists.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const
{
@@ -552,7 +552,7 @@ const TQClassInfo* TQMetaObject::classInfo( int index, bool super ) const
Returns the class information with name \a name or 0 if no such
information exists.
- If \a super is TRUE, inherited class information is included.
+ If \a super is true, inherited class information is included.
*/
const char* TQMetaObject::classInfo( const char* name, bool super ) const
{
@@ -570,7 +570,7 @@ const char* TQMetaObject::classInfo( const char* name, bool super ) const
/*!
Returns the number of properties for this class.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa propertyNames()
*/
@@ -586,7 +586,7 @@ int TQMetaObject::numProperties( bool super ) const // number of signals
Returns the property meta data for the property at index \a index
or 0 if no such property exists.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa propertyNames()
*/
@@ -605,7 +605,7 @@ const TQMetaProperty* TQMetaObject::property( int index, bool super ) const
Returns the index for the property with name \a name or -1 if no
such property exists.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property(), propertyNames()
*/
@@ -627,7 +627,7 @@ int TQMetaObject::findProperty( const char *name, bool super ) const
Returns the index for the property \a prop
or -1 if the property can not be found.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property(), propertyNames()
*/
@@ -653,7 +653,7 @@ const TQMetaProperty* TQMetaObject::resolveProperty( const TQMetaProperty* p ) c
{
if ( !superclass )
return 0;
- return superclass->property( superclass->findProperty( p->n, TRUE ), TRUE );
+ return superclass->property( superclass->findProperty( p->n, true ), true );
}
/*!\internal
@@ -668,20 +668,20 @@ int TQMetaObject::resolveProperty( int index ) const
if ( !superclass )
return -1;
const TQMetaProperty* p = d->propData + ( index - propertyOffset() );
- return superclass->findProperty( p->n, TRUE );
+ return superclass->findProperty( p->n, true );
}
/*!
Returns a list with the names of all this class's properties.
- If \a super is TRUE, inherited properties are included.
+ If \a super is true, inherited properties are included.
\sa property()
*/
TQStrList TQMetaObject::propertyNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
if ( superclass && super ) {
TQStrList sl = superclass->propertyNames( super );
@@ -700,11 +700,11 @@ TQStrList TQMetaObject::propertyNames( bool super ) const
/*!
Returns a list with the names of all this class's signals.
- If \a super is TRUE, inherited signals are included.
+ If \a super is true, inherited signals are included.
*/
TQStrList TQMetaObject::signalNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
int n = numSignals( super );
for( int i = 0; i < n; ++i ) {
l.append( signal(i, super)->name );
@@ -715,13 +715,13 @@ TQStrList TQMetaObject::signalNames( bool super ) const
/*!
Returns a list with the names of all this class's slots.
- If \a super is TRUE, inherited slots are included.
+ If \a super is true, inherited slots are included.
\sa numSlots()
*/
TQStrList TQMetaObject::slotNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
int n = numSlots( super );
for( int i = 0; i < n; ++i )
l.append( slot( i, super)->name );
@@ -745,7 +745,7 @@ int TQMetaObject::numEnumerators( bool super ) const
*/
TQStrList TQMetaObject::enumeratorNames( bool super ) const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
if ( superclass && super ) {
TQStrList sl = superclass->enumeratorNames( super );
@@ -777,8 +777,8 @@ const TQMetaEnum* TQMetaObject::enumerator( const char* name, bool super ) const
/*!
- Returns TRUE if this class inherits \a clname within the meta
- object inheritance chain; otherwise returns FALSE.
+ Returns true if this class inherits \a clname within the meta
+ object inheritance chain; otherwise returns false.
(A class is considered to inherit itself.)
*/
@@ -787,10 +787,10 @@ bool TQMetaObject::inherits( const char* clname ) const
const TQMetaObject *meta = this;
while ( meta ) {
if ( qstrcmp(clname, meta->className()) == 0 )
- return TRUE;
+ return true;
meta = meta->superclass;
}
- return FALSE;
+ return false;
}
/*! \internal */
@@ -813,7 +813,7 @@ TQMetaObject *TQMetaObject::metaObject( const char *class_name )
bool TQMetaObject::hasMetaObject( const char *class_name )
{
if ( !qt_metaobjects )
- return FALSE;
+ return false;
#ifdef TQT_THREAD_SUPPORT
TQMutexLocker( tqt_global_mutexpool ?
tqt_global_mutexpool->get( &qt_metaobjects ) : 0 );
@@ -837,9 +837,9 @@ bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v
return superclass->tqt_static_property( o, id, f, v );
switch ( f ) {
case 3: case 4: case 5:
- return TRUE;
+ return true;
default:
- return FALSE;
+ return false;
}
}
@@ -877,10 +877,10 @@ bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v
*/
TQStrList TQMetaProperty::enumKeys() const
{
- TQStrList l( FALSE );
+ TQStrList l( false );
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return l;
if ( ed != 0 ) {
@@ -907,7 +907,7 @@ int TQMetaProperty::keyToValue( const char* key ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return -1;
for ( uint i = 0; i < ed->count; ++i ) {
@@ -928,7 +928,7 @@ const char* TQMetaProperty::valueToKey( int value ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return 0;
for ( uint i = 0; i < ed->count; ++i ) {
@@ -948,7 +948,7 @@ int TQMetaProperty::keysToValue( const TQStrList& keys ) const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return -1;
int value = 0;
@@ -976,7 +976,7 @@ TQStrList TQMetaProperty::valueToKeys( int value ) const
TQStrList keys;
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
if ( !ed )
return keys;
@@ -997,7 +997,7 @@ bool TQMetaProperty::writable() const
return testFlags( Writable );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->writable() : FALSE;
+ return parent ? parent->writable() : false;
}
/*!\internal
@@ -1008,14 +1008,14 @@ bool TQMetaProperty::stdSet() const
return testFlags( StdSet );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->stdSet() : FALSE;
+ return parent ? parent->stdSet() : false;
}
/*!\internal
*/
int TQMetaProperty::id() const
{
- return _id < 0 ? (*meta)->indexOfProperty( this, TRUE ) : _id;
+ return _id < 0 ? (*meta)->indexOfProperty( this, true ) : _id;
}
/*! \internal
@@ -1032,21 +1032,21 @@ void TQMetaProperty::clear()
bool TQMetaProperty::isValid() const
{
if ( testFlags( UnresolvedEnum ) ) {
- if ( !enumData && (!meta || !(*meta)->enumerator( t, TRUE ) ) )
- return FALSE;
+ if ( !enumData && (!meta || !(*meta)->enumerator( t, true ) ) )
+ return false;
}
if ( !testFlags( Override ) || testFlags( Readable ) )
return testFlags( Readable );
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->isValid() : FALSE;
+ return parent ? parent->isValid() : false;
}
bool TQMetaProperty::isSetType() const
{
const TQMetaEnum* ed = enumData;
if ( !enumData && meta )
- ed = (*meta)->enumerator( t, TRUE );
+ ed = (*meta)->enumerator( t, true );
return ( ed != 0 && ed->set );
}
@@ -1072,7 +1072,7 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::writable() const
- Returns TRUE if the property is writable; otherwise returns FALSE.
+ Returns true if the property is writable; otherwise returns false.
*/
@@ -1086,8 +1086,8 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::isEnumType() const
- Returns TRUE if the property's type is an enumeration value;
- otherwise returns FALSE.
+ Returns true if the property's type is an enumeration value;
+ otherwise returns false.
\sa isSetType(), enumKeys()
*/
@@ -1095,17 +1095,17 @@ bool TQMetaProperty::isEnumType() const
/*!
\fn bool TQMetaProperty::isSetType() const
- Returns TRUE if the property's type is an enumeration value that
+ Returns true if the property's type is an enumeration value that
is used as set, i.e. if the enumeration values can be OR-ed
- together; otherwise returns FALSE. A set type is implicitly also
+ together; otherwise returns false. A set type is implicitly also
an enum type.
\sa isEnumType(), enumKeys()
*/
-/*! Returns TRUE if the property is designable for object \a o;
- otherwise returns FALSE.
+/*! Returns true if the property is designable for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1113,22 +1113,22 @@ bool TQMetaProperty::isEnumType() const
bool TQMetaProperty::designable( TQObject* o ) const
{
if ( !isValid() || !writable() )
- return FALSE;
+ return false;
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 3, 0 );
}
if ( testFlags( DesignableOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->designable() : FALSE;
+ return parent ? parent->designable() : false;
}
return !testFlags( NotDesignable );
}
/*!
- Returns TRUE if the property is scriptable for object \a o;
- otherwise returns FALSE.
+ Returns true if the property is scriptable for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1136,20 +1136,20 @@ bool TQMetaProperty::designable( TQObject* o ) const
bool TQMetaProperty::scriptable( TQObject* o ) const
{
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 4, 0 );
}
if ( testFlags( ScriptableOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->scriptable() : FALSE;
+ return parent ? parent->scriptable() : false;
}
return !testFlags( NotScriptable );
}
/*!
- Returns TRUE if the property shall be stored for object \a o;
- otherwise returns FALSE.
+ Returns true if the property shall be stored for object \a o;
+ otherwise returns false.
If no object \a o is given, the function returns a static
approximation.
@@ -1157,15 +1157,15 @@ bool TQMetaProperty::scriptable( TQObject* o ) const
bool TQMetaProperty::stored( TQObject* o ) const
{
if ( !isValid() || !writable() )
- return FALSE;
+ return false;
if ( o ) {
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
return idx >= 0 && o->tqt_property( idx, 5, 0 );
}
if ( testFlags( StoredOverride ) ) {
const TQMetaObject* mo = (*meta);
const TQMetaProperty* parent = mo->resolveProperty( this );
- return parent ? parent->stored() : FALSE;
+ return parent ? parent->stored() : false;
}
return !testFlags( NotStored );
}
@@ -1173,7 +1173,7 @@ bool TQMetaProperty::stored( TQObject* o ) const
/*!
Tries to reset the property for object \a o with a reset method.
- On success, returns TRUE; otherwise returns FALSE.
+ On success, returns true; otherwise returns false.
Reset methods are optional, usually only a few properties support
them.
@@ -1181,8 +1181,8 @@ bool TQMetaProperty::stored( TQObject* o ) const
bool TQMetaProperty::reset( TQObject* o ) const
{
if ( !o )
- return FALSE;
- int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
+ return false;
+ int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, true );
if ( idx < 0 )
return 0;
return o->tqt_property( idx, 2, 0 );
diff --git a/src/kernel/tqmetaobject.h b/src/kernel/tqmetaobject.h
index 9db397f47..4bdeedab8 100644
--- a/src/kernel/tqmetaobject.h
+++ b/src/kernel/tqmetaobject.h
@@ -171,34 +171,34 @@ public:
bool inherits( const char* clname ) const;
- int numSlots( bool super = FALSE ) const;
- int numSignals( bool super = FALSE ) const;
+ int numSlots( bool super = false ) const;
+ int numSignals( bool super = false ) const;
- int findSlot( const char *, bool super = FALSE ) const;
- int findSignal( const char *, bool super = FALSE ) const;
+ int findSlot( const char *, bool super = false ) const;
+ int findSignal( const char *, bool super = false ) const;
- const TQMetaData *slot( int index, bool super = FALSE ) const;
- const TQMetaData *signal( int index, bool super = FALSE ) const;
+ const TQMetaData *slot( int index, bool super = false ) const;
+ const TQMetaData *signal( int index, bool super = false ) const;
- TQStrList slotNames( bool super = FALSE ) const;
- TQStrList signalNames( bool super = FALSE ) const;
+ TQStrList slotNames( bool super = false ) const;
+ TQStrList signalNames( bool super = false ) const;
int slotOffset() const;
int signalOffset() const;
int propertyOffset() const;
- int numClassInfo( bool super = FALSE ) const;
- const TQClassInfo *classInfo( int index, bool super = FALSE ) const;
- const char *classInfo( const char* name, bool super = FALSE ) const;
+ int numClassInfo( bool super = false ) const;
+ const TQClassInfo *classInfo( int index, bool super = false ) const;
+ const char *classInfo( const char* name, bool super = false ) const;
#ifndef TQT_NO_PROPERTIES
- const TQMetaProperty *property( int index, bool super = FALSE ) const;
- int findProperty( const char *name, bool super = FALSE ) const;
- int indexOfProperty( const TQMetaProperty*, bool super = FALSE ) const;
+ const TQMetaProperty *property( int index, bool super = false ) const;
+ int findProperty( const char *name, bool super = false ) const;
+ int indexOfProperty( const TQMetaProperty*, bool super = false ) const;
const TQMetaProperty* resolveProperty( const TQMetaProperty* ) const;
int resolveProperty( int ) const;
- TQStrList propertyNames( bool super = FALSE ) const;
- int numProperties( bool super = FALSE ) const;
+ TQStrList propertyNames( bool super = false ) const;
+ int numProperties( bool super = false ) const;
#endif
// static wrappers around constructors, necessary to work around a
@@ -220,9 +220,9 @@ public:
const TQMetaEnum *const enum_data, int n_enums,
bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info );
- TQStrList enumeratorNames( bool super = FALSE ) const;
- int numEnumerators( bool super = FALSE ) const;
- const TQMetaEnum *enumerator( const char* name, bool super = FALSE ) const;
+ TQStrList enumeratorNames( bool super = false ) const;
+ int numEnumerators( bool super = false ) const;
+ const TQMetaEnum *enumerator( const char* name, bool super = false ) const;
#endif
static TQMetaObject *metaObject( const char *class_name );
diff --git a/src/kernel/tqmime.cpp b/src/kernel/tqmime.cpp
index ba12e4c8e..4468082c1 100644
--- a/src/kernel/tqmime.cpp
+++ b/src/kernel/tqmime.cpp
@@ -128,8 +128,8 @@ TQMimeSource::~TQMimeSource()
/*!
- Returns TRUE if the object can provide the data in format \a
- mimeType; otherwise returns FALSE.
+ Returns true if the object can provide the data in format \a
+ mimeType; otherwise returns false.
If you inherit from TQMimeSource, for consistency reasons it is
better to implement the more abstract canDecode() functions such
@@ -140,10 +140,10 @@ bool TQMimeSource::provides(const char* mimeType) const
const char* fmt;
for (int i=0; (fmt = format(i)); i++) {
if ( !tqstricmp(mimeType,fmt) ) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
@@ -277,7 +277,7 @@ TQMimeSource* TQMimeSourceFactory::dataInternal(const TQString& abs_name, const
if ( fi.isReadable() ) {
// get the right mimetype
- TQString e = fi.extension(FALSE);
+ TQString e = fi.extension(false);
TQCString mimetype = "application/octet-stream";
const char* imgfmt;
if ( extensions.contains(e) )
@@ -381,7 +381,7 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
}
}
- static bool looping = FALSE;
+ static bool looping = false;
if ( !r && this == defaultFactory() ) {
// we found no mime-source and we are the default factory, so
// we know all the other installed mime-source factories, so
@@ -389,7 +389,7 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
if ( !looping ) {
// to avoid endless recustions, don't enter the loop below
// if data() got called from within the loop below
- looping = TRUE;
+ looping = true;
TQPtrListIterator<TQMimeSourceFactory> it( d->factories );
TQMimeSourceFactory *f;
while ( ( f = it.current() ) ) {
@@ -398,11 +398,11 @@ const TQMimeSource* TQMimeSourceFactory::data(const TQString& abs_name) const
continue;
r = (TQMimeSource*)f->data( abs_name );
if ( r ) {
- looping = FALSE;
+ looping = false;
return r;
}
}
- looping = FALSE;
+ looping = false;
}
} else if ( !r ) {
// we are not the default mime-source factory, so ask the
@@ -472,7 +472,7 @@ TQString TQMimeSourceFactory::makeAbsolute(const TQString& abs_or_rel_name, cons
return context;
TQFileInfo c( context );
if (!c.isDir()) {
- TQFileInfo r( c.dir(TRUE), abs_or_rel_name );
+ TQFileInfo r( c.dir(true), abs_or_rel_name );
return r.absFilePath();
} else {
TQDir d(context);
diff --git a/src/kernel/tqmngio.cpp b/src/kernel/tqmngio.cpp
index 737cab55c..7b309326e 100644
--- a/src/kernel/tqmngio.cpp
+++ b/src/kernel/tqmngio.cpp
@@ -66,13 +66,13 @@ public:
// ### We should figure out how many loops an MNG has, but for now always assume infinite.
if (consumer)
consumer->setLooping(0);
- return TRUE;
+ return true;
}
bool closestream( )
{
if (consumer)
consumer->end();
- return TRUE;
+ return true;
}
bool readdata( mng_ptr pBuf, mng_uint32 iBuflen, mng_uint32p pRead )
{
@@ -86,7 +86,7 @@ public:
// enough in buffer
memcpy(pBuf, buffer+ubuffer, iBuflen);
ubuffer += iBuflen;
- return TRUE;
+ return true;
}
if ( n ) {
// consume buffer
@@ -101,7 +101,7 @@ public:
data += iBuflen;
ndata -= iBuflen;
}
- return TRUE;
+ return true;
}
bool errorproc( mng_int32 iErrorcode,
mng_int8 /*iSeverity*/,
@@ -118,18 +118,18 @@ public:
(iChunkname>>8)&0xff,
(iChunkname>>0)&0xff,
iExtra1,iExtra2);
- return TRUE;
+ return true;
}
bool processheader( mng_uint32 iWidth, mng_uint32 iHeight )
{
image->create(iWidth,iHeight,32);
- image->setAlphaBuffer(TRUE);
+ image->setAlphaBuffer(true);
memset(image->bits(),0,iWidth*iHeight*4);
consumer->setSize(iWidth,iHeight);
mng_set_canvasstyle(handle,
TQImage::systemByteOrder() == TQImage::LittleEndian
? MNG_CANVAS_BGRA8 : MNG_CANVAS_ARGB8 );
- return TRUE;
+ return true;
}
mng_ptr getcanvasline( mng_uint32 iLinenr )
{
@@ -141,7 +141,7 @@ public:
consumer->changed(r);
consumer->setFramePeriod(0);
consumer->frameDone();
- return TRUE;
+ return true;
}
mng_uint32 gettickcount( )
{
@@ -154,7 +154,7 @@ public:
state = Time;
losingtimer.start();
losttime -= iMsecs;
- return TRUE;
+ return true;
}
private:
@@ -440,9 +440,9 @@ void qCleanupMngIO()
void qInitMngIO()
{
- static bool done = FALSE;
+ static bool done = false;
if ( !done ) {
- done = TRUE;
+ done = true;
#ifndef TQT_NO_ASYNC_IMAGE_IO
globalMngFormatTypeObject = new TQMNGFormatType;
tqAddPostRoutine( qCleanupMngIO );
diff --git a/src/kernel/tqmotifdnd_x11.cpp b/src/kernel/tqmotifdnd_x11.cpp
index e1481446f..18e69b139 100644
--- a/src/kernel/tqmotifdnd_x11.cpp
+++ b/src/kernel/tqmotifdnd_x11.cpp
@@ -81,7 +81,7 @@ in doc/dnd.doc, where the documentation system can see it. */
static Atom atom_message_type, atom_receiver_info, atom_src_property_type;
static Atom atom_motif_window, atom_target_list ;
-static bool in_drop_site = FALSE;
+static bool in_drop_site = false;
static Window cur_window = 0;
static TQWidget *drop_widget = 0L;
@@ -775,8 +775,8 @@ TQByteArray qt_motifdnd_obtain_data( const char *mimeType )
if ( qt_xclb_read_property( tqt_xdisplay(),
tw->winId(),
- Dnd_selection, TRUE,
- &result, 0, &type, 0, TRUE ) ) {
+ Dnd_selection, true,
+ &result, 0, &type, 0, true ) ) {
}
}
@@ -826,7 +826,7 @@ void qt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pas
send a drop site enter or drop site leave or echo */
TQPoint p( dnd_data.x, dnd_data.y );
- TQWidget *c = TQApplication::widgetAt( p, TRUE );
+ TQWidget *c = TQApplication::widgetAt( p, true );
if (c)
p = c->mapFromGlobal(p);
@@ -918,7 +918,7 @@ void qt_motifdnd_handle_msg( TQWidget * /* w */ , const XEvent * xe, bool /* pas
/* get the size of our drop site for later use */
cur_window = dnd_data.src_window ;
- qt_motifdnd_active = TRUE;
+ qt_motifdnd_active = true;
/* no answer needed, just read source property */
DndReadSourceProperty (event.xclient.display,
diff --git a/src/kernel/tqmovie.cpp b/src/kernel/tqmovie.cpp
index 6350f5ceb..76e676144 100644
--- a/src/kernel/tqmovie.cpp
+++ b/src/kernel/tqmovie.cpp
@@ -213,14 +213,14 @@ public:
TQMoviePrivate::TQMoviePrivate()
{
- dirty_cache = FALSE;
+ dirty_cache = false;
buffer = 0;
pump = 0;
source = 0;
decoder = 0;
display_widget=0;
buf_size = 0;
- init(FALSE);
+ init(false);
}
// NOTE: The ownership of the TQDataSource is transferred to the Private
@@ -231,13 +231,13 @@ TQMoviePrivate::TQMoviePrivate(TQDataSource* src, TQMovie* movie, int bufsize) :
frametimer = new TQTimer(this);
pump = src ? new TQDataPump(src, this) : 0;
TQObject::connect(frametimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(refresh()));
- dirty_cache = FALSE;
+ dirty_cache = false;
source = src;
buffer = 0;
decoder = 0;
speed = 100;
display_widget=0;
- init(TRUE);
+ init(true);
}
TQMoviePrivate::~TQMoviePrivate()
@@ -258,12 +258,12 @@ bool TQMoviePrivate::isNull() const
return !buf_size;
}
-// Initialize. Only actually allocate any space if \a fully is TRUE,
+// Initialize. Only actually allocate any space if \a fully is true,
// otherwise, just enough to be a valid null Private.
void TQMoviePrivate::init(bool fully)
{
#ifdef QT_SAVE_MOVIE_HACK
- save_image = TRUE;
+ save_image = true;
image_number = 0;
#endif
@@ -282,7 +282,7 @@ void TQMoviePrivate::init(bool fully)
source->open(IO_ReadOnly);
#endif
- waitingForFrameTick = FALSE;
+ waitingForFrameTick = false;
stepping = -1;
framenumber = 0;
frameperiod = -1;
@@ -291,9 +291,9 @@ void TQMoviePrivate::init(bool fully)
changed_area.setRect(0,0,-1,-1);
valid_area = changed_area;
loop = -1;
- movie_ended = FALSE;
+ movie_ended = false;
error = 0;
- empty = TRUE;
+ empty = true;
}
void TQMoviePrivate::flushBuffer()
@@ -366,7 +366,7 @@ void TQMoviePrivate::updatePixmapFromImage(const TQPoint& off,
if ( !TQPixmapCache::find( key, lines ) ) {
lines.convertFromImage(img, TQt::ColorOnly);
TQPixmapCache::insert( key, lines );
- dirty_cache = TRUE;
+ dirty_cache = true;
}
} else
#endif
@@ -416,7 +416,7 @@ void TQMoviePrivate::changed(const TQRect& rect)
void TQMoviePrivate::end()
{
- movie_ended = TRUE;
+ movie_ended = true;
}
void TQMoviePrivate::preFrameDone()
@@ -428,7 +428,7 @@ void TQMoviePrivate::preFrameDone()
emit dataStatus( TQMovie::Paused );
}
} else {
- waitingForFrameTick = TRUE;
+ waitingForFrameTick = true;
restartTimer();
}
}
@@ -471,7 +471,7 @@ void TQMoviePrivate::setLooping(int nloops)
{
if (loop == -1) { // Only if we don't already know how many loops!
if (source && source->rewindable()) {
- source->enableRewind(TRUE);
+ source->enableRewind(true);
loop = nloops;
} else {
// Cannot loop from this source
@@ -508,7 +508,7 @@ int TQMoviePrivate::readyToReceive()
void TQMoviePrivate::receive(const uchar* b, int bytecount)
{
- if ( bytecount ) empty = FALSE;
+ if ( bytecount ) empty = false;
while (bytecount && !waitingForFrameTick && stepping != 0) {
int used = decoder->decode(b, bytecount);
@@ -540,7 +540,7 @@ void TQMoviePrivate::eof()
emit dataStatus(TQMovie::SourceEmpty);
#ifdef QT_SAVE_MOVIE_HACK
- save_image = FALSE;
+ save_image = false;
#endif
emit dataStatus(TQMovie::EndOfLoop);
@@ -554,7 +554,7 @@ void TQMoviePrivate::eof()
decoder = new TQImageDecoder(this);
source->rewind();
framenumber = 0;
- movie_ended = FALSE;
+ movie_ended = false;
} else {
delete decoder;
decoder = 0;
@@ -594,7 +594,7 @@ void TQMoviePrivate::refresh()
frametimer->stop();
}
- waitingForFrameTick = FALSE;
+ waitingForFrameTick = false;
flushBuffer();
}
@@ -727,7 +727,7 @@ TQMovie::~TQMovie()
}
/*!
- Returns TRUE if the movie is null; otherwise returns FALSE.
+ Returns true if the movie is null; otherwise returns false.
*/
bool TQMovie::isNull() const
{
@@ -822,7 +822,7 @@ int TQMovie::steps() const
int TQMovie::frameNumber() const { return d->framenumber; }
/*!
- Returns TRUE if the image is paused; otherwise returns FALSE.
+ Returns true if the image is paused; otherwise returns false.
*/
bool TQMovie::paused() const
{
@@ -830,8 +830,8 @@ bool TQMovie::paused() const
}
/*!
- Returns TRUE if the image is no longer playing: this happens when
- all loops of all frames are complete; otherwise returns FALSE.
+ Returns true if the image is no longer playing: this happens when
+ all loops of all frames are complete; otherwise returns false.
*/
bool TQMovie::finished() const
{
@@ -839,8 +839,8 @@ bool TQMovie::finished() const
}
/*!
- Returns TRUE if the image is not single-stepping, not paused, and
- not finished; otherwise returns FALSE.
+ Returns true if the image is not single-stepping, not paused, and
+ not finished; otherwise returns false.
*/
bool TQMovie::running() const
{
@@ -883,7 +883,7 @@ void TQMovie::step(int steps)
return;
d->stepping = steps;
d->frametimer->start(0);
- d->waitingForFrameTick = FALSE; // Full speed ahead!
+ d->waitingForFrameTick = false; // Full speed ahead!
}
/*!
@@ -903,10 +903,10 @@ void TQMovie::restart()
if (d->isNull())
return;
if (d->source->rewindable()) {
- d->source->enableRewind(TRUE);
+ d->source->enableRewind(true);
d->source->rewind();
int s = d->stepping;
- d->init(TRUE);
+ d->init(true);
if ( s>0 )
step(s);
else if ( s==0 )
diff --git a/src/kernel/tqnetworkprotocol.cpp b/src/kernel/tqnetworkprotocol.cpp
index a595c2d0e..b562d7dd4 100644
--- a/src/kernel/tqnetworkprotocol.cpp
+++ b/src/kernel/tqnetworkprotocol.cpp
@@ -64,10 +64,10 @@ public:
opInProgress = 0;
opStartTimer = new TQTimer( p );
removeTimer = new TQTimer( p );
- operationQueue.setAutoDelete( FALSE );
- autoDelete = FALSE;
+ operationQueue.setAutoDelete( false );
+ autoDelete = false;
removeInterval = 10000;
- oldOps.setAutoDelete( FALSE );
+ oldOps.setAutoDelete( false );
}
~TQNetworkProtocolPrivate()
@@ -475,7 +475,7 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
}
- // ### if autoDelete is TRUE, we should delete the TQUrlOperator (something
+ // ### if autoDelete is true, we should delete the TQUrlOperator (something
// like below; but that is not possible since it would delete this, too).
//if ( d->autoDelete && (d->url!=u) ) {
// delete d->url; // destructor deletes the network protocol
@@ -506,14 +506,14 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
}
if ( !d->opInProgress && !d->operationQueue.isEmpty() )
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
}
/*!
For processing operations the network protocol base class calls
this method quite often. This should be reimplemented by new
- network protocols. It should return TRUE if the connection is OK
- (open); otherwise it should return FALSE. If the connection is not
+ network protocols. It should return true if the connection is OK
+ (open); otherwise it should return false. If the connection is not
open the protocol should open it.
If the connection can't be opened (e.g. because you already tried
@@ -526,7 +526,7 @@ void TQNetworkProtocol::setUrl( TQUrlOperator *u )
bool TQNetworkProtocol::checkConnection( TQNetworkOperation * )
{
- return TRUE;
+ return true;
}
/*!
@@ -554,7 +554,7 @@ void TQNetworkProtocol::addOperation( TQNetworkOperation *op )
#endif
d->operationQueue.enqueue( op );
if ( !d->opInProgress )
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
}
/*!
@@ -620,21 +620,21 @@ TQNetworkProtocol *TQNetworkProtocol::getNetworkProtocol( const TQString &protoc
}
/*!
- Returns TRUE if the only protocol registered is for working on the
- local filesystem; returns FALSE if other network protocols are
+ Returns true if the only protocol registered is for working on the
+ local filesystem; returns false if other network protocols are
also registered.
*/
bool TQNetworkProtocol::hasOnlyLocalFileSystem()
{
if ( !tqNetworkProtocolRegister )
- return FALSE;
+ return false;
TQDictIterator< TQNetworkProtocolFactoryBase > it( *tqNetworkProtocolRegister );
for ( ; it.current(); ++it )
if ( it.currentKey() != "file" )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
/*!
@@ -846,7 +846,7 @@ void TQNetworkProtocol::processNextOperation( TQNetworkOperation *old )
if ( d->operationQueue.isEmpty() ) {
d->opInProgress = 0;
if ( d->autoDelete )
- d->removeTimer->start( d->removeInterval, TRUE );
+ d->removeTimer->start( d->removeInterval, true );
return;
}
@@ -856,7 +856,7 @@ void TQNetworkProtocol::processNextOperation( TQNetworkOperation *old )
if ( !checkConnection( op ) ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
- d->opStartTimer->start( 0, TRUE );
+ d->opStartTimer->start( 0, true );
} else {
d->operationQueue.dequeue();
clearOperationQueue();
@@ -897,7 +897,7 @@ TQNetworkOperation *TQNetworkProtocol::operationInProgress() const
void TQNetworkProtocol::clearOperationQueue()
{
d->operationQueue.dequeue();
- d->operationQueue.setAutoDelete( TRUE );
+ d->operationQueue.setAutoDelete( true );
d->operationQueue.clear();
}
@@ -922,10 +922,10 @@ void TQNetworkProtocol::stop()
/*!
Because it's sometimes hard to take care of removing network
protocol instances, TQNetworkProtocol provides an auto-delete
- mechanism. If you set \a b to TRUE, the network protocol instance
+ mechanism. If you set \a b to true, the network protocol instance
is removed after it has been inactive for \a i milliseconds (i.e.
\a i milliseconds after the last operation has been processed).
- If you set \a b to FALSE the auto-delete mechanism is switched
+ If you set \a b to false the auto-delete mechanism is switched
off.
If you switch on auto-delete, the TQNetworkProtocol also deletes
@@ -939,7 +939,7 @@ void TQNetworkProtocol::setAutoDelete( bool b, int i )
}
/*!
- Returns TRUE if auto-deleting is enabled; otherwise returns FALSE.
+ Returns true if auto-deleting is enabled; otherwise returns false.
\sa TQNetworkProtocol::setAutoDelete()
*/
diff --git a/src/kernel/tqobject.cpp b/src/kernel/tqobject.cpp
index ec31f6cd6..86c76c4ee 100644
--- a/src/kernel/tqobject.cpp
+++ b/src/kernel/tqobject.cpp
@@ -101,7 +101,7 @@ public:
ownThread = NULL;
disableThreadPostedEvents = false;
#endif
- setAutoDelete( TRUE );
+ setAutoDelete( true );
controlElementData = NULL;
controlElementDataPrivate = NULL;
}
@@ -234,10 +234,10 @@ void TQObject::moveToThread(TQThread *targetThread)
/*!
Changes the way cross thread signals are handled
- If disable is FALSE, signals emitted from one thread will be
+ If disable is false, signals emitted from one thread will be
posted to any other connected threads' event loops (default).
- If disable is TRUE, calls to emit from one thread
+ If disable is true, calls to emit from one thread
will immediately execute slots in another thread.
This mode of operation is inherently unsafe and is provided
solely to support thread management by a third party application.
@@ -268,7 +268,7 @@ class TQSenderObjectList : public TQObjectList, public TQShared
TQSenderObjectList::TQSenderObjectList() : currentSender( 0 ) {
#ifdef TQT_THREAD_SUPPORT
- listMutex = new TQMutex( TRUE );
+ listMutex = new TQMutex( true );
#endif
}
@@ -452,7 +452,7 @@ bool qKillTimer( int id );
bool qKillTimer( TQObject *obj );
static void removeObjFromList( TQObjectList *objList, const TQObject *obj,
- bool single=FALSE )
+ bool single=false )
{
if ( !objList ) {
return;
@@ -536,7 +536,7 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o )
mo = sender->metaObject();
while ( mo ) {
s.sprintf( "%s_%s", mo->className(), sigData->name );
- int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, TRUE );
+ int slot = tqt_preliminary_signal_spy->metaObject()->findSlot( s, true );
if ( slot >= 0 ) {
#ifdef TQT_THREAD_SUPPORT
// protect access to qt_spy_signal_sender
@@ -656,12 +656,12 @@ const TQObjectList TQObject::objectTreesListObject() {
TQObject::TQObject( TQObject *parent, const char *name )
:
- isSignal( FALSE ), // assume not a signal object
- isWidget( FALSE ), // assume not a widget object
- pendTimer( FALSE ), // no timers yet
- blockSig( FALSE ), // not blocking signals
- wasDeleted( FALSE ), // double-delete catcher
- isTree( FALSE ), // no tree yet
+ isSignal( false ), // assume not a signal object
+ isWidget( false ), // assume not a widget object
+ pendTimer( false ), // no timers yet
+ blockSig( false ), // not blocking signals
+ wasDeleted( false ), // double-delete catcher
+ isTree( false ), // no tree yet
objname( name ? tqstrdup(name) : 0 ), // set object name
parentObj( 0 ), // no parent yet. It is set by insertChild()
childObjects( 0 ), // no children yet
@@ -677,8 +677,8 @@ TQObject::TQObject( TQObject *parent, const char *name )
#ifdef TQT_THREAD_SUPPORT
d->ownThread = TQThread::currentThreadObject();
- d->senderObjectListMutex = new TQMutex( TRUE );
- d->childObjectListMutex = new TQMutex( TRUE );
+ d->senderObjectListMutex = new TQMutex( true );
+ d->childObjectListMutex = new TQMutex( true );
#endif
if ( !metaObj ) { // will create object dict
(void) staticMetaObject();
@@ -689,7 +689,7 @@ TQObject::TQObject( TQObject *parent, const char *name )
}
else {
insert_tree( this );
- isTree = TRUE;
+ isTree = true;
}
}
@@ -744,7 +744,7 @@ TQObject::~TQObject()
}
if ( isTree ) {
remove_tree( this ); // remove from global root list
- isTree = FALSE;
+ isTree = false;
}
if ( parentObj ) // remove it from parent object
parentObj->removeChild( this );
@@ -831,14 +831,14 @@ TQObject::~TQObject()
*/
/*!
- Returns TRUE if this object is an instance of the class \a clname;
- otherwise returns FALSE.
+ Returns true if this object is an instance of the class \a clname;
+ otherwise returns false.
Example:
\code
TQTimer *t = new TQTimer; // TQTimer inherits TQObject
- t->isA( "TQTimer" ); // returns TRUE
- t->isA( "TQObject" ); // returns FALSE
+ t->isA( "TQTimer" ); // returns true
+ t->isA( "TQObject" ); // returns false
\endcode
\sa inherits() metaObject()
@@ -850,23 +850,23 @@ bool TQObject::isA( const char *clname ) const
}
/*!
- Returns TRUE if this object is an instance of a class that
+ Returns true if this object is an instance of a class that
inherits \a clname, and \a clname inherits TQObject; otherwise
- returns FALSE.
+ returns false.
A class is considered to inherit itself.
Example:
\code
TQTimer *t = new TQTimer; // TQTimer inherits TQObject
- t->inherits( "TQTimer" ); // returns TRUE
- t->inherits( "TQObject" ); // returns TRUE
- t->inherits( "TQButton" ); // returns FALSE
+ t->inherits( "TQTimer" ); // returns true
+ t->inherits( "TQObject" ); // returns true
+ t->inherits( "TQButton" ); // returns false
// TQScrollBar inherits TQWidget and TQRangeControl
TQScrollBar *s = new TQScrollBar( 0 );
- s->inherits( "TQWidget" ); // returns TRUE
- s->inherits( "TQRangeControl" ); // returns FALSE
+ s->inherits( "TQWidget" ); // returns true
+ s->inherits( "TQRangeControl" ); // returns false
\endcode
(\l TQRangeControl is not a TQObject.)
@@ -882,8 +882,8 @@ bool TQObject::inherits( const char *clname ) const
/*!
\internal
- Returns TRUE if \a object inherits \a superClass within
- the meta object inheritance chain; otherwise returns FALSE.
+ Returns true if \a object inherits \a superClass within
+ the meta object inheritance chain; otherwise returns false.
\sa inherits()
*/
@@ -961,7 +961,7 @@ const char * TQObject::name( const char * defaultName ) const
inheritsClass. If \a inheritsClass is 0 (the default), any class
matches.
- If \a recursiveSearch is TRUE (the default), child() performs a
+ If \a recursiveSearch is true (the default), child() performs a
depth-first search of the object's children.
If there is no such object, this function returns 0. If there are
@@ -1024,7 +1024,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
\fn bool TQObject::isWidgetType() const
- Returns TRUE if the object is a widget; otherwise returns FALSE.
+ Returns true if the object is a widget; otherwise returns false.
Calling this function is equivalent to calling
inherits("TQWidget"), except that it is much faster.
@@ -1033,7 +1033,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
\fn bool TQObject::highPriority() const
- Returns TRUE if the object is a high-priority object, or FALSE if
+ Returns true if the object is a high-priority object, or false if
it is a standard-priority object.
High-priority objects are placed first in TQObject's list of
@@ -1044,7 +1044,7 @@ void destroyDeepCopiedTQUObjectArray(TQUObject* uArray)
/*!
This virtual function receives events to an object and should
- return TRUE if the event \a e was recognized and processed.
+ return true if the event \a e was recognized and processed.
The event() function can be reimplemented to customize the
behavior of an object.
@@ -1061,27 +1061,27 @@ bool TQObject::event( TQEvent *e )
}
#endif
if ( wasDeleted ) {
- return TRUE;
+ return true;
}
if ( eventFilters ) { // try filters
if ( activate_filters(e) ) { // stopped by a filter
- return TRUE;
+ return true;
}
}
switch ( e->type() ) {
case TQEvent::Timer:
timerEvent( (TQTimerEvent*)e );
- return TRUE;
+ return true;
case TQEvent::ChildInserted:
case TQEvent::ChildRemoved:
childEvent( (TQChildEvent*)e );
- return TRUE;
+ return true;
case TQEvent::DeferredDelete:
delete this;
- return TRUE;
+ return true;
case TQEvent::MetaCall:
{
@@ -1154,11 +1154,11 @@ bool TQObject::event( TQEvent *e )
default:
if ( e->type() >= TQEvent::User ) {
customEvent( (TQCustomEvent*) e );
- return TRUE;
+ return true;
}
break;
}
- return FALSE;
+ return false;
}
/*!
@@ -1228,7 +1228,7 @@ void TQObject::customEvent( TQCustomEvent * )
In your reimplementation of this function, if you want to filter
the event \a e, out, i.e. stop it being handled further, return
- TRUE; otherwise return FALSE.
+ true; otherwise return false.
Example:
\code
@@ -1258,9 +1258,9 @@ void TQObject::customEvent( TQCustomEvent * )
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *k = (TQKeyEvent*)ev;
tqDebug( "Ate key press %d", k->key() );
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
} else {
// pass the event on to the parent class
@@ -1275,7 +1275,7 @@ void TQObject::customEvent( TQCustomEvent * )
purposes.
\warning If you delete the receiver object in this function, be
- sure to return TRUE. Otherwise, TQt will forward the event to the
+ sure to return true. Otherwise, TQt will forward the event to the
deleted object and the program might crash.
\sa installEventFilter()
@@ -1283,7 +1283,7 @@ void TQObject::customEvent( TQCustomEvent * )
bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ )
{
- return FALSE;
+ return false;
}
@@ -1296,24 +1296,24 @@ bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ )
bool TQObject::activate_filters( TQEvent *e )
{
if ( !eventFilters ) // no event filter
- return FALSE;
+ return false;
TQObjectListIt it( *eventFilters );
TQObject *obj = it.current();
while ( obj ) { // send to all filters
- ++it; // until one returns TRUE
+ ++it; // until one returns true
if ( obj->eventFilter(this,e) ) {
- return TRUE;
+ return true;
}
obj = it.current();
}
- return FALSE; // don't do anything with it
+ return false; // don't do anything with it
}
/*!
\fn bool TQObject::signalsBlocked() const
- Returns TRUE if signals are blocked; otherwise returns FALSE.
+ Returns true if signals are blocked; otherwise returns false.
Signals are not blocked by default.
@@ -1321,8 +1321,8 @@ bool TQObject::activate_filters( TQEvent *e )
*/
/*!
- Blocks signals if \a block is TRUE, or unblocks signals if \a
- block is FALSE.
+ Blocks signals if \a block is true, or unblocks signals if \a
+ block is false.
Emitted signals disappear into hyperspace if signals are blocked.
Note that the destroyed() signals will be emitted even if the signals
@@ -1397,7 +1397,7 @@ void TQObject::blockSignals( bool block )
int TQObject::startTimer( int interval )
{
- pendTimer = TRUE; // set timer flag
+ pendTimer = true; // set timer flag
return qStartTimer( interval, (TQObject *)this );
}
@@ -1443,11 +1443,11 @@ static void objSearch( TQObjectList *result,
return;
TQObject *obj = list->first();
while ( obj ) {
- bool ok = TRUE;
+ bool ok = true;
if ( onlyWidgets )
ok = obj->isWidgetType();
else if ( inheritsClass && !obj->inherits(inheritsClass) )
- ok = FALSE;
+ ok = false;
if ( ok ) {
if ( objName )
ok = ( qstrcmp(objName,obj->name()) == 0 );
@@ -1523,9 +1523,9 @@ const TQObjectList *TQObject::objectTrees()
(the default), all classes match. If \a objName is 0 (the
default), all object names match.
- If \a regexpMatch is TRUE (the default), \a objName is a regular
+ If \a regexpMatch is true (the default), \a objName is a regular
expression that the objects's names must match. The syntax is that
- of a TQRegExp. If \a regexpMatch is FALSE, \a objName is a string
+ of a TQRegExp. If \a regexpMatch is false, \a objName is a string
and object names must match it exactly.
Note that \a inheritsClass uses single inheritance from TQObject,
@@ -1534,7 +1534,7 @@ const TQObjectList *TQObject::objectTrees()
reality, but is the best that can be done on the wide variety of
compilers TQt supports.
- Finally, if \a recursiveSearch is TRUE (the default), queryList()
+ Finally, if \a recursiveSearch is true (the default), queryList()
searches \e{n}th-generation as well as first-generation children.
If all this seems a bit complex for your needs, the simpler
@@ -1550,7 +1550,7 @@ const TQObjectList *TQObject::objectTrees()
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((TQButton*)obj)->setEnabled( FALSE );
+ ((TQButton*)obj)->setEnabled( false );
}
delete l; // delete the list, not the objects
\endcode
@@ -1599,9 +1599,9 @@ TQConnectionList *TQObject::receivers( const char* signal ) const
if ( connections && signal ) {
if ( *signal == '2' ) { // tag == 2, i.e. signal
TQCString s = qt_rmWS( signal+1 );
- return receivers( metaObject()->findSignal( (const char*)s, TRUE ) );
+ return receivers( metaObject()->findSignal( (const char*)s, true ) );
} else {
- return receivers( metaObject()->findSignal(signal, TRUE ) );
+ return receivers( metaObject()->findSignal(signal, true ) );
}
}
return 0;
@@ -1620,11 +1620,11 @@ TQConnectionList *TQObject::receivers( int signal ) const
if ( !connections ) {
TQObject* that = (TQObject*) this;
that->connections = new TQSignalVec( signal+1 );
- that->connections->setAutoDelete( TRUE );
+ that->connections->setAutoDelete( true );
}
if ( !connections->at( signal ) ) {
TQConnectionList* clist = new TQConnectionList;
- clist->setAutoDelete( TRUE );
+ clist->setAutoDelete( true );
connections->insert( signal, clist );
return clist;
}
@@ -1655,7 +1655,7 @@ void TQObject::insertChild( TQObject *obj )
if ( obj->isTree ) {
remove_tree( obj );
- obj->isTree = FALSE;
+ obj->isTree = false;
}
if ( obj->parentObj && obj->parentObj != this ) {
#if defined(QT_CHECK_STATE)
@@ -1703,7 +1703,7 @@ void TQObject::removeChild( TQObject *obj )
obj->parentObj = 0;
if ( !obj->wasDeleted ) {
insert_tree( obj ); // it's a root object now
- obj->isTree = TRUE;
+ obj->isTree = true;
}
if ( childObjects->isEmpty() ) {
delete childObjects; // last child removed
@@ -1729,8 +1729,8 @@ void TQObject::removeChild( TQObject *obj )
sent to this object. The filter can either stop the event or
forward it to this object. The event filter \a filterObj receives
events via its eventFilter() function. The eventFilter() function
- must return TRUE if the event should be filtered, (i.e. stopped);
- otherwise it must return FALSE.
+ must return true if the event should be filtered, (i.e. stopped);
+ otherwise it must return false.
If multiple event filters are installed on a single object, the
filter that was installed last is activated first.
@@ -1751,10 +1751,10 @@ void TQObject::removeChild( TQObject *obj )
// special processing for key press
TQKeyEvent *k = (TQKeyEvent *)e;
tqDebug( "Ate key press %d", k->key() );
- return TRUE; // eat event
+ return true; // eat event
} else {
// standard event processing
- return FALSE;
+ return false;
}
}
\endcode
@@ -1773,7 +1773,7 @@ void TQObject::removeChild( TQObject *obj )
accelerator key presses.
\warning If you delete the receiver object in your eventFilter()
- function, be sure to return TRUE. If you return FALSE, TQt sends
+ function, be sure to return true. If you return false, TQt sends
the event to the deleted object and the program will crash.
\sa removeEventFilter(), eventFilter(), event()
@@ -1840,9 +1840,9 @@ static bool check_signal_macro( const TQObject *sender, const char *signal,
else
tqWarning( "TQObject::%s: Use the TQ_SIGNAL macro to %s %s::%s",
func, op, sender->className(), signal );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static bool check_member_code( int code, const TQObject *object,
@@ -1851,9 +1851,9 @@ static bool check_member_code( int code, const TQObject *object,
if ( code != TQ_SLOT_CODE && code != TQ_SIGNAL_CODE ) {
tqWarning( "TQObject::%s: Use the TQ_SLOT or TQ_SIGNAL macro to "
"%s %s::%s", func, func, object->className(), member );
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
static void err_member_notfound( int code, const TQObject *object,
@@ -1899,10 +1899,10 @@ static void err_info_about_candidates( int code,
const TQMetaData *rm = 0;
switch ( code ) {
case TQ_SLOT_CODE:
- rm = mo->slot( mo->findSlot( newname, TRUE ), TRUE );
+ rm = mo->slot( mo->findSlot( newname, true ), true );
break;
case TQ_SIGNAL_CODE:
- rm = mo->signal( mo->findSignal( newname, TRUE ), TRUE );
+ rm = mo->signal( mo->findSignal( newname, true ), true );
break;
}
if ( rm ) {
@@ -1998,21 +1998,21 @@ void TQObject::disconnectNotify( const char * )
/*!
\fn bool TQObject::checkConnectArgs( const char *signal, const TQObject *receiver, const char *member )
- Returns TRUE if the \a signal and the \a member arguments are
- compatible; otherwise returns FALSE. (The \a receiver argument is
+ Returns true if the \a signal and the \a member arguments are
+ compatible; otherwise returns false. (The \a receiver argument is
currently ignored.)
\warning We recommend that you use the default implementation and
do not reimplement this function.
\omit
- TRUE: "signal(<anything>)", "member()"
- TRUE: "signal(a,b,c)", "member(a,b,c)"
- TRUE: "signal(a,b,c)", "member(a,b)", "member(a)" etc.
- FALSE: "signal(const a)", "member(a)"
- FALSE: "signal(a)", "member(const a)"
- FALSE: "signal(a)", "member(b)"
- FALSE: "signal(a)", "member(a,b)"
+ true: "signal(<anything>)", "member()"
+ true: "signal(a,b,c)", "member(a,b,c)"
+ true: "signal(a,b,c)", "member(a,b)", "member(a)" etc.
+ false: "signal(const a)", "member(a)"
+ false: "signal(a)", "member(const a)"
+ false: "signal(a)", "member(b)"
+ false: "signal(a)", "member(a,b)"
\endomit
*/
@@ -2025,12 +2025,12 @@ bool TQObject::checkConnectArgs( const char *signal,
while ( *s1++ != '(' ) { } // scan to first '('
while ( *s2++ != '(' ) { }
if ( *s2 == ')' || qstrcmp(s1,s2) == 0 ) // member has no args or
- return TRUE; // exact match
+ return true; // exact match
int s1len = tqstrlen(s1);
int s2len = tqstrlen(s2);
if ( s2len < s1len && tqstrncmp(s1,s2,s2len-1)==0 && s1[s2len-1]==',' )
- return TRUE; // member has less args
- return FALSE;
+ return true; // member has less args
+ return false;
}
/*!
@@ -2060,8 +2060,8 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
/*!
Connects \a signal from the \a sender object to \a member in object
- \a receiver, and returns TRUE if the connection succeeds; otherwise
- returns FALSE.
+ \a receiver, and returns true if the connection succeeds; otherwise
+ returns false.
You must use the TQ_SIGNAL() and TQ_SLOT() macros when specifying the \a signal
and the \a member, for example:
@@ -2075,7 +2075,7 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
This example ensures that the label always displays the current
scroll bar value. Note that the signal and slots parameters must not
contain any variable names, only the type. E.g. the following would
- not work and return FALSE:
+ not work and return false:
TQObject::connect( scroll, TQ_SIGNAL(valueChanged(int v)),
label, TQ_SLOT(setNum(int v)) );
@@ -2112,8 +2112,8 @@ TQCString TQObject::normalizeSignalSlot( const char *signalSlot )
If a signal is connected to several slots, the slots are activated
in an arbitrary order when the signal is emitted.
- The function returns TRUE if it successfully connects the signal
- to the slot. It will return FALSE if it cannot create the
+ The function returns true if it successfully connects the signal
+ to the slot. It will return false if it cannot create the
connection, for example, if TQObject is unable to verify the
existence of either \a signal or \a member, or if their signatures
aren't compatible.
@@ -2135,23 +2135,23 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
signal ? signal+1 : "(null)",
receiver ? receiver->className() : "(null)",
member ? member+1 : "(null)" );
- return FALSE;
+ return false;
}
#endif
TQMetaObject *smeta = sender->metaObject();
#if defined(QT_CHECK_RANGE)
if ( !check_signal_macro( sender, signal, "connect", "bind" ) )
- return FALSE;
+ return false;
#endif
TQCString nw_signal(signal); // Assume already normalized
++signal; // skip member type code
- int signal_index = smeta->findSignal( signal, TRUE );
+ int signal_index = smeta->findSignal( signal, true );
if ( signal_index < 0 ) { // normalize and retry
nw_signal = qt_rmWS( signal-1 ); // remove whitespace
signal = nw_signal.data()+1; // skip member type code
- signal_index = smeta->findSignal( signal, TRUE );
+ signal_index = smeta->findSignal( signal, true );
}
if ( signal_index < 0 ) { // no such signal
@@ -2160,9 +2160,9 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
err_info_about_candidates( TQ_SIGNAL_CODE, smeta, signal, "connect" );
err_info_about_objects( "connect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
- const TQMetaData *sm = smeta->signal( signal_index, TRUE );
+ const TQMetaData *sm = smeta->signal( signal_index, true );
signal = sm->name; // use name from meta object
int membcode = member[0] - '0'; // get member code
@@ -2172,7 +2172,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
#if defined(QT_CHECK_RANGE)
if ( !check_member_code( membcode, r, member, "connect" ) )
- return FALSE;
+ return false;
#endif
member++; // skip code
@@ -2181,19 +2181,19 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
int member_index = -1;
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
}
break;
case TQ_SIGNAL_CODE:
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
}
break;
}
@@ -2203,7 +2203,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
err_info_about_candidates( membcode, rmeta, member, "connect" );
err_info_about_objects( "connect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
#if defined(QT_CHECK_RANGE)
if ( !s->checkConnectArgs(signal,receiver,member) ) {
@@ -2211,11 +2211,11 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
"\n\t%s::%s --> %s::%s",
s->className(), signal,
r->className(), member );
- return FALSE;
+ return false;
} else {
const TQMetaData *rm = membcode == TQ_SLOT_CODE ?
- rmeta->slot( member_index, TRUE ) :
- rmeta->signal( member_index, TRUE );
+ rmeta->slot( member_index, true ) :
+ rmeta->signal( member_index, true );
if ( rm ) {
int si = 0;
int ri = 0;
@@ -2235,7 +2235,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
"\n\t%s::%s --> %s::%s",
s->className(), signal,
r->className(), member );
- return FALSE;
+ return false;
}
}
}
@@ -2243,7 +2243,7 @@ bool TQObject::connect( const TQObject *sender, const char *signal,
#endif
connectInternal( sender, signal_index, receiver, membcode, member_index );
s->connectNotify( nw_signal );
- return TRUE;
+ return true;
}
/*! \internal */
@@ -2257,14 +2257,14 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
if ( !s->connections ) { // create connections lookup table
s->connections = new TQSignalVec( signal_index+1 );
TQ_CHECK_PTR( s->connections );
- s->connections->setAutoDelete( TRUE );
+ s->connections->setAutoDelete( true );
}
TQConnectionList *clist = s->connections->at( signal_index );
if ( !clist ) { // create receiver list
clist = new TQConnectionList;
TQ_CHECK_PTR( clist );
- clist->setAutoDelete( TRUE );
+ clist->setAutoDelete( true );
s->connections->insert( signal_index, clist );
}
@@ -2273,10 +2273,10 @@ void TQObject::connectInternal( const TQObject *sender, int signal_index, const
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- rm = rmeta->slot( member_index, TRUE );
+ rm = rmeta->slot( member_index, true );
break;
case TQ_SIGNAL_CODE:
- rm = rmeta->signal( member_index, TRUE );
+ rm = rmeta->signal( member_index, true );
break;
}
@@ -2388,11 +2388,11 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
#if defined(QT_CHECK_NULL)
if ( sender == 0 || (receiver == 0 && member != 0) ) {
tqWarning( "TQObject::disconnect: Unexpected null parameter" );
- return FALSE;
+ return false;
}
#endif
if ( !sender->connections ) // no connected signals
- return FALSE;
+ return false;
TQObject *s = (TQObject *)sender;
TQObject *r = (TQObject *)receiver;
int member_index = -1;
@@ -2402,26 +2402,26 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
membcode = member[0] - '0';
#if defined(QT_CHECK_RANGE)
if ( !check_member_code( membcode, r, member, "disconnect" ) )
- return FALSE;
+ return false;
#endif
++member;
TQMetaObject *rmeta = r->metaObject();
switch ( membcode ) { // get receiver member
case TQ_SLOT_CODE:
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSlot( member, TRUE );
+ member_index = rmeta->findSlot( member, true );
}
break;
case TQ_SIGNAL_CODE:
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
if ( member_index < 0 ) { // normalize and retry
nw_member = qt_rmWS(member); // remove whitespace
member = nw_member;
- member_index = rmeta->findSignal( member, TRUE );
+ member_index = rmeta->findSignal( member, true );
}
break;
}
@@ -2431,7 +2431,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
err_info_about_candidates( membcode, rmeta, member, "connect" );
err_info_about_objects( "disconnect", sender, receiver );
#endif
- return FALSE;
+ return false;
}
}
@@ -2439,35 +2439,35 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
if ( disconnectInternal( s, -1, r, membcode, member_index ) )
s->disconnectNotify( 0 );
else
- return FALSE;
+ return false;
} else { // specific signal
#if defined(QT_CHECK_RANGE)
if ( !check_signal_macro( s, signal, "disconnect", "unbind" ) )
- return FALSE;
+ return false;
#endif
TQCString nw_signal(signal); // Assume already normalized
++signal; // skip member type code
TQMetaObject *smeta = s->metaObject();
if ( !smeta ) // no meta object
- return FALSE;
- int signal_index = smeta->findSignal( signal, TRUE );
+ return false;
+ int signal_index = smeta->findSignal( signal, true );
if ( signal_index < 0 ) { // normalize and retry
nw_signal = qt_rmWS( signal-1 ); // remove whitespace
signal = nw_signal.data()+1; // skip member type code
- signal_index = smeta->findSignal( signal, TRUE );
+ signal_index = smeta->findSignal( signal, true );
}
if ( signal_index < 0 ) {
#if defined(QT_CHECK_RANGE)
tqWarning( "TQObject::disconnect: No such signal %s::%s",
s->className(), signal );
#endif
- return FALSE;
+ return false;
}
/* compatibility and safety: If a receiver has several slots
* with the same name, disconnect them all*/
- bool res = FALSE;
+ bool res = false;
if ( membcode == TQ_SLOT_CODE && r ) {
TQMetaObject * rmeta = r->metaObject();
do {
@@ -2482,7 +2482,7 @@ bool TQObject::disconnect( const TQObject *sender, const char *signal,
s->disconnectNotify( nw_signal );
return res;
}
- return TRUE;
+ return true;
}
/*! \internal */
@@ -2494,9 +2494,9 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
TQObject *r = (TQObject*)receiver;
if ( !s->connections )
- return FALSE;
+ return false;
- bool success = FALSE;
+ bool success = false;
TQConnectionList *clist;
TQConnection *c;
if ( signal_index == -1 ) {
@@ -2514,7 +2514,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
c = clist->next();
} else if ( r == c->object() &&
( (member_index == -1) ||
@@ -2522,11 +2522,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
clist->remove();
c = clist->current();
} else {
@@ -2539,7 +2539,7 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
} else {
clist = s->connections->at( signal_index );
if ( !clist )
- return FALSE;
+ return false;
c = clist->first();
while ( c ) { // for all receivers...
@@ -2547,11 +2547,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
c = clist->next();
} else if ( r == c->object() &&
( (member_index == -1) ||
@@ -2559,11 +2559,11 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
#endif // TQT_THREAD_SUPPORT
- removeObjFromList( c->object()->senderObjects, s, TRUE );
+ removeObjFromList( c->object()->senderObjects, s, true );
#ifdef TQT_THREAD_SUPPORT
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
#endif // TQT_THREAD_SUPPORT
- success = TRUE;
+ success = true;
clist->remove();
c = clist->current();
} else {
@@ -2725,11 +2725,11 @@ TQMetaObject* TQObject::staticTQtMetaObject()
static const TQMetaEnum enum_tbl[] = {
- { "Alignment", 10, enum_0, TRUE },
- { "Orientation", 2, enum_1, FALSE },
- { "TextFormat", 4, enum_2, FALSE },
- { "BackgroundMode", 17, enum_3, FALSE },
- { "DateFormat", 3, enum_4, FALSE }
+ { "Alignment", 10, enum_0, true },
+ { "Orientation", 2, enum_1, false },
+ { "TextFormat", 4, enum_2, false },
+ { "BackgroundMode", 17, enum_3, false },
+ { "DateFormat", 3, enum_4, false }
};
#endif
@@ -3096,7 +3096,7 @@ void TQObject::dumpObjectInfo()
TQConnectionList *clist;
for ( uint i = 0; i < connections->size(); i++ ) {
if ( ( clist = connections->at( i ) ) ) {
- tqDebug( "\t%s", metaObject()->signal( i, TRUE )->name );
+ tqDebug( "\t%s", metaObject()->signal( i, true )->name );
n++;
TQConnection *c;
TQConnectionListIt cit(*clist);
@@ -3133,8 +3133,8 @@ void TQObject::dumpObjectInfo()
/*!
Sets the value of the object's \a name property to \a value.
- Returns TRUE if the operation was successful; otherwise returns
- FALSE.
+ Returns true if the operation was successful; otherwise returns
+ false.
Information about all available properties is provided through the
metaObject().
@@ -3144,19 +3144,19 @@ void TQObject::dumpObjectInfo()
bool TQObject::setProperty( const char *name, const TQVariant& value )
{
if ( !value.isValid() )
- return FALSE;
+ return false;
TQVariant v = value;
TQMetaObject* meta = metaObject();
if ( !meta )
- return FALSE;
- int id = meta->findProperty( name, TRUE );
- const TQMetaProperty* p = meta->property( id, TRUE );
+ return false;
+ int id = meta->findProperty( name, true );
+ const TQMetaProperty* p = meta->property( id, true );
if ( !p || !p->isValid() || !p->writable() ) {
tqWarning( "%s::setProperty( \"%s\", value ) failed: property invalid, read-only or does not exist",
className(), name );
- return FALSE;
+ return false;
}
if ( p->isEnumType() ) {
@@ -3173,7 +3173,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
v = TQVariant( p->keyToValue( value.toCString().data() ) );
}
} else if ( v.type() != TQVariant::Int && v.type() != TQVariant::UInt ) {
- return FALSE;
+ return false;
}
return tqt_property( id, 0, &v );
}
@@ -3182,7 +3182,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
if ( type == TQVariant::Invalid )
type = TQVariant::nameToType( p->type() );
if ( type != TQVariant::Invalid && !v.canCast( type ) )
- return FALSE;
+ return false;
return tqt_property( id, 0, &v );
}
@@ -3203,8 +3203,8 @@ TQVariant TQObject::property( const char *name ) const
TQMetaObject* meta = metaObject();
if ( !meta )
return v;
- int id = meta->findProperty( name, TRUE );
- const TQMetaProperty* p = meta->property( id, TRUE );
+ int id = meta->findProperty( name, true );
+ const TQMetaProperty* p = meta->property( id, true );
if ( !p || !p->isValid() ) {
tqWarning( "%s::property( \"%s\" ) failed: property invalid or does not exist",
className(), name );
diff --git a/src/kernel/tqobject.h b/src/kernel/tqobject.h
index 05ba4dc9d..44eb188c3 100644
--- a/src/kernel/tqobject.h
+++ b/src/kernel/tqobject.h
@@ -98,7 +98,7 @@ public:
virtual void setName( const char *name );
bool isWidgetType() const { return isWidget; }
- bool highPriority() const { return FALSE; }
+ bool highPriority() const { return false; }
bool signalsBlocked() const { return blockSig; }
void blockSignals( bool b );
@@ -107,7 +107,7 @@ public:
void killTimer( int id );
void killTimers();
- TQObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); //### const in 4.0
+ TQObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = true ); //### const in 4.0
const TQObjectList *children() const { return childObjects; }
TQObjectList childrenListObject();
const TQObjectList childrenListObject() const;
@@ -117,8 +117,8 @@ public:
TQObjectList *queryList( const char *inheritsClass = 0,
const char *objName = 0,
- bool regexpMatch = TRUE,
- bool recursiveSearch = TRUE ) const;
+ bool regexpMatch = true,
+ bool recursiveSearch = true ) const;
virtual void insertChild( TQObject * );
virtual void removeChild( TQObject * );
diff --git a/src/kernel/tqobjectcleanuphandler.cpp b/src/kernel/tqobjectcleanuphandler.cpp
index f06ebb7f3..452e4cad9 100644
--- a/src/kernel/tqobjectcleanuphandler.cpp
+++ b/src/kernel/tqobjectcleanuphandler.cpp
@@ -77,7 +77,7 @@
// TQLibraryInterface implementation
bool FactoryComponent::init()
{
- return TRUE;
+ return true;
}
void FactoryComponent::cleanup()
@@ -120,7 +120,7 @@ TQObject* TQObjectCleanupHandler::add( TQObject* object )
if ( !cleanupObjects ) {
cleanupObjects = new TQObjectList;
- cleanupObjects->setAutoDelete( TRUE );
+ cleanupObjects->setAutoDelete( true );
}
connect( object, TQ_SIGNAL(destroyed(TQObject*)), this, TQ_SLOT(objectDestroyed(TQObject*)) );
cleanupObjects->insert( 0, object );
@@ -142,12 +142,12 @@ void TQObjectCleanupHandler::remove( TQObject *object )
}
/*!
- Returns TRUE if this cleanup handler is empty or if all objects in
- this cleanup handler have been destroyed; otherwise return FALSE.
+ Returns true if this cleanup handler is empty or if all objects in
+ this cleanup handler have been destroyed; otherwise return false.
*/
bool TQObjectCleanupHandler::isEmpty() const
{
- return cleanupObjects ? cleanupObjects->isEmpty() : TRUE;
+ return cleanupObjects ? cleanupObjects->isEmpty() : true;
}
/*!
@@ -163,10 +163,10 @@ void TQObjectCleanupHandler::clear()
void TQObjectCleanupHandler::objectDestroyed( TQObject*object )
{
if ( cleanupObjects )
- cleanupObjects->setAutoDelete( FALSE );
+ cleanupObjects->setAutoDelete( false );
remove( object );
if ( cleanupObjects )
- cleanupObjects->setAutoDelete( TRUE );
+ cleanupObjects->setAutoDelete( true );
}
diff --git a/src/kernel/tqobjectdict.h b/src/kernel/tqobjectdict.h
index c51123054..8a92a62b0 100644
--- a/src/kernel/tqobjectdict.h
+++ b/src/kernel/tqobjectdict.h
@@ -54,7 +54,7 @@
class TQ_EXPORT TQObjectDictionary : public TQAsciiDict<TQMetaObject>
{
public:
- TQObjectDictionary(int size=17,bool cs=TRUE,bool ck=TRUE)
+ TQObjectDictionary(int size=17,bool cs=true,bool ck=true)
: TQAsciiDict<TQMetaObject>(size,cs,ck) {}
TQObjectDictionary( const TQObjectDictionary &dict )
: TQAsciiDict<TQMetaObject>(dict) {}
diff --git a/src/kernel/tqpaintdevice.h b/src/kernel/tqpaintdevice.h
index a846f6911..ebb0c6a5a 100644
--- a/src/kernel/tqpaintdevice.h
+++ b/src/kernel/tqpaintdevice.h
@@ -210,7 +210,7 @@ protected:
void copyX11Data( const TQPaintDevice * );
void cloneX11Data( const TQPaintDevice * );
virtual void setX11Data( const TQPaintDeviceX11Data* );
- TQPaintDeviceX11Data* getX11Data( bool def=FALSE ) const;
+ TQPaintDeviceX11Data* getX11Data( bool def=false ) const;
#elif defined(TQ_WS_MAC)
#if !defined( TQMAC_NO_QUARTZ )
CGContextRef ctx;
@@ -230,7 +230,7 @@ protected:
friend class TQPaintDeviceMetrics;
#if defined(TQ_WS_MAC)
#ifndef TQMAC_NO_QUARTZ
- virtual CGContextRef macCGContext(bool clipped=TRUE) const;
+ virtual CGContextRef macCGContext(bool clipped=true) const;
#endif
friend TQ_EXPORT void unclippedScaledBitBlt( TQPaintDevice *, int, int, int, int,
const TQPaintDevice *, int, int, int, int, TQt::RasterOp, bool, bool );
@@ -280,7 +280,7 @@ private: // Disabled copy constructor and operator=
TQ_EXPORT
void bitBlt( TQPaintDevice *dst, int dx, int dy,
const TQPaintDevice *src, int sx=0, int sy=0, int sw=-1, int sh=-1,
- TQt::RasterOp = TQt::CopyROP, bool ignoreMask=FALSE );
+ TQt::RasterOp = TQt::CopyROP, bool ignoreMask=false );
TQ_EXPORT
void bitBlt( TQPaintDevice *dst, int dx, int dy,
@@ -395,7 +395,7 @@ inline bool TQPaintDevice::x11AppDefaultVisual()
TQ_EXPORT
inline void bitBlt( TQPaintDevice *dst, const TQPoint &dp,
const TQPaintDevice *src, const TQRect &sr =TQRect(0,0,-1,-1),
- TQt::RasterOp rop=TQt::CopyROP, bool ignoreMask=FALSE )
+ TQt::RasterOp rop=TQt::CopyROP, bool ignoreMask=false )
{
bitBlt( dst, dp.x(), dp.y(), src, sr.x(), sr.y(), sr.width(), sr.height(),
rop, ignoreMask );
diff --git a/src/kernel/tqpaintdevice_x11.cpp b/src/kernel/tqpaintdevice_x11.cpp
index efeaf78fa..dd6251e2a 100644
--- a/src/kernel/tqpaintdevice_x11.cpp
+++ b/src/kernel/tqpaintdevice_x11.cpp
@@ -210,8 +210,8 @@ void TQPaintDevice::setX11Data( const TQPaintDeviceX11Data* d )
/*
\internal
- If \a def is FALSE, returns a deep copy of the x11Data, or 0 if x11Data is 0.
- If \a def is TRUE, makes a TQPaintDeviceX11Data struct filled with the default
+ If \a def is false, returns a deep copy of the x11Data, or 0 if x11Data is 0.
+ If \a def is true, makes a TQPaintDeviceX11Data struct filled with the default
values.
In either case the caller is responsible for deleting the returned
@@ -259,8 +259,8 @@ TQPaintDeviceX11Data* TQPaintDevice::getX11Data( bool def ) const
/*!
\fn bool TQPaintDevice::isExtDev() const
- Returns TRUE if the device is an external paint device; otherwise
- returns FALSE.
+ Returns true if the device is an external paint device; otherwise
+ returns false.
External paint devices cannot be bitBlt()'ed from. TQPicture and
TQPrinter are external paint devices.
@@ -373,9 +373,9 @@ TQt::HANDLE TQPaintDevice::x11RenderHandle() const
/*!
\fn bool TQPaintDevice::x11AppDefaultVisual ()
- Returns TRUE if the Visual used is the default for the default
+ Returns true if the Visual used is the default for the default
screen of the X display global to the application (X11 only);
- otherwise returns FALSE. Using this function is not portable.
+ otherwise returns false. Using this function is not portable.
*/
/*!
@@ -441,9 +441,9 @@ TQt::HANDLE TQPaintDevice::x11RenderHandle() const
\overload
\fn bool TQPaintDevice::x11AppDefaultVisual( int screen )
- Returns TRUE if the Visual used is the default for screen
+ Returns true if the Visual used is the default for screen
\a screen of the X display global to the application (X11 only);
- otherwise returns FALSE. Using this function is not portable.
+ otherwise returns false. Using this function is not portable.
*/
@@ -686,9 +686,9 @@ int TQPaintDevice::x11AppDpiY()
/*!
\fn bool TQPaintDevice::paintingActive() const
- Returns TRUE if the device is being painted, i.e. someone has
+ Returns true if the device is being painted, i.e. someone has
called TQPainter::begin() but not yet called TQPainter::end() for
- this device; otherwise returns FALSE.
+ this device; otherwise returns false.
\sa TQPainter::isActive()
*/
@@ -706,7 +706,7 @@ bool TQPaintDevice::cmd( int, TQPainter *, TQPDevCmdParam * )
#if defined(QT_CHECK_STATE)
tqWarning( "TQPaintDevice::cmd: Device has no command interface" );
#endif
- return FALSE;
+ return false;
}
/*!
@@ -758,7 +758,7 @@ int TQPaintDevice::fontInf( TQFont *, int ) const
// and the pixmap size doesn't exceed 128x128.
//
-static bool init_mask_gc = FALSE;
+static bool init_mask_gc = false;
static const int max_mask_gcs = 11; // suitable for hashing
struct mask_gc {
@@ -772,7 +772,7 @@ static mask_gc gc_vec[max_mask_gcs];
static void cleanup_mask_gc()
{
Display *dpy = TQPaintDevice::x11AppDisplay();
- init_mask_gc = FALSE;
+ init_mask_gc = false;
for ( int i=0; i<max_mask_gcs; i++ ) {
if ( gc_vec[i].gc )
XFreeGC( dpy, gc_vec[i].gc );
@@ -782,7 +782,7 @@ static void cleanup_mask_gc()
static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask )
{
if ( !init_mask_gc ) { // first time initialization
- init_mask_gc = TRUE;
+ init_mask_gc = true;
tqAddPostRoutine( cleanup_mask_gc );
for ( int i=0; i<max_mask_gcs; i++ )
gc_vec[i].gc = 0;
@@ -813,7 +813,7 @@ static GC cache_mask_gc( Display *dpy, Drawable hd, int mask_no, Pixmap mask )
The most common values for \a rop are CopyROP and XorROP; the \l
TQt::RasterOp documentation defines all the possible values.
- If \a ignoreMask is FALSE (the default) and \a src is a
+ If \a ignoreMask is false (the default) and \a src is a
masked TQPixmap, the entire blit is masked by \a{src}->mask().
If \a src, \a dst, \a sw or \a sh is 0, bitBlt() does nothing. If
@@ -867,22 +867,22 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
if ( dst->paintingActive() && dst->isExtDev() ) {
TQPixmap *pm; // output to picture/printer
- bool tmp_pm = TRUE;
+ bool tmp_pm = true;
if ( ts == TQInternal::Pixmap ) {
pm = (TQPixmap*)src;
if ( sx != 0 || sy != 0 ||
sw != pm->width() || sh != pm->height() || ignoreMask ) {
TQPixmap *tmp = new TQPixmap( sw, sh, pm->depth() );
- bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ bitBlt( tmp, 0, 0, pm, sx, sy, sw, sh, TQt::CopyROP, true );
if ( pm->mask() && !ignoreMask ) {
TQBitmap mask( sw, sh );
bitBlt( &mask, 0, 0, pm->mask(), sx, sy, sw, sh,
- TQt::CopyROP, TRUE );
+ TQt::CopyROP, true );
tmp->setMask( mask );
}
pm = tmp;
} else {
- tmp_pm = FALSE;
+ tmp_pm = false;
}
} else if ( ts == TQInternal::Widget ) {// bitBlt to temp pixmap
pm = new TQPixmap( sw, sh );
@@ -949,8 +949,8 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
bool mono_src;
bool mono_dst;
- bool include_inferiors = FALSE;
- bool graphics_exposure = FALSE;
+ bool include_inferiors = false;
+ bool graphics_exposure = false;
TQPixmap *src_pm;
TQBitmap *mask;
@@ -962,7 +962,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
mask = ignoreMask ? 0 : src_pm->data->mask;
} else {
src_pm = 0;
- mono_src = FALSE;
+ mono_src = false;
mask = 0;
include_inferiors = ((TQWidget*)src)->testWFlags(TQt::WPaintUnclipped);
graphics_exposure = td == TQInternal::Widget;
@@ -973,7 +973,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
mono_dst = ((TQPixmap*)dst)->depth() == 1;
((TQPixmap*)dst)->detach(); // changes shared pixmap
} else {
- mono_dst = FALSE;
+ mono_dst = false;
include_inferiors = include_inferiors ||
((TQWidget*)dst)->testWFlags(TQt::WPaintUnclipped);
}
@@ -999,7 +999,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
picmask |= CPSubwindowMode;
}
if (graphics_exposure) {
- pattr.graphics_exposures = TRUE;
+ pattr.graphics_exposures = true;
picmask |= CPGraphicsExposure;
}
if (picmask)
@@ -1009,7 +1009,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
sx, sy, sx, sy, dx, dy, sw, sh);
// restore attributes
pattr.subwindow_mode = ClipByChildren;
- pattr.graphics_exposures = FALSE;
+ pattr.graphics_exposures = false;
if (picmask)
XRenderChangePicture(dpy, dst->x11RenderHandle(), picmask, &pattr);
return;
@@ -1020,11 +1020,11 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
GC gc;
if ( mask && !mono_src ) { // fast masked blt
- bool temp_gc = FALSE;
+ bool temp_gc = false;
if ( mask->data->maskgc ) {
gc = (GC)mask->data->maskgc; // we have a premade mask GC
} else {
- if ( FALSE && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled
+ if ( false && src_pm->optimization() == TQPixmap::NormalOptim ) { // #### cache disabled
// Compete for the global cache
gc = cache_mask_gc( dpy, dst->handle(),
mask->data->ser_no,
@@ -1039,7 +1039,7 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
if ( src_pm->optimization() == TQPixmap::BestOptim ) {
mask->data->maskgc = gc;
} else {
- temp_gc = TRUE;
+ temp_gc = true;
}
}
}
@@ -1095,14 +1095,14 @@ void bitBlt( TQPaintDevice *dst, int dx, int dy,
gcvals.ts_x_origin = dx - sx;
gcvals.ts_y_origin = dy - sy;
- bool clipmask = FALSE;
+ bool clipmask = false;
if ( mask ) {
if ( ((TQPixmap*)src)->data->selfmask ) {
gcvals.fill_style = FillStippled;
} else {
XSetClipMask( dpy, gc, mask->handle() );
XSetClipOrigin( dpy, gc, dx-sx, dy-sy );
- clipmask = TRUE;
+ clipmask = true;
}
}
diff --git a/src/kernel/tqpainter.cpp b/src/kernel/tqpainter.cpp
index 7b30e0af6..156f3774a 100644
--- a/src/kernel/tqpainter.cpp
+++ b/src/kernel/tqpainter.cpp
@@ -198,7 +198,7 @@ typedef TQPtrStack<TQWMatrix> TQWMatrixStack;
After all the coordinate transformation is done, TQPainter can clip
the drawing to an arbitrary rectangle or region. hasClipping() is
- TRUE if TQPainter clips, and clipRegion() returns the clip region.
+ true if TQPainter clips, and clipRegion() returns the clip region.
You can set it using either setClipRegion() or setClipRect().
Note that the clipping can be slow. It's all system-dependent,
but as a rule of thumb, you can assume that drawing speed is
@@ -470,7 +470,7 @@ TQPainter::TQPainter()
Constructs a painter that begins painting the paint device \a pd
immediately. Depending on the underlying graphic system the
painter will paint over children of the paintdevice if \a
- unclipped is TRUE.
+ unclipped is true.
This constructor is convenient for short-lived painters, e.g. in a
\link TQWidget::paintEvent() paint event\endlink and should be used
@@ -516,7 +516,7 @@ TQPainter::TQPainter( const TQPaintDevice *pd, bool unclipped )
Constructs a painter that begins painting the paint device \a pd
immediately, with the default arguments taken from \a
copyAttributes. The painter will paint over children of the paint
- device if \a unclipped is TRUE (although this is not supported on
+ device if \a unclipped is true (although this is not supported on
all platforms).
\sa begin()
@@ -557,7 +557,7 @@ TQPainter::~TQPainter()
This version opens the painter on a paint device \a pd and sets
the initial pen, background color and font from \a copyAttributes,
painting over the paint device's children when \a unclipped is
- TRUE. This is equivalent to:
+ true. This is equivalent to:
\code
TQPainter p;
@@ -595,15 +595,15 @@ bool TQPainter::begin( const TQPaintDevice *pd, const TQWidget *copyAttributes,
tqWarning( "TQPainter::begin: The widget to copy attributes from cannot "
"be null" );
#endif
- return FALSE;
+ return false;
}
if ( begin( pd, unclipped ) ) {
setPen( copyAttributes->foregroundColor() );
setBackgroundColor( copyAttributes->backgroundColor() );
setFont( copyAttributes->font() );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -624,9 +624,9 @@ void TQPainter::setf( uint b, bool v )
/*!
\fn bool TQPainter::isActive() const
- Returns TRUE if the painter is active painting, i.e. begin() has
+ Returns true if the painter is active painting, i.e. begin() has
been called and end() has not yet been called; otherwise returns
- FALSE.
+ false.
\sa TQPaintDevice::paintingActive()
*/
@@ -705,7 +705,7 @@ void TQPainter::save()
if ( pss == 0 ) {
pss = new TQPtrStack<TQPState>;
TQ_CHECK_PTR( pss );
- pss->setAutoDelete( TRUE );
+ pss->setAutoDelete( true );
ps_stack = pss;
}
TQPState *ps = new TQPState;
@@ -749,7 +749,7 @@ void TQPainter::restore()
if ( testf(ExtDev) ) {
pdev->cmd( TQPaintDevice::PdcRestore, this, 0 );
if ( pdev->devType() == TQInternal::Picture )
- block_ext = TRUE;
+ block_ext = true;
}
TQPStateStack *pss = (TQPStateStack *)ps_stack;
if ( pss == 0 || pss->isEmpty() ) {
@@ -808,7 +808,7 @@ void TQPainter::restore()
wm_stack = ps->wm_stack;
#endif
delete ps;
- block_ext = FALSE;
+ block_ext = false;
}
typedef TQPtrDict<TQPaintDevice> TQPaintDeviceDict;
@@ -1198,8 +1198,8 @@ void TQPainter::setTabArray( int *ta )
#ifndef TQT_NO_TRANSFORMATIONS
/*!
- Enables view transformations if \a enable is TRUE, or disables
- view transformations if \a enable is FALSE.
+ Enables view transformations if \a enable is true, or disables
+ view transformations if \a enable is false.
\sa hasViewXForm(), setWindow(), setViewport(), setWorldMatrix(),
setWorldXForm(), xForm()
@@ -1225,8 +1225,8 @@ void TQPainter::setViewXForm( bool enable )
/*!
\fn bool TQPainter::hasViewXForm() const
- Returns TRUE if view transformation is enabled; otherwise returns
- FALSE.
+ Returns true if view transformation is enabled; otherwise returns
+ false.
\sa setViewXForm(), xForm()
*/
@@ -1278,7 +1278,7 @@ void TQPainter::setWindow( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
@@ -1328,13 +1328,13 @@ void TQPainter::setViewport( int x, int y, int w, int h )
if ( testf(VxF) )
updateXForm();
else
- setViewXForm( TRUE );
+ setViewXForm( true );
}
/*!
- Enables world transformations if \a enable is TRUE, or disables
- world transformations if \a enable is FALSE. The world
+ Enables world transformations if \a enable is true, or disables
+ world transformations if \a enable is false. The world
transformation matrix is not changed.
\sa setWorldMatrix(), setWindow(), setViewport(), setViewXForm(),
@@ -1361,8 +1361,8 @@ void TQPainter::setWorldXForm( bool enable )
/*!
\fn bool TQPainter::hasWorldXForm() const
- Returns TRUE if world transformation is enabled; otherwise returns
- FALSE.
+ Returns true if world transformation is enabled; otherwise returns
+ false.
\sa setWorldXForm()
*/
@@ -1382,12 +1382,12 @@ const TQWMatrix &TQPainter::worldMatrix() const
Sets the world transformation matrix to \a m and enables world
transformation.
- If \a combine is TRUE, then \a m is combined with the current
+ If \a combine is true, then \a m is combined with the current
transformation matrix, otherwise \a m replaces the current
transformation matrix.
- If \a m is the identity matrix and \a combine is FALSE, this
- function calls setWorldXForm(FALSE). (The identity matrix is the
+ If \a m is the identity matrix and \a combine is false, this
+ function calls setWorldXForm(false). (The identity matrix is the
matrix where TQWMatrix::m11() and TQWMatrix::m22() are 1.0 and the
rest are 0.0.)
@@ -1411,7 +1411,7 @@ const TQWMatrix &TQPainter::worldMatrix() const
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
\endcode
@@ -1449,9 +1449,9 @@ void TQPainter::setWorldMatrix( const TQWMatrix &m, bool combine )
pdev->cmd( TQPaintDevice::PdcSetWMatrix, this, param );
}
if ( identity && pdev->devType() != TQInternal::Picture )
- setWorldXForm( FALSE );
+ setWorldXForm( false );
else if ( !testf(WxF) )
- setWorldXForm( TRUE );
+ setWorldXForm( true );
else
updateXForm();
}
@@ -1467,7 +1467,7 @@ void TQPainter::saveWorldMatrix()
if ( stack == 0 ) {
stack = new TQPtrStack<TQWMatrix>;
TQ_CHECK_PTR( stack );
- stack->setAutoDelete( TRUE );
+ stack->setAutoDelete( true );
wm_stack = stack;
}
@@ -1520,7 +1520,7 @@ void TQPainter::translate( double dx, double dy )
#ifndef TQT_NO_TRANSFORMATIONS
TQWMatrix m;
m.translate( dx, dy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
#else
xlatex += (int)dx;
xlatey += (int)dy;
@@ -1541,7 +1541,7 @@ void TQPainter::scale( double sx, double sy )
{
TQWMatrix m;
m.scale( sx, sy );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1555,7 +1555,7 @@ void TQPainter::shear( double sh, double sv )
{
TQWMatrix m;
m.shear( sv, sh );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
/*!
@@ -1569,7 +1569,7 @@ void TQPainter::rotate( double a )
{
TQWMatrix m;
m.rotate( a );
- setWorldMatrix( m, TRUE );
+ setWorldMatrix( m, true );
}
@@ -1589,8 +1589,8 @@ void TQPainter::resetXForm()
ww = vw = pdev->metric( TQPaintDeviceMetrics::PdmWidth );
wh = vh = pdev->metric( TQPaintDeviceMetrics::PdmHeight );
wxmat = TQWMatrix();
- setWorldXForm( FALSE );
- setViewXForm( FALSE );
+ setWorldXForm( false );
+ setViewXForm( false );
}
/*!
@@ -1614,7 +1614,7 @@ void TQPainter::updateXForm()
}
xmat = m;
- txinv = FALSE; // no inverted matrix
+ txinv = false; // no inverted matrix
txop = TxNone;
if ( m12()==0.0 && m21()==0.0 && m11() >= 0.0 && m22() >= 0.0 ) {
if ( m11()==1.0 && m22()==1.0 ) {
@@ -1643,9 +1643,9 @@ void TQPainter::updateXForm()
void TQPainter::updateInvXForm()
{
#if defined(QT_CHECK_STATE)
- Q_ASSERT( txinv == FALSE );
+ Q_ASSERT( txinv == false );
#endif
- txinv = TRUE; // creating inverted matrix
+ txinv = true; // creating inverted matrix
bool invertible;
TQWMatrix m;
if ( testf(VxF) ) {
@@ -2143,7 +2143,7 @@ void TQPainter::fillRect( int x, int y, int w, int h, const TQBrush &brush )
/*!
\fn bool TQPainter::hasClipping() const
- Returns TRUE if clipping has been set; otherwise returns FALSE.
+ Returns true if clipping has been set; otherwise returns false.
\sa setClipping()
*/
@@ -2799,13 +2799,13 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
// tabs by spaces
TQChar *chr = (TQChar*)text.unicode();
const TQChar *end = chr + len;
- bool haveLineSep = FALSE;
+ bool haveLineSep = false;
while ( chr != end ) {
if ( *chr == '\r' || ( singleline && *chr == '\n' ) ) {
*chr = ' ';
} else if ( *chr == '\n' ) {
*chr = TQChar_linesep;
- haveLineSep = TRUE;
+ haveLineSep = true;
} else if ( *chr == '&' ) {
++maxUnderlines;
}
@@ -2944,8 +2944,8 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
}
if (!(tf & TQPainter::DontPrint)) {
- bool restoreClipping = FALSE;
- bool painterHasClip = FALSE;
+ bool restoreClipping = false;
+ bool painterHasClip = false;
TQRegion painterClipRegion;
if ( !dontclip ) {
#ifndef TQT_NO_TRANSFORMATIONS
@@ -2959,14 +2959,14 @@ void qt_format_text( const TQFont& font, const TQRect &_r,
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
+ restoreClipping = true;
painter->setClipRegion( reg );
} else {
if ( painter->hasClipping() ){
painterHasClip = painter->hasClipping();
painterClipRegion = painter->clipRegion();
- restoreClipping = TRUE;
- painter->setClipping( FALSE );
+ restoreClipping = true;
+ painter->setClipping( false );
}
}
@@ -3439,8 +3439,8 @@ void TQPen::setColor( const TQColor &c )
/*!
\fn bool TQPen::operator!=( const TQPen &p ) const
- Returns TRUE if the pen is different from \a p; otherwise returns
- FALSE.
+ Returns true if the pen is different from \a p; otherwise returns
+ false.
Two pens are different if they have different styles, widths or
colors.
@@ -3449,7 +3449,7 @@ void TQPen::setColor( const TQColor &c )
*/
/*!
- Returns TRUE if the pen is equal to \a p; otherwise returns FALSE.
+ Returns true if the pen is equal to \a p; otherwise returns false.
Two pens are equal if they have equal styles, widths and colors.
@@ -3816,8 +3816,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
/*!
\fn bool TQBrush::operator!=( const TQBrush &b ) const
- Returns TRUE if the brush is different from \a b; otherwise
- returns FALSE.
+ Returns true if the brush is different from \a b; otherwise
+ returns false.
Two brushes are different if they have different styles, colors or
pixmaps.
@@ -3826,8 +3826,8 @@ void TQBrush::setPixmap( const TQPixmap &pixmap )
*/
/*!
- Returns TRUE if the brush is equal to \a b; otherwise returns
- FALSE.
+ Returns true if the brush is equal to \a b; otherwise returns
+ false.
Two brushes are equal if they have equal styles, colors and
pixmaps.
diff --git a/src/kernel/tqpainter.h b/src/kernel/tqpainter.h
index 29a10406d..67dae0f6f 100644
--- a/src/kernel/tqpainter.h
+++ b/src/kernel/tqpainter.h
@@ -68,12 +68,12 @@ public:
enum CoordinateMode { CoordDevice, CoordPainter };
TQPainter();
- TQPainter( const TQPaintDevice *, bool unclipped = FALSE );
- TQPainter( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+ TQPainter( const TQPaintDevice *, bool unclipped = false );
+ TQPainter( const TQPaintDevice *, const TQWidget *, bool unclipped = false );
~TQPainter();
- bool begin( const TQPaintDevice *, bool unclipped = FALSE );
- bool begin( const TQPaintDevice *, const TQWidget *, bool unclipped = FALSE );
+ bool begin( const TQPaintDevice *, bool unclipped = false );
+ bool begin( const TQPaintDevice *, const TQWidget *, bool unclipped = false );
bool end();
TQPaintDevice *device() const;
@@ -135,7 +135,7 @@ public:
void setWorldXForm( bool ); // set world xform on/off
const TQWMatrix &worldMatrix() const; // get/set world xform matrix
- void setWorldMatrix( const TQWMatrix &, bool combine=FALSE );
+ void setWorldMatrix( const TQWMatrix &, bool combine=false );
void saveWorldMatrix();
void restoreWorldMatrix();
@@ -201,7 +201,7 @@ public:
int index=0, int nlines=-1 );
void drawPolyline( const TQPointArray &,
int index=0, int npoints=-1 );
- void drawPolygon( const TQPointArray &, bool winding=FALSE,
+ void drawPolygon( const TQPointArray &, bool winding=false,
int index=0, int npoints=-1 );
void drawConvexPolygon( const TQPointArray &,
int index=0, int npoints=-1 );
@@ -298,7 +298,7 @@ private:
void map( int, int, int, int, int *, int *, int *, int * ) const;
void mapInv( int, int, int *, int * ) const;
void mapInv( int, int, int, int, int *, int *, int *, int * ) const;
- void drawPolyInternal( const TQPointArray &, bool close=TRUE );
+ void drawPolyInternal( const TQPointArray &, bool close=true );
void drawWinFocusRect( int x, int y, int w, int h, bool xorPaint,
const TQColor &penColor );
@@ -394,7 +394,7 @@ protected:
uint clip_serial; // clipping serial number
#elif defined(TQ_WS_MAC)
TQt::HANDLE hd; // handle to drawable
- void initPaintDevice(bool force=FALSE, TQPoint *off=NULL, TQRegion *rgn=NULL);
+ void initPaintDevice(bool force=false, TQPoint *off=NULL, TQRegion *rgn=NULL);
friend const TQRegion &qt_mac_update_painter(TQPainter *, bool);
friend class TQFontEngineMac;
friend class TQMacPainter;
diff --git a/src/kernel/tqpainter_x11.cpp b/src/kernel/tqpainter_x11.cpp
index e477f2aaa..a25614691 100644
--- a/src/kernel/tqpainter_x11.cpp
+++ b/src/kernel/tqpainter_x11.cpp
@@ -225,14 +225,14 @@ inline double qsin( double a )
return(r);
}
-double qsincos( double a, bool calcCos=FALSE )
+double qsincos( double a, bool calcCos=false )
{
return calcCos ? qcos(a) : qsin(a);
}
#else
-double qsincos( double a, bool calcCos=FALSE )
+double qsincos( double a, bool calcCos=false )
{
if ( calcCos ) // calculate cosine
a -= Q_PI2;
@@ -258,8 +258,8 @@ double qsincos( double a, bool calcCos=FALSE )
return (a-a3/6+a5/120-a7/5040+a9/362880-a11/39916800)*sign;
}
-inline double qsin( double a ) { return qsincos(a, FALSE); }
-inline double qcos( double a ) { return qsincos(a, TRUE); }
+inline double qsin( double a ) { return qsincos(a, false); }
+inline double qcos( double a ) { return qsincos(a, true); }
#endif
@@ -282,14 +282,14 @@ struct TQGC
const int gc_array_size = 256;
static TQGC gc_array[gc_array_size]; // array of GCs
-static bool gc_array_init = FALSE;
+static bool gc_array_init = false;
static void init_gc_array()
{
if ( !gc_array_init ) {
memset( gc_array, 0, gc_array_size*sizeof(TQGC) );
- gc_array_init = TRUE;
+ gc_array_init = true;
}
}
@@ -303,17 +303,17 @@ static void cleanup_gc_array( Display *dpy )
XFreeGC( dpy, p->gc );
p++;
}
- gc_array_init = FALSE;
+ gc_array_init = false;
}
}
// #define DONT_USE_GC_ARRAY
-static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
- bool privateGC = FALSE )
+static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=false,
+ bool privateGC = false )
{
#if defined(DONT_USE_GC_ARRAY)
- privateGC = TRUE; // will be slower
+ privateGC = true; // will be slower
#endif
if ( privateGC ) {
GC gc = XCreateGC( dpy, hd, 0, 0 );
@@ -329,11 +329,11 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
p->gc = XCreateGC( dpy, hd, 0, 0 );
p->scrn = scrn;
XSetGraphicsExposures( dpy, p->gc, False );
- p->in_use = FALSE;
+ p->in_use = false;
p->mono = monochrome;
}
if ( !p->in_use && p->mono == monochrome && p->scrn == scrn ) {
- p->in_use = TRUE; // available/compatible GC
+ p->in_use = true; // available/compatible GC
return p->gc;
}
p++;
@@ -346,10 +346,10 @@ static GC alloc_gc( Display *dpy, int scrn, Drawable hd, bool monochrome=FALSE,
return gc;
}
-static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
+static void free_gc( Display *dpy, GC gc, bool privateGC = false )
{
#if defined(DONT_USE_GC_ARRAY)
- privateGC = TRUE; // will be slower
+ privateGC = true; // will be slower
#endif
if ( privateGC ) {
Q_ASSERT( dpy != 0 );
@@ -361,7 +361,7 @@ static void free_gc( Display *dpy, GC gc, bool privateGC = FALSE )
if ( gc_array_init ) {
while ( i-- ) {
if ( p->gc == gc ) {
- p->in_use = FALSE; // set available
+ p->in_use = false; // set available
XSetClipMask( dpy, gc, None ); // make it reusable
XSetFunction( dpy, gc, GXcopy );
XSetFillStyle( dpy, gc, FillSolid );
@@ -408,14 +408,14 @@ struct TQGCC // cached GC
const int gc_cache_size = 29; // multiply by 4
static TQGCC *gc_cache_buf;
static TQGCC *gc_cache[4*gc_cache_size];
-static bool gc_cache_init = FALSE;
+static bool gc_cache_init = false;
static uint gc_cache_clip_serial = 0;
static void init_gc_cache()
{
if ( !gc_cache_init ) {
- gc_cache_init = TRUE;
+ gc_cache_init = true;
gc_cache_clip_serial = 0;
TQGCC *g = gc_cache_buf = new TQGCC[4*gc_cache_size];
memset( g, 0, 4*gc_cache_size*sizeof(TQGCC) );
@@ -461,7 +461,7 @@ static void cleanup_gc_cache()
}
#endif
delete [] gc_cache_buf;
- gc_cache_init = FALSE;
+ gc_cache_init = false;
}
@@ -499,13 +499,13 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
gc_cache[k-1] = g;
*ref = (void *)g;
*gc = g->gc;
- return TRUE;
+ return true;
} else { // all GCs in use
#if defined(GC_CACHE_STAT)
g_numfaults++;
#endif
*ref = 0;
- return FALSE;
+ return false;
}
}
}
@@ -527,19 +527,19 @@ static bool obtain_gc( void **ref, GC *gc, uint pix, Display *dpy, int scrn,
gc_cache[k] = prev;
gc_cache[k-1] = g;
}
- return TRUE;
+ return true;
} else { // create new GC
#if defined(GC_CACHE_STAT)
g_numcreates++;
#endif
- g->gc = alloc_gc( dpy, scrn, hd, FALSE );
+ g->gc = alloc_gc( dpy, scrn, hd, false );
g->scrn = scrn;
g->pix = pix;
g->count = 1;
g->hits = 1;
g->clip_serial = 0;
*gc = g->gc;
- return FALSE;
+ return false;
}
}
@@ -607,7 +607,7 @@ void TQPainter::init()
penRef = brushRef = 0;
clip_serial = 0;
pfont = 0;
- block_ext = FALSE;
+ block_ext = false;
}
@@ -681,7 +681,7 @@ void TQPainter::updatePen()
(ps == NoPen || ps == SolidLine) &&
cpen.width() == 0 && rop == CopyROP;
- bool obtained = FALSE;
+ bool obtained = false;
bool internclipok = hasClipping();
if ( cacheIt ) {
if ( gc ) {
@@ -693,7 +693,7 @@ void TQPainter::updatePen()
obtained = obtain_gc(&penRef, &gc, cpen.color().pixel(scrn), dpy, scrn,
hd, clip_serial);
if ( !obtained && !penRef )
- gc = alloc_gc( dpy, scrn, hd, FALSE );
+ gc = alloc_gc( dpy, scrn, hd, false );
} else {
if ( gc ) {
if ( penRef ) {
@@ -701,7 +701,7 @@ void TQPainter::updatePen()
penRef = 0;
gc = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
} else {
- internclipok = TRUE;
+ internclipok = true;
}
} else {
gc = alloc_gc( dpy, scrn, hd, testf(MonoDev), testf(UsePrivateCx) );
@@ -738,7 +738,7 @@ void TQPainter::updatePen()
*/
int dot = cpen.width(); // width of a dot
int fudge = 1;
- bool allow_zero_lw = TRUE;
+ bool allow_zero_lw = true;
if ( dot <= 1 ) {
dot = 3;
fudge = 2;
@@ -753,13 +753,13 @@ void TQPainter::updatePen()
dashes[0] = fudge * 3 * dot;
dashes[1] = fudge * dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DotLine:
dashes[0] = dot;
dashes[1] = dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DashDotLine:
dashes[0] = 3 * dot;
@@ -767,7 +767,7 @@ void TQPainter::updatePen()
dashes[2] = dot;
dashes[3] = fudge * dot;
dash_len = 4;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case DashDotDotLine:
dashes[0] = 3 * dot;
@@ -777,14 +777,14 @@ void TQPainter::updatePen()
dashes[4] = dot;
dashes[5] = dot;
dash_len = 6;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
break;
case FineDotLine:
dot = 1;
dashes[0] = dot;
dashes[1] = dot;
dash_len = 2;
- allow_zero_lw = FALSE;
+ allow_zero_lw = false;
}
Q_ASSERT( dash_len <= (int) sizeof(dashes) );
@@ -888,7 +888,7 @@ void TQPainter::updateBrush()
(bs == NoBrush || bs == SolidPattern) &&
bro.x() == 0 && bro.y() == 0 && rop == CopyROP;
- bool obtained = FALSE;
+ bool obtained = false;
bool internclipok = hasClipping();
if ( cacheIt ) {
if ( gc_brush ) {
@@ -900,7 +900,7 @@ void TQPainter::updateBrush()
obtained = obtain_gc(&brushRef, &gc_brush, cbrush.color().pixel(scrn), dpy,
scrn, hd, clip_serial);
if ( !obtained && !brushRef )
- gc_brush = alloc_gc( dpy, scrn, hd, FALSE );
+ gc_brush = alloc_gc( dpy, scrn, hd, false );
} else {
if ( gc_brush ) {
if ( brushRef ) {
@@ -908,7 +908,7 @@ void TQPainter::updateBrush()
brushRef = 0;
gc_brush = alloc_gc( dpy, scrn, hd, testf(MonoDev) );
} else {
- internclipok = TRUE;
+ internclipok = true;
}
} else {
gc_brush = alloc_gc( dpy, scrn, hd, testf(MonoDev), testf(UsePrivateCx));
@@ -955,9 +955,9 @@ void TQPainter::updateBrush()
TQString key;
key.sprintf( "$qt-brush$%d", bs );
pm = TQPixmapCache::find( key );
- bool del = FALSE;
+ bool del = false;
if ( !pm ) { // not already in pm dict
- pm = new TQBitmap( d, d, pat, TRUE );
+ pm = new TQBitmap( d, d, pat, true );
TQ_CHECK_PTR( pm );
del = !TQPixmapCache::insert( key, pm );
}
@@ -981,8 +981,8 @@ void TQPainter::updateBrush()
/*!
- Begins painting the paint device \a pd and returns TRUE if
- successful; otherwise returns FALSE. If \a unclipped is TRUE, the
+ Begins painting the paint device \a pd and returns true if
+ successful; otherwise returns false. If \a unclipped is true, the
painting will not be clipped at the paint device's boundaries,
(although this is not supported by all platforms).
@@ -1015,13 +1015,13 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
tqWarning( "TQPainter::begin: Painter is already active."
"\n\tYou must end() the painter before a second begin()" );
#endif
- return FALSE;
+ return false;
}
if ( pd == 0 ) {
#if defined(QT_CHECK_NULL)
tqWarning( "TQPainter::begin: Paint device cannot be null" );
#endif
- return FALSE;
+ return false;
}
TQPixmap::x11SetDefaultScreen( pd->x11Screen() );
@@ -1042,7 +1042,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
"this device;\n\tAn extended paint device can only be "
"painted by one TQPainter at a time." );
#endif
- return FALSE;
+ return false;
}
bool reinit = flags != IsStartingUp; // 2nd or 3rd etc. time called
@@ -1067,7 +1067,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
else
flags = IsStartingUp;
pdev = 0;
- return FALSE;
+ return false;
}
if ( tabstops ) // update tabstops for device
setTabStops( tabstops );
@@ -1131,7 +1131,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
tqWarning( "TQPainter::begin: Cannot paint null pixmap" );
#endif
end();
- return FALSE;
+ return false;
}
bool mono = pm->depth() == 1; // monochrome bitmap
if ( mono ) {
@@ -1160,7 +1160,7 @@ bool TQPainter::begin( const TQPaintDevice *pd, bool unclipped )
clip_serial = gc_cache_clip_serial++;
updateBrush();
updatePen();
- return TRUE;
+ return true;
}
/*!
@@ -1190,7 +1190,7 @@ bool TQPainter::end() // end painting
#if defined(QT_CHECK_STATE)
tqWarning( "TQPainter::end: Missing begin() or begin() failed" );
#endif
- return FALSE;
+ return false;
}
killPStack();
@@ -1243,7 +1243,7 @@ bool TQPainter::end() // end painting
pdev->painters--;
pdev = 0;
dpy = 0;
- return TRUE;
+ return true;
}
/*!
@@ -1451,8 +1451,8 @@ void TQPainter::setBrushOrigin( int x, int y )
/*!
- Enables clipping if \a enable is TRUE, or disables clipping if \a
- enable is FALSE.
+ Enables clipping if \a enable is true, or disables clipping if \a
+ enable is false.
\sa hasClipping(), setClipRect(), setClipRegion()
*/
@@ -1543,7 +1543,7 @@ void TQPainter::setClipRegion( const TQRegion &rgn, CoordinateMode m )
return; // device cannot clip
}
clearf( ClipOn ); // be sure to update clip rgn
- setClipping( TRUE );
+ setClipping( true );
}
@@ -1803,7 +1803,7 @@ void TQPainter::drawRect( int x, int y, int w, int h )
void TQPainter::drawWinFocusRect( int x, int y, int w, int h )
{
- drawWinFocusRect( x, y, w, h, TRUE, color0 );
+ drawWinFocusRect( x, y, w, h, true, color0 );
}
/*!
@@ -1828,7 +1828,7 @@ void TQPainter::drawWinFocusRect( int x, int y, int w, int h )
void TQPainter::drawWinFocusRect( int x, int y, int w, int h,
const TQColor &bgColor )
{
- drawWinFocusRect( x, y, w, h, FALSE, bgColor );
+ drawWinFocusRect( x, y, w, h, false, bgColor );
}
@@ -2119,7 +2119,7 @@ void TQPainter::drawArc( int x, int y, int w, int h, int a, int alen )
if ( txop == TxRotShear ) { // rotate/shear
TQPointArray pa;
pa.makeArc( x, y, w, h, a, alen, xmat ); // arc polyline
- drawPolyInternal( pa, FALSE );
+ drawPolyInternal( pa, false );
return;
}
map( x, y, w, h, &x, &y, &w, &h );
@@ -2202,7 +2202,7 @@ void TQPainter::drawPie( int x, int y, int w, int h, int a, int alen )
XFillArc( dpy, hd, gc_brush, x, y, w, h, a*4, alen*4 );
if ( nopen ) {
g = gc_brush;
- nopen = FALSE;
+ nopen = false;
}
}
if ( !nopen ) { // draw pie outline
@@ -2278,7 +2278,7 @@ void TQPainter::drawChord( int x, int y, int w, int h, int a, int alen )
XFillArc( dpy, hd, gc_brush, x, y, w, h, a*4, alen*4 );
if ( nopen ) {
g = gc_brush;
- nopen = FALSE;
+ nopen = false;
}
}
if ( !nopen ) { // draw chord outline
@@ -2419,8 +2419,8 @@ static int global_polygon_shape = Complex;
The first point is always connected to the last point.
The polygon is filled with the current brush(). If \a winding is
- TRUE, the polygon is filled using the winding fill algorithm. If
- \a winding is FALSE, the polygon is filled using the even-odd
+ true, the polygon is filled using the winding fill algorithm. If
+ \a winding is false, the polygon is filled using the even-odd
(alternative) fill algorithm.
\warning On X11, coordinates that do not fit into 16-bit signed
@@ -2502,7 +2502,7 @@ void TQPainter::drawConvexPolygon( const TQPointArray &pa,
int index, int npoints )
{
global_polygon_shape = Convex;
- drawPolygon(pa, FALSE, index, npoints);
+ drawPolygon(pa, false, index, npoints);
global_polygon_shape = Complex;
}
@@ -2617,11 +2617,11 @@ void TQPainter::drawPixmap( int x, int y, const TQPixmap &pixmap,
if ( sx != 0 || sy != 0 ||
sw != pixmap.width() || sh != pixmap.height() ) {
TQPixmap tmp( sw, sh, pixmap.depth() );
- bitBlt( &tmp, 0, 0, &pixmap, sx, sy, sw, sh, CopyROP, TRUE );
+ bitBlt( &tmp, 0, 0, &pixmap, sx, sy, sw, sh, CopyROP, true );
if ( pixmap.mask() ) {
TQBitmap mask( sw, sh );
bitBlt( &mask, 0, 0, pixmap.mask(), sx, sy, sw, sh,
- CopyROP, TRUE );
+ CopyROP, true );
tmp.setMask( mask );
}
drawPixmap( x, y, tmp );
@@ -2706,7 +2706,7 @@ void TQPainter::drawPixmap( int x, int y, const TQPixmap &pixmap,
TQBitmap *comb = new TQBitmap( sw, sh );
comb->detach();
- GC cgc = tqt_xget_temp_gc( pixmap.x11Screen(), TRUE ); // get temporary mono GC
+ GC cgc = tqt_xget_temp_gc( pixmap.x11Screen(), true ); // get temporary mono GC
XSetForeground( dpy, cgc, 0 );
XFillRectangle( dpy, comb->handle(), cgc, 0, 0, sw, sh );
XSetBackground( dpy, cgc, 0 );
@@ -2792,15 +2792,15 @@ static void drawTile( TQPainter *p, int x, int y, int w, int h,
static void fillTile( TQPixmap *tile, const TQPixmap &pixmap )
{
- bitBlt( tile, 0, 0, &pixmap, 0, 0, -1, -1, TQt::CopyROP, TRUE );
+ bitBlt( tile, 0, 0, &pixmap, 0, 0, -1, -1, TQt::CopyROP, true );
int x = pixmap.width();
while ( x < tile->width() ) {
- bitBlt( tile, x,0, tile, 0,0, x,pixmap.height(), TQt::CopyROP, TRUE );
+ bitBlt( tile, x,0, tile, 0,0, x,pixmap.height(), TQt::CopyROP, true );
x *= 2;
}
int y = pixmap.height();
while ( y < tile->height() ) {
- bitBlt( tile, 0,y, tile, 0,0, tile->width(),y, TQt::CopyROP, TRUE );
+ bitBlt( tile, 0,y, tile, 0,0, tile->width(),y, TQt::CopyROP, true );
y *= 2;
}
}
@@ -3001,7 +3001,7 @@ void qt_draw_background( TQPainter *p, int x, int y, int w, int h )
return;
}
XSetForeground( p->dpy, p->gc, p->bg_col.pixel(p->scrn) );
- qt_draw_transformed_rect( p, x, y, w, h, TRUE);
+ qt_draw_transformed_rect( p, x, y, w, h, true);
XSetForeground( p->dpy, p->gc, p->cpen.color().pixel(p->scrn) );
}
diff --git a/src/kernel/tqpalette.cpp b/src/kernel/tqpalette.cpp
index fad57ce13..7fc7dff8c 100644
--- a/src/kernel/tqpalette.cpp
+++ b/src/kernel/tqpalette.cpp
@@ -484,15 +484,15 @@ void TQColorGroup::setBrush( ColorRole r, const TQBrush &b )
/*!
\fn bool TQColorGroup::operator!=( const TQColorGroup &g ) const
- Returns TRUE if this color group is different from \a g; otherwise
- returns FALSE.
+ Returns true if this color group is different from \a g; otherwise
+ returns false.
\sa operator!=()
*/
/*!
- Returns TRUE if this color group is equal to \a g; otherwise
- returns FALSE.
+ Returns true if this color group is equal to \a g; otherwise
+ returns false.
\sa operator==()
*/
@@ -500,11 +500,11 @@ void TQColorGroup::setBrush( ColorRole r, const TQBrush &b )
bool TQColorGroup::operator==( const TQColorGroup &g ) const
{
if ( d == g.d )
- return TRUE;
+ return true;
for( int r = 0 ; r < NColorRoles ; r++ )
if ( br[r] != g.br[r] )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
@@ -883,13 +883,13 @@ void TQPalette::setInactive( const TQColorGroup &g )
/*!
\fn bool TQPalette::operator!=( const TQPalette &p ) const
- Returns TRUE (slowly) if this palette is different from \a p;
- otherwise returns FALSE (usually quickly).
+ Returns true (slowly) if this palette is different from \a p;
+ otherwise returns false (usually quickly).
*/
/*!
- Returns TRUE (usually quickly) if this palette is equal to \a p;
- otherwise returns FALSE (slowly).
+ Returns true (usually quickly) if this palette is equal to \a p;
+ otherwise returns false (slowly).
*/
bool TQPalette::operator==( const TQPalette &p ) const
@@ -1059,9 +1059,9 @@ TQDataStream &operator>>( TQDataStream &s, TQPalette &p )
#endif //TQT_NO_DATASTREAM
/*!
- Returns TRUE if this palette and \a p are copies of each other,
+ Returns true if this palette and \a p are copies of each other,
i.e. one of them was created as a copy of the other and neither
- was subsequently modified; otherwise returns FALSE. This is much
+ was subsequently modified; otherwise returns false. This is much
stricter than equality.
\sa operator=() operator==()
diff --git a/src/kernel/tqpicture.cpp b/src/kernel/tqpicture.cpp
index c0fb3d008..692e9087a 100644
--- a/src/kernel/tqpicture.cpp
+++ b/src/kernel/tqpicture.cpp
@@ -145,7 +145,7 @@ TQPicture::TQPicture( int formatVersion )
if ( formatVersion > 0 && formatVersion != (int)mfhdr_maj ) {
d->formatMajor = formatVersion;
d->formatMinor = 0;
- d->formatOk = FALSE;
+ d->formatOk = false;
}
else {
d->resetFormat();
@@ -176,8 +176,8 @@ TQPicture::~TQPicture()
/*!
\fn bool TQPicture::isNull() const
- Returns TRUE if the picture contains no data; otherwise returns
- FALSE.
+ Returns true if the picture contains no data; otherwise returns
+ false.
*/
/*!
@@ -217,7 +217,7 @@ void TQPicture::setData( const char* data, uint size )
/*!
Loads a picture from the file specified by \a fileName and returns
- TRUE if successful; otherwise returns FALSE.
+ true if successful; otherwise returns false.
By default, the file will be interpreted as being in the native
TQPicture format. Specifying the \a format string is optional and
@@ -236,7 +236,7 @@ bool TQPicture::load( const TQString &fileName, const char *format )
{
TQFile f( fileName );
if ( !f.open(IO_ReadOnly) )
- return FALSE;
+ return false;
return load( &f, format );
}
@@ -252,7 +252,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
if ( qstrcmp( format, "svg" ) == 0 ) {
TQSvgDevice svg;
if ( !svg.load( dev ) )
- return FALSE;
+ return false;
TQPainter p( this );
bool b = svg.play( &p );
d->brect = svg.boundingRect();
@@ -261,7 +261,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
#endif
if ( format ) {
tqWarning( "TQPicture::load: No such picture format: %s", format );
- return FALSE;
+ return false;
}
detach();
@@ -272,7 +272,7 @@ bool TQPicture::load( TQIODevice *dev, const char *format )
/*!
Saves a picture to the file specified by \a fileName and returns
- TRUE if successful; otherwise returns FALSE.
+ true if successful; otherwise returns false.
Specifying the file \a format string is optional. It's not
recommended unless you intend to export the picture data for
@@ -294,7 +294,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
tqWarning( "TQPicture::save: still being painted on. "
"Call TQPainter::end() first" );
#endif
- return FALSE;
+ return false;
}
#ifndef TQT_NO_SVG
@@ -304,7 +304,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
TQSvgDevice svg;
TQPainter p( &svg );
if ( !play( &p ) )
- return FALSE;
+ return false;
svg.setBoundingRect( boundingRect() );
return svg.save( fileName );
}
@@ -312,7 +312,7 @@ bool TQPicture::save( const TQString &fileName, const char *format )
TQFile f( fileName );
if ( !f.open(IO_WriteOnly) )
- return FALSE;
+ return false;
return save( &f, format );
}
@@ -329,7 +329,7 @@ bool TQPicture::save( TQIODevice *dev, const char *format )
tqWarning( "TQPicture::save: still being painted on. "
"Call TQPainter::end() first" );
#endif
- return FALSE;
+ return false;
}
#ifndef TQT_NO_SVG
@@ -337,18 +337,18 @@ bool TQPicture::save( TQIODevice *dev, const char *format )
TQSvgDevice svg;
TQPainter p( &svg );
if ( !play( &p ) )
- return FALSE;
+ return false;
svg.setBoundingRect( boundingRect() );
return svg.save( dev );
}
#endif
if ( format ) {
tqWarning( "TQPicture::save: No such picture format: %s", format );
- return FALSE;
+ return false;
}
dev->writeBlock( d->pictb.buffer().data(), d->pictb.buffer().size() );
- return TRUE;
+ return true;
}
/*!
@@ -376,8 +376,8 @@ void TQPicture::setBoundingRect( const TQRect &r )
}
/*!
- Replays the picture using \a painter, and returns TRUE if
- successful; otherwise returns FALSE.
+ Replays the picture using \a painter, and returns true if
+ successful; otherwise returns false.
This function does exactly the same as TQPainter::drawPicture()
with (x, y) = (0, 0).
@@ -386,10 +386,10 @@ void TQPicture::setBoundingRect( const TQRect &r )
bool TQPicture::play( TQPainter *painter )
{
if ( d->pictb.size() == 0 ) // nothing recorded
- return TRUE;
+ return true;
if ( !d->formatOk && !d->checkFormat() )
- return FALSE;
+ return false;
d->pictb.open( IO_ReadOnly ); // open buffer device
TQDataStream s;
@@ -412,10 +412,10 @@ bool TQPicture::play( TQPainter *painter )
tqWarning( "TQPicture::play: Format error" );
#endif
d->pictb.close();
- return FALSE;
+ return false;
}
d->pictb.close();
- return TRUE; // no end-command
+ return true; // no end-command
}
@@ -562,11 +562,11 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords )
case PdcBegin:
s >> ul; // number of records
if ( !exec( painter, s, ul ) )
- return FALSE;
+ return false;
break;
case PdcEnd:
if ( nrecords == 0 )
- return TRUE;
+ return true;
break;
case PdcSave:
painter->save();
@@ -679,7 +679,7 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords )
Q_ASSERT( TQ_INT32(s.device()->at() - strm_pos) == len );
#endif
}
- return FALSE;
+ return false;
}
@@ -719,8 +719,8 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
}
trecs = 0;
s << (TQ_UINT32)trecs; // total number of records
- formatOk = FALSE;
- return TRUE;
+ formatOk = false;
+ return true;
} else if ( c == PdcEnd ) { // end; calc checksum and close
trecs++;
s << (TQ_UINT8)c << (TQ_UINT8)0;
@@ -739,14 +739,14 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
TQ_UINT16 cs = (TQ_UINT16)tqChecksum( buf.data()+data_start, pos-data_start );
s << cs; // write checksum
pictb.close();
- return TRUE;
+ return true;
}
trecs++;
s << (TQ_UINT8)c; // write cmd to stream
s << (TQ_UINT8)0; // write dummy length info
int pos = (int)pictb.at(); // save position
TQRect br; // bounding rect addition
- bool corr = FALSE; // correction for pen width
+ bool corr = false; // correction for pen width
switch ( c ) {
case PdcDrawPoint:
@@ -755,18 +755,18 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
case PdcSetBrushOrigin:
s << *p[0].point;
br = TQRect( *p[0].point, TQSize( 1, 1 ) );
- corr = TRUE;
+ corr = true;
break;
case PdcDrawLine:
s << *p[0].point << *p[1].point;
br = TQRect( *p[0].point, *p[1].point ).normalize();
- corr = TRUE;
+ corr = true;
break;
case PdcDrawRect:
case PdcDrawEllipse:
s << *p[0].rect;
br = *p[0].rect;
- corr = TRUE;
+ corr = true;
break;
case PdcDrawRoundRect:
case PdcDrawArc:
@@ -774,25 +774,25 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
case PdcDrawChord:
s << *p[0].rect << (TQ_INT16)p[1].ival << (TQ_INT16)p[2].ival;
br = *p[0].rect;
- corr = TRUE;
+ corr = true;
break;
case PdcDrawLineSegments:
case PdcDrawPolyline:
s << *p[0].ptarr;
br = p[0].ptarr->boundingRect();
- corr = TRUE;
+ corr = true;
break;
#ifndef TQT_NO_BEZIER
case PdcDrawCubicBezier:
s << *p[0].ptarr;
br = p[0].ptarr->cubicBezier().boundingRect();
- corr = TRUE;
+ corr = true;
break;
#endif
case PdcDrawPolygon:
s << *p[0].ptarr << (TQ_INT8)p[1].ival;
br = p[0].ptarr->boundingRect();
- corr = TRUE;
+ corr = true;
break;
case PdcDrawText2:
if ( formatMajor == 1 ) {
@@ -935,7 +935,7 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p )
brect |= br; // merge with existing rect
}
- return TRUE;
+ return true;
}
@@ -1087,12 +1087,12 @@ TQPicture& TQPicture::operator= (const TQPicture& p)
/*!
\internal
- Sets formatOk to FALSE and resets the format version numbers to default
+ Sets formatOk to false and resets the format version numbers to default
*/
void TQPicture::TQPicturePrivate::resetFormat()
{
- formatOk = FALSE;
+ formatOk = false;
formatMajor = mfhdr_maj;
formatMinor = mfhdr_min;
}
@@ -1100,8 +1100,8 @@ void TQPicture::TQPicturePrivate::resetFormat()
/*!
\internal
- Checks data integrity and format version number. Set formatOk to TRUE
- on success, to FALSE otherwise. Returns the resulting formatOk value.
+ Checks data integrity and format version number. Set formatOk to true
+ on success, to false otherwise. Returns the resulting formatOk value.
*/
bool TQPicture::TQPicturePrivate::checkFormat()
@@ -1110,7 +1110,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
// can't check anything in an empty buffer
if ( pictb.size() == 0 )
- return FALSE;
+ return false;
pictb.open( IO_ReadOnly ); // open buffer device
TQDataStream s;
@@ -1123,7 +1123,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
tqWarning( "TQPicture::checkFormat: Incorrect header" );
#endif
pictb.close();
- return FALSE;
+ return false;
}
int cs_start = sizeof(TQ_UINT32); // pos of checksum word
@@ -1138,7 +1138,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
ccs, cs );
#endif
pictb.close();
- return FALSE;
+ return false;
}
TQ_UINT16 major, minor;
@@ -1149,7 +1149,7 @@ bool TQPicture::TQPicturePrivate::checkFormat()
major, minor);
#endif
pictb.close();
- return FALSE;
+ return false;
}
s.setVersion( major != 4 ? major : 3 );
@@ -1166,14 +1166,14 @@ bool TQPicture::TQPicturePrivate::checkFormat()
tqWarning( "TQPicture::checkFormat: Format error" );
#endif
pictb.close();
- return FALSE;
+ return false;
}
pictb.close();
- formatOk = TRUE; // picture seems to be ok
+ formatOk = true; // picture seems to be ok
formatMajor = major;
formatMinor = minor;
- return TRUE;
+ return true;
}
/*****************************************************************************
diff --git a/src/kernel/tqpixmap.cpp b/src/kernel/tqpixmap.cpp
index c3eceba6b..db404beee 100644
--- a/src/kernel/tqpixmap.cpp
+++ b/src/kernel/tqpixmap.cpp
@@ -207,7 +207,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, bool bitmap,
TQPixmap::TQPixmap()
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
}
/*!
@@ -219,7 +219,7 @@ TQPixmap::TQPixmap()
TQPixmap::TQPixmap( const TQImage& image )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
convertFromImage( image );
}
@@ -242,7 +242,7 @@ TQPixmap::TQPixmap( const TQImage& image )
TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( w, h, depth, FALSE, optimization );
+ init( w, h, depth, false, optimization );
}
/*!
@@ -255,7 +255,7 @@ TQPixmap::TQPixmap( int w, int h, int depth, Optimization optimization )
TQPixmap::TQPixmap( const TQSize &size, int depth, Optimization optimization )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( size.width(), size.height(), depth, FALSE, optimization );
+ init( size.width(), size.height(), depth, false, optimization );
}
#ifndef TQT_NO_IMAGEIO
@@ -281,7 +281,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format,
int conversion_flags )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
load( fileName, format, conversion_flags );
}
@@ -302,7 +302,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format,
TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
load( fileName, format, mode );
}
@@ -332,7 +332,7 @@ TQPixmap::TQPixmap( const TQString& fileName, const char *format, ColorMode mode
TQPixmap::TQPixmap( const char *xpm[] )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
TQImage image( xpm );
if ( !image.isNull() )
convertFromImage( image );
@@ -348,7 +348,7 @@ TQPixmap::TQPixmap( const char *xpm[] )
TQPixmap::TQPixmap( const TQByteArray & img_data )
: TQPaintDevice( TQInternal::Pixmap )
{
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
loadFromData( img_data );
}
#endif //TQT_NO_IMAGEIO
@@ -437,7 +437,7 @@ TQPixmap TQPixmap::copy( bool ignoreMask ) const
#endif // TQ_WS_X11
if ( ignoreMask )
- bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, TRUE );
+ bitBlt( &pm, 0, 0, this, 0, 0, data->w, data->h, TQt::CopyROP, true );
else
copyBlt( &pm, 0, 0, this, 0, 0, data->w, data->h );
}
@@ -468,7 +468,7 @@ TQPixmap &TQPixmap::operator=( const TQPixmap &pixmap )
if ( pixmap.paintingActive() ) { // make a deep copy
init( pixmap.width(), pixmap.height(), pixmap.depth(),
pixmap.data->bitmap, pixmap.data->optim );
- data->uninit = FALSE;
+ data->uninit = false;
if ( !isNull() )
copyBlt( this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height() );
pixmap.data->deref();
@@ -508,13 +508,13 @@ TQPixmap &TQPixmap::operator=( const TQImage &image )
/*!
\fn bool TQPixmap::isTQBitmap() const
- Returns TRUE if this is a TQBitmap; otherwise returns FALSE.
+ Returns true if this is a TQBitmap; otherwise returns false.
*/
/*!
\fn bool TQPixmap::isNull() const
- Returns TRUE if this is a null pixmap; otherwise returns FALSE.
+ Returns true if this is a null pixmap; otherwise returns false.
A null pixmap has zero width, zero height and no contents. You
cannot draw in a null pixmap or bitBlt() anything to it.
@@ -666,7 +666,7 @@ void TQPixmap::resize( int w, int h )
if ( !data->uninit && !isNull() ) // has existing pixmap
bitBlt( &pm, 0, 0, this, 0, 0, // copy old pixmap
TQMIN(width(), w),
- TQMIN(height(),h), CopyROP, TRUE );
+ TQMIN(height(),h), CopyROP, true );
#if defined(TQ_WS_MAC)
if(data->alphapm) {
data->alphapm->resize(w, h);
@@ -724,16 +724,16 @@ void TQPixmap::setMask( const TQBitmap &newmask )
const TQPixmap *tmp = &newmask; // dec cxx bug
if ( (data == tmp->data) ||
( newmask.handle() && newmask.handle() == handle() ) ) {
- TQPixmap m = tmp->copy( TRUE );
+ TQPixmap m = tmp->copy( true );
setMask( *((TQBitmap*)&m) );
- data->selfmask = TRUE; // mask == pixmap
+ data->selfmask = true; // mask == pixmap
return;
}
if ( newmask.isNull() ) { // reset the mask
if (data->mask) {
detach();
- data->selfmask = FALSE;
+ data->selfmask = false;
delete data->mask;
data->mask = 0;
@@ -742,7 +742,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
}
detach();
- data->selfmask = FALSE;
+ data->selfmask = false;
if ( newmask.width() != width() || newmask.height() != height() ) {
#if defined(QT_CHECK_RANGE)
@@ -760,7 +760,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
delete data->mask;
TQBitmap* newmaskcopy;
if ( newmask.mask() )
- newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( TRUE ) );
+ newmaskcopy = (TQBitmap*)new TQPixmap( tmp->copy( true ) );
else
newmaskcopy = new TQBitmap( newmask );
#ifdef TQ_WS_X11
@@ -773,8 +773,8 @@ void TQPixmap::setMask( const TQBitmap &newmask )
/*!
\fn bool TQPixmap::selfMask() const
- Returns TRUE if the pixmap's mask is identical to the pixmap
- itself; otherwise returns FALSE.
+ Returns true if the pixmap's mask is identical to the pixmap
+ itself; otherwise returns false.
\sa mask()
*/
@@ -795,7 +795,7 @@ void TQPixmap::setMask( const TQBitmap &newmask )
TQImage, non-trivial computations and a transformation back to a
TQBitmap.
- If \a clipTight is TRUE the mask is just large enough to cover the
+ If \a clipTight is true the mask is just large enough to cover the
pixels; otherwise, the mask is larger than the data pixels.
\sa TQImage::createHeuristicMask()
@@ -825,8 +825,8 @@ const char* TQPixmap::imageFormat( const TQString &fileName )
}
/*!
- Loads a pixmap from the file \a fileName at runtime. Returns TRUE
- if successful; otherwise returns FALSE.
+ Loads a pixmap from the file \a fileName at runtime. Returns true
+ if successful; otherwise returns false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -892,7 +892,7 @@ bool TQPixmap::load( const TQString &fileName, const char *format,
\overload
Converts \a image and sets this pixmap using color mode \a mode.
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
\sa TQPixmap::ColorMode
*/
@@ -902,7 +902,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode )
if ( image.isNull() ) {
// convert null image to null pixmap
*this = TQPixmap();
- return TRUE;
+ return true;
}
int conversion_flags = 0;
@@ -922,7 +922,7 @@ bool TQPixmap::convertFromImage( const TQImage &image, ColorMode mode )
#ifndef TQT_NO_IMAGEIO
/*!
Loads a pixmap from the binary data in \a buf (\a len bytes).
- Returns TRUE if successful; otherwise returns FALSE.
+ Returns true if successful; otherwise returns false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -961,8 +961,8 @@ bool TQPixmap::loadFromData( const uchar *buf, uint len, const char *format,
\overload
Loads a pixmap from the binary data in \a buf (\a len bytes) using
- color mode \a mode. Returns TRUE if successful; otherwise returns
- FALSE.
+ color mode \a mode. Returns true if successful; otherwise returns
+ false.
If \a format is specified, the loader attempts to read the pixmap
using the specified format. If \a format is not specified
@@ -1006,8 +1006,8 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format,
format \a format and a quality factor \a quality. \a quality must
be in the range [0,100] or -1. Specify 0 to obtain small
compressed files, 100 for large uncompressed files, and -1 to use
- the default settings. Returns TRUE if successful; otherwise
- returns FALSE.
+ the default settings. Returns true if successful; otherwise
+ returns false.
\sa load(), loadFromData(), imageFormat(), TQImage::save(),
TQImageIO
@@ -1016,7 +1016,7 @@ bool TQPixmap::loadFromData( const TQByteArray &buf, const char *format,
bool TQPixmap::save( const TQString &fileName, const char *format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( fileName, format );
return doImageIO( &io, quality );
}
@@ -1039,7 +1039,7 @@ bool TQPixmap::save( const TQString &fileName, const char *format, int quality )
bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const
{
if ( isNull() )
- return FALSE; // nothing to save
+ return false; // nothing to save
TQImageIO io( device, format );
return doImageIO( &io, quality );
}
@@ -1050,7 +1050,7 @@ bool TQPixmap::save( TQIODevice* device, const char* format, int quality ) const
bool TQPixmap::doImageIO( TQImageIO* io, int quality ) const
{
if ( !io )
- return FALSE;
+ return false;
io->setImage( convertToImage() );
#if defined(QT_CHECK_RANGE)
if ( quality > 100 || quality < -1 )
@@ -1116,8 +1116,8 @@ static TQPixmap grabChildWidgets( TQWidget * w )
TQPaintDevice *oldRedirect = TQPainter::redirect( w );
TQPainter::redirect( w, &res );
bool dblbfr = TQSharedDoubleBuffer::isDisabled();
- TQSharedDoubleBuffer::setDisabled( TRUE );
- TQPaintEvent e( w->rect(), FALSE );
+ TQSharedDoubleBuffer::setDisabled( true );
+ TQPaintEvent e( w->rect(), false );
TQApplication::sendEvent( w, &e );
TQSharedDoubleBuffer::setDisabled( dblbfr );
TQPainter::redirect( w, oldRedirect );
@@ -1450,7 +1450,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset,
break;
default: {
- return FALSE;
+ return false;
}
}
} else {
@@ -1502,7 +1502,7 @@ bool qt_xForm_helper( const TQWMatrix &trueMat, int xoffset,
m22ydy += m22;
dptr += p_inc;
}
- return TRUE;
+ return true;
}
#undef IWX_MSB
#undef IWX_LSB
diff --git a/src/kernel/tqpixmap.h b/src/kernel/tqpixmap.h
index 1ab6dd0b9..0a89e98bf 100644
--- a/src/kernel/tqpixmap.h
+++ b/src/kernel/tqpixmap.h
@@ -102,7 +102,7 @@ public:
bool hasAlpha() const;
bool hasAlphaChannel() const;
#ifndef TQT_NO_IMAGE_HEURISTIC_MASK
- TQBitmap createHeuristicMask( bool clipTight = TRUE ) const;
+ TQBitmap createHeuristicMask( bool clipTight = true ) const;
#endif
#ifndef TQT_NO_MIME
static TQPixmap fromMimeSource( const TQString& abs_name );
@@ -160,7 +160,7 @@ public:
HBITMAP multiCellBitmap() const;
int multiCellOffset() const;
int allocCell();
- void freeCell( bool = FALSE );
+ void freeCell( bool = false );
#endif
#if defined(TQ_WS_X11)
@@ -197,8 +197,8 @@ protected:
#if defined(TQ_WS_WIN)
TQPixmap *maskpm;
union {
- HBITMAP hbm; // if mcp == FALSE
- TQMCPI *mcpi; // if mcp == TRUE
+ HBITMAP hbm; // if mcp == false
+ TQMCPI *mcpi; // if mcp == true
} hbm_or_mcpi;
uchar *realAlphaBits;
#ifdef Q_OS_TEMP
@@ -224,10 +224,10 @@ private:
TQPixmap( int w, int h, int depth, bool, Optimization );
void init( int, int, int, bool, Optimization );
void deref();
- TQPixmap copy( bool ignoreMask = FALSE ) const;
+ TQPixmap copy( bool ignoreMask = false ) const;
#if defined(TQ_WS_WIN)
void initAlphaPixmap( uchar *bytes, int length, struct tagBITMAPINFO *bmi );
- void convertToAlphaPixmap( bool initAlpha=TRUE );
+ void convertToAlphaPixmap( bool initAlpha=true );
static void bitBltAlphaPixmap( TQPixmap *dst, int dx, int dy,
const TQPixmap *src, int sx, int sy,
int sw, int sh, bool useDstAlpha );
diff --git a/src/kernel/tqpixmap_x11.cpp b/src/kernel/tqpixmap_x11.cpp
index f2e4b0ca2..bca842fda 100644
--- a/src/kernel/tqpixmap_x11.cpp
+++ b/src/kernel/tqpixmap_x11.cpp
@@ -107,7 +107,7 @@ inline static void qSafeXDestroyImage( XImage *x )
#if defined(QT_MITSHM_XFORM)
-static bool xshminit = FALSE;
+static bool xshminit = false;
static XShmSegmentInfo xshminfo;
static XImage *xshmimg = 0;
static Pixmap xshmpm = 0;
@@ -140,14 +140,14 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
tqt_cleanup_mitshm();
} else {
if ( !XShmQueryVersion(dpy, &major, &minor, &pixmaps_ok) )
- return FALSE; // MIT Shm not supported
+ return false; // MIT Shm not supported
tqAddPostRoutine( tqt_cleanup_mitshm );
- xshminit = TRUE;
+ xshminit = true;
}
xshmimg = XShmCreateImage( dpy, vis, dd, ZPixmap, 0, &xshminfo, w, h );
if ( !xshmimg )
- return FALSE;
+ return false;
bool ok;
xshminfo.shmid = shmget( IPC_PRIVATE,
@@ -159,7 +159,7 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
xshminfo.shmaddr = xshmimg->data;
ok = ( xshminfo.shmaddr != (char*)-1 );
}
- xshminfo.readOnly = FALSE;
+ xshminfo.readOnly = false;
if ( ok )
ok = XShmAttach( dpy, &xshminfo );
if ( !ok ) {
@@ -169,13 +169,13 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
shmdt( xshminfo.shmaddr );
if ( xshminfo.shmid != -1 )
shmctl( xshminfo.shmid, IPC_RMID, 0 );
- return FALSE;
+ return false;
}
if ( pixmaps_ok )
xshmpm = XShmCreatePixmap( dpy, DefaultRootWindow(dpy), xshmimg->data,
&xshminfo, w, h, dd );
- return TRUE;
+ return true;
}
#else
@@ -184,7 +184,7 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
//
// static bool qt_create_mitshm_buffer( TQPaintDevice*, int, int )
// {
-// return FALSE;
+// return false;
// }
#endif // QT_MITSHM_XFORM
@@ -355,10 +355,10 @@ static void build_scale_table( uint **table, uint nBits )
return;
}
if (!*table) {
- static bool firstTable = TRUE;
+ static bool firstTable = true;
if ( firstTable ) {
tqAddPostRoutine( cleanup_scale_tables );
- firstTable = FALSE;
+ firstTable = false;
}
*table = new uint[256];
}
@@ -395,7 +395,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
static int serial = 0;
if ( defaultScreen >= 0 && defaultScreen != x11Screen() ) {
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = defaultScreen;
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -419,7 +419,7 @@ void TQPixmap::init( int w, int h, int d, bool bitmap, Optimization optim )
memset( data, 0, sizeof(TQPixmapData) );
data->count = 1;
- data->uninit = TRUE;
+ data->uninit = true;
data->bitmap = bitmap;
data->ser_no = ++serial;
data->optim = optim;
@@ -487,18 +487,18 @@ void TQPixmap::deref()
/*!
Constructs a monochrome pixmap, with width \a w and height \a h,
that is initialized with the data in \a bits. The \a isXbitmap
- indicates whether the data is an X bitmap and defaults to FALSE.
+ indicates whether the data is an X bitmap and defaults to false.
This constructor is protected and used by the TQBitmap class.
*/
TQPixmap::TQPixmap( int w, int h, const uchar *bits, bool isXbitmap)
: TQPaintDevice( TQInternal::Pixmap )
{ // for bitmaps only
- init( 0, 0, 0, FALSE, defOptim );
+ init( 0, 0, 0, false, defOptim );
if ( w <= 0 || h <= 0 ) // create null pixmap
return;
- data->uninit = FALSE;
+ data->uninit = false;
data->w = w;
data->h = h;
data->d = 1;
@@ -548,7 +548,7 @@ void TQPixmap::detach()
{
if ( data->count != 1 )
*this = copy();
- data->uninit = FALSE;
+ data->uninit = false;
// reset cached data
if ( data->ximage ) {
@@ -778,7 +778,7 @@ TQImage TQPixmap::convertToImage() const
axi = XGetImage(x11Display(), alf->hd, 0, 0, w, h, AllPlanes, ZPixmap);
if (axi) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
alpha.create(w, h, 8);
// copy each scanline
@@ -797,7 +797,7 @@ TQImage TQPixmap::convertToImage() const
qSafeXDestroyImage( axi );
}
} else if (msk) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
alpha = msk->convertToImage();
}
bool ale = alpha.bitOrder() == TQImage::LittleEndian;
@@ -1070,15 +1070,15 @@ TQImage TQPixmap::convertToImage() const
/*!
- Converts image \a img and sets this pixmap. Returns TRUE if
- successful; otherwise returns FALSE.
+ Converts image \a img and sets this pixmap. Returns true if
+ successful; otherwise returns false.
The \a conversion_flags argument is a bitwise-OR of the
\l{TQt::ImageConversionFlags}. Passing 0 for \a conversion_flags
sets all the default options.
Note that even though a TQPixmap with depth 1 behaves much like a
- TQBitmap, isTQBitmap() returns FALSE.
+ TQBitmap, isTQBitmap() returns false.
If a pixmap with depth 1 is painted with color0 and color1 and
converted to an image, the pixels painted with color0 will produce
@@ -1095,7 +1095,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#if defined(QT_CHECK_NULL)
tqWarning( "TQPixmap::convertFromImage: Cannot convert a null image" );
#endif
- return FALSE;
+ return false;
}
detach(); // detach other references
TQImage image = img;
@@ -1107,7 +1107,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
(conversion_flags & ColorMode_Mask)==MonoOnly );
if ( w >= 32768 || h >= 32768 )
- return FALSE;
+ return false;
// get rid of the mask
delete data->mask;
@@ -1125,12 +1125,12 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
d = 1;
}
} else { // can be both
- bool conv8 = FALSE;
+ bool conv8 = false;
if ( d > 8 && dd <= 8 ) { // convert to 8 bit
if ( (conversion_flags & DitherMode_Mask) == AutoDither )
conversion_flags = (conversion_flags & ~DitherMode_Mask)
| PreferDither;
- conv8 = TRUE;
+ conv8 = true;
} else if ( (conversion_flags & ColorMode_Mask) == ColorOnly ) {
conv8 = d == 1; // native depth wanted
} else if ( d == 1 ) {
@@ -1140,7 +1140,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
conv8 = TQMIN(c0,c1) != tqRgb(0,0,0) || TQMAX(c0,c1) != tqRgb(255,255,255);
} else {
// eg. 1-color monochrome images (they do exist).
- conv8 = TRUE;
+ conv8 = true;
}
}
if ( conv8 ) {
@@ -1227,7 +1227,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
m = image.createAlphaMask( conversion_flags );
setMask( m );
}
- return TRUE;
+ return true;
}
Display *dpy = x11Display();
@@ -1284,7 +1284,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
newbits = (uchar *)malloc( xi->bytes_per_line*h );
TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory
- return FALSE;
+ return false;
int bppc = xi->bits_per_pixel;
bool contig_bits = n_bits(red_mask) == rbits &&
@@ -1299,7 +1299,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
// Can do it? (Contiguous bits?)
contig_bits;
- static bool init=FALSE;
+ static bool init=false;
static int D[16][16];
if ( dither_tc && !init ) {
// I also contributed this code to XV - WWA.
@@ -1333,7 +1333,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
}
}
}
- init=TRUE;
+ init=true;
}
enum { BPP8,
@@ -1613,7 +1613,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
TQ_CHECK_PTR( newbits );
if ( !newbits ) // no memory
- return FALSE;
+ return false;
uchar* p = newbits;
memcpy( p, image.bits(), nbytes ); // copy image data into newbits
@@ -1744,7 +1744,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
TQ_CHECK_PTR( newerbits );
if ( !newerbits ) // no memory
- return FALSE;
+ return false;
uchar* p = newbits;
for ( uint y=0; y<h; y++ ) { // OOPS: Do right byte order!!
p2 = newerbits + p2inc*y;
@@ -1802,11 +1802,11 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#ifdef QT_MITSHM_CONVERSIONS
if( mitshm_ximage )
- XShmPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ),
+ XShmPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), false ),
xi, 0, 0, 0, 0, w, h, False );
else
#endif
- XPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), FALSE ),
+ XPutImage( dpy, hd, tqt_xget_readonly_gc( x11Screen(), false ),
xi, 0, 0, 0, 0, w, h );
data->w = w;
@@ -1831,7 +1831,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
for (int i = 0, count = image.numColors(); i < count; ++i) {
const int alpha = tqAlpha(rgb[i]);
if (alpha != 0 && alpha != 0xff) {
- alphamap = TRUE;
+ alphamap = true;
break;
}
}
@@ -1937,7 +1937,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags )
#endif
qSafeXDestroyImage(axi);
}
- return TRUE;
+ return true;
}
@@ -2019,10 +2019,10 @@ TQPixmap TQPixmap::grabWindow( WId window, int x, int y, int w, int h )
}
TQPixmap pm( w, h );
- pm.data->uninit = FALSE;
+ pm.data->uninit = false;
pm.x11SetScreen( scr );
- GC gc = tqt_xget_temp_gc( scr, FALSE );
+ GC gc = tqt_xget_temp_gc( scr, false );
XSetSubwindowMode( dpy, gc, IncludeInferiors );
XCopyArea( dpy, window, pm.handle(), gc, x, y, w, h, 0, 0 );
XSetSubwindowMode( dpy, gc, ClipByChildren );
@@ -2100,9 +2100,9 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
}
#if defined(QT_MITSHM_XFORM)
- static bool try_once = TRUE;
+ static bool try_once = true;
if (try_once) {
- try_once = FALSE;
+ try_once = false;
if ( !xshminit )
qt_create_mitshm_buffer( this, 800, 600 );
}
@@ -2212,9 +2212,9 @@ TQPixmap TQPixmap::xForm( const TQWMatrix &matrix ) const
}
return pm;
} else { // color pixmap
- GC gc = tqt_xget_readonly_gc( x11Screen(), FALSE );
+ GC gc = tqt_xget_readonly_gc( x11Screen(), false );
TQPixmap pm( w, h );
- pm.data->uninit = FALSE;
+ pm.data->uninit = false;
pm.x11SetScreen( x11Screen() );
#if defined(QT_MITSHM_XFORM)
if ( use_mitshm ) {
@@ -2312,7 +2312,7 @@ void TQPixmap::x11SetScreen( int screen )
return; // nothing to do
if ( isNull() ) {
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = screen;
xd->x_depth = TQPaintDevice::x11AppDepth( screen );
xd->x_cells = TQPaintDevice::x11AppCells( screen );
@@ -2329,7 +2329,7 @@ void TQPixmap::x11SetScreen( int screen )
TQImage img = convertToImage();
resize(0,0);
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = screen;
xd->x_depth = TQPaintDevice::x11AppDepth( screen );
xd->x_cells = TQPaintDevice::x11AppCells( screen );
@@ -2342,7 +2342,7 @@ void TQPixmap::x11SetScreen( int screen )
}
/*!
- Returns TRUE this pixmap has an alpha channel or a mask.
+ Returns true this pixmap has an alpha channel or a mask.
\sa hasAlphaChannel() mask()
*/
@@ -2352,11 +2352,11 @@ bool TQPixmap::hasAlpha() const
}
/*!
- Returns TRUE if the pixmap has an alpha channel; otherwise it
- returns FALSE.
+ Returns true if the pixmap has an alpha channel; otherwise it
+ returns false.
NOTE: If the pixmap has a mask but not alpha channel, this
- function returns FALSE.
+ function returns false.
\sa hasAlpha() mask()
*/
@@ -2397,7 +2397,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
}
// copy pixel data
- bitBlt( dst, dx, dy, src, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ bitBlt( dst, dx, dy, src, sx, sy, sw, sh, TQt::CopyROP, true );
// copy mask data
if ( src->data->mask ) {
@@ -2409,7 +2409,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
}
bitBlt( dst->data->mask, dx, dy,
- src->data->mask, sx, sy, sw, sh, TQt::CopyROP, TRUE );
+ src->data->mask, sx, sy, sw, sh, TQt::CopyROP, true );
}
#ifndef TQT_NO_XFTFREETYPE
@@ -2434,7 +2434,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
return;
// create an alpha pixmap for dst if it doesn't exist
- bool do_init = FALSE;
+ bool do_init = false;
if ( ! dst->data->alphapm ) {
dst->data->alphapm = new TQPixmap;
@@ -2450,7 +2450,7 @@ TQ_EXPORT void copyBlt( TQPixmap *dst, int dx, int dy,
dst->width(), dst->height(), 8);
// new alpha pixmaps should be fully opaque by default
- do_init = TRUE;
+ do_init = true;
dst->data->alphapm->rendhd =
(TQt::HANDLE) XftDrawCreateAlpha( dst->x11Display(),
diff --git a/src/kernel/tqpixmapcache.cpp b/src/kernel/tqpixmapcache.cpp
index 369df0c08..0976554fe 100644
--- a/src/kernel/tqpixmapcache.cpp
+++ b/src/kernel/tqpixmapcache.cpp
@@ -107,9 +107,9 @@ public:
TQPMCache():
TQObject( 0, "global pixmap cache" ),
TQCache<TQPixmap>( cache_limit * 1024, cache_size ),
- id( 0 ), ps( 0 ), t( FALSE )
+ id( 0 ), ps( 0 ), t( false )
{
- setAutoDelete( TRUE );
+ setAutoDelete( true );
}
~TQPMCache() {}
void timerEvent( TQTimerEvent * );
@@ -155,7 +155,7 @@ bool TQPMCache::insert( const TQString& k, const TQPixmap *d, int c, int p )
bool r = TQCache<TQPixmap>::insert( k, d, c, p );
if ( r && !id ) {
id = startTimer( 30000 );
- t = FALSE;
+ t = false;
}
return r;
}
@@ -198,7 +198,7 @@ TQPixmap *TQPixmapCache::find( const TQString &key )
Looks for a cached pixmap associated with the \a key in the cache.
If a pixmap is found, the function sets \a pm to that pixmap and
- returns TRUE; otherwise leaves \a pm alone and returns FALSE.
+ returns true; otherwise leaves \a pm alone and returns false.
Example:
\code
@@ -222,14 +222,14 @@ bool TQPixmapCache::find( const TQString &key, TQPixmap& pm )
/*!
\obsolete
Inserts the pixmap \a pm associated with \a key into the cache.
- Returns TRUE if successful, or FALSE if the pixmap is too big for the cache.
+ Returns true if successful, or false if the pixmap is too big for the cache.
<strong>
Note: \a pm must be allocated on the heap (using \c new).
- If this function returns FALSE, you must delete \a pm yourself.
+ If this function returns false, you must delete \a pm yourself.
- If this function returns TRUE, do not use \a pm afterwards or
+ If this function returns true, do not use \a pm afterwards or
keep references to it because any other insertions into the cache,
whether from anywhere in the application or within TQt itself, could cause
the pixmap to be discarded from the cache and the pointer to
diff --git a/src/kernel/tqpngio.cpp b/src/kernel/tqpngio.cpp
index cf4d5ca60..3bc0de639 100644
--- a/src/kernel/tqpngio.cpp
+++ b/src/kernel/tqpngio.cpp
@@ -165,7 +165,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
if (!image.create(width, height, 32))
return;
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
if (TQImage::systemByteOrder() == TQImage::BigEndian)
png_set_swap_alpha(png_ptr);
@@ -193,7 +193,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
const int g = info_ptr->trans_values.gray;
#endif
if (g < ncols) {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
image.setColor(g, image.color(g) & TQT_RGB_MASK);
}
}
@@ -221,7 +221,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
return;
int i = 0;
if ( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) {
- image.setAlphaBuffer( TRUE );
+ image.setAlphaBuffer( true );
#if PNG_LIBPNG_VER>=10500
while ( i < info_ptr_num_trans ) {
@@ -287,7 +287,7 @@ void setup_qt( TQImage& image, png_structp png_ptr, png_infop info_ptr, float sc
PNG_FILLER_BEFORE : PNG_FILLER_AFTER);
// We want 4 bytes, but it isn't an alpha channel
} else {
- image.setAlphaBuffer(TRUE);
+ image.setAlphaBuffer(true);
}
if ( TQImage::systemByteOrder() == TQImage::BigEndian ) {
@@ -438,7 +438,7 @@ png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)
while ( n-- && tqAlpha(*c++)==0xff )
;
if ( n<0 ) // LIAR!
- image.setAlphaBuffer(FALSE);
+ image.setAlphaBuffer(false);
}
iio->setImage(image);
@@ -531,7 +531,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
if (!png_ptr) {
- return FALSE;
+ return false;
}
png_set_error_fn(png_ptr, 0, 0, qt_png_warning);
@@ -539,7 +539,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
info_ptr = png_create_info_struct(png_ptr);
if (!info_ptr) {
png_destroy_write_struct(&png_ptr, 0);
- return FALSE;
+ return false;
}
#if PNG_LIBPNG_VER>=10500
@@ -548,7 +548,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
if (setjmp(png_ptr->jmpbuf)) {
#endif /* LIBPNG 1.5 */
png_destroy_write_struct(&png_ptr, &info_ptr);
- return FALSE;
+ return false;
}
int quality = quality_in;
@@ -673,14 +673,14 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
#ifndef TQT_NO_IMAGE_TEXT
// Write short texts early.
- set_text(image,png_ptr,info_ptr,TRUE);
+ set_text(image,png_ptr,info_ptr,true);
#endif
png_write_info(png_ptr, info_ptr);
#ifndef TQT_NO_IMAGE_TEXT
// Write long texts later.
- set_text(image,png_ptr,info_ptr,FALSE);
+ set_text(image,png_ptr,info_ptr,false);
#endif
if ( image.depth() != 1 )
@@ -733,7 +733,7 @@ bool TQPNGImageWriter::writeImage(const TQImage& image, int quality_in, int off_
png_destroy_write_struct(&png_ptr, &info_ptr);
- return TRUE;
+ return true;
}
static
@@ -816,11 +816,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
TQRgb** pjt = (TQRgb**)previous.jumpTable();
// Find left edge of change
- done = FALSE;
+ done = false;
for (minx = 0; minx < w && !done; minx++) {
for (int ty = 0; ty < h; ty++) {
if ( jt[ty][minx] != pjt[ty][minx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -828,11 +828,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
minx--;
// Find right edge of change
- done = FALSE;
+ done = false;
for (maxx = w-1; maxx >= 0 && !done; maxx--) {
for (int ty = 0; ty < h; ty++) {
if ( jt[ty][maxx] != pjt[ty][maxx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -840,11 +840,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
maxx++;
// Find top edge of change
- done = FALSE;
+ done = false;
for (miny = 0; miny < h && !done; miny++) {
for (int tx = 0; tx < w; tx++) {
if ( jt[miny][tx] != pjt[miny][tx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -852,11 +852,11 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
miny--;
// Find right edge of change
- done = FALSE;
+ done = false;
for (maxy = h-1; maxy >= 0 && !done; maxy--) {
for (int tx = 0; tx < w; tx++) {
if ( jt[maxy][tx] != pjt[maxy][tx] ) {
- done = TRUE;
+ done = true;
break;
}
}
@@ -876,7 +876,7 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
TQImage diff(dw, dh, 32);
- diff.setAlphaBuffer(TRUE);
+ diff.setAlphaBuffer(true);
int x, y;
if ( alignx < 1 )
alignx = 1;
@@ -915,10 +915,10 @@ bool TQPNGImagePacker::packImage(const TQImage& img)
diff = diff.convertDepth(depth,convflags);
if ( !writeImage(diff, minx, miny) )
- return FALSE;
+ return false;
}
previous = image;
- return TRUE;
+ return true;
}
@@ -1239,14 +1239,14 @@ void TQPNGFormat::end(png_structp png, png_infop info)
static bool skip(png_uint_32& max, png_bytep& data)
{
while (*data) {
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++;
}
- if ( !max ) return FALSE;
+ if ( !max ) return false;
max--;
data++; // skip to after NUL
- return TRUE;
+ return true;
}
#endif
*/
@@ -1317,7 +1317,7 @@ static TQPNGFormatType* globalPngFormatTypeObject = 0;
#endif // TQT_NO_ASYNC_IMAGE_IO
-static bool done = FALSE;
+static bool done = false;
void qCleanupPngIO()
{
#ifndef TQT_NO_ASYNC_IMAGE_IO
@@ -1326,13 +1326,13 @@ void qCleanupPngIO()
globalPngFormatTypeObject = 0;
}
#endif
- done = FALSE;
+ done = false;
}
void qInitPngIO()
{
if ( !done ) {
- done = TRUE;
+ done = true;
TQImageIO::defineIOHandler( "PNG", "^.PNG\r", 0, read_png_image,
write_png_image);
#ifndef TQT_NO_ASYNC_IMAGE_IO
diff --git a/src/kernel/tqpoint.cpp b/src/kernel/tqpoint.cpp
index e9237521c..fe7ff3a22 100644
--- a/src/kernel/tqpoint.cpp
+++ b/src/kernel/tqpoint.cpp
@@ -98,7 +98,7 @@
/*!
\fn TQPoint::TQPoint()
- Constructs a point with coordinates (0, 0) (isNull() returns TRUE).
+ Constructs a point with coordinates (0, 0) (isNull() returns true).
*/
/*!
@@ -110,8 +110,8 @@
/*!
\fn bool TQPoint::isNull() const
- Returns TRUE if both the x value and the y value are 0; otherwise
- returns FALSE.
+ Returns true if both the x value and the y value are 0; otherwise
+ returns false.
*/
/*!
@@ -243,7 +243,7 @@
\relates TQPoint
- Returns TRUE if \a p1 and \a p2 are equal; otherwise returns FALSE.
+ Returns true if \a p1 and \a p2 are equal; otherwise returns false.
*/
/*!
@@ -251,7 +251,7 @@
\relates TQPoint
- Returns TRUE if \a p1 and \a p2 are not equal; otherwise returns FALSE.
+ Returns true if \a p1 and \a p2 are not equal; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqpointarray.cpp b/src/kernel/tqpointarray.cpp
index 9d7bafccc..4a1e35f8c 100644
--- a/src/kernel/tqpointarray.cpp
+++ b/src/kernel/tqpointarray.cpp
@@ -123,11 +123,11 @@ const double Q_PI = 3.14159265358979323846; // pi // one more useful comment
/*!
Constructs a point array from the rectangle \a r.
- If \a closed is FALSE, then the point array just contains the
+ If \a closed is false, then the point array just contains the
following four points in the listed order: r.topLeft(),
r.topRight(), r.bottomRight() and r.bottomLeft().
- If \a closed is TRUE, then a fifth point is set to r.topLeft().
+ If \a closed is true, then a fifth point is set to r.topLeft().
*/
TQPointArray::TQPointArray( const TQRect &r, bool closed )
@@ -247,7 +247,7 @@ void TQPointArray::setPoint( uint index, int x, int y )
Resizes the array to \a nPoints and sets the points in the array to
the values taken from \a points.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (normally due to lack of memory).
The example code creates an array with two points (1,2) and (3,4):
@@ -263,14 +263,14 @@ void TQPointArray::setPoint( uint index, int x, int y )
bool TQPointArray::setPoints( int nPoints, const TQCOORD *points )
{
if ( !resize(nPoints) )
- return FALSE;
+ return false;
int i = 0;
while ( nPoints-- ) { // make array of points
setPoint( i++, *points, *(points+1) );
points++;
points++;
}
- return TRUE;
+ return true;
}
/*!
@@ -279,7 +279,7 @@ bool TQPointArray::setPoints( int nPoints, const TQCOORD *points )
Resizes the array to \a nPoints and sets the points in the array
to the values taken from the variable argument list.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
The example code creates an array with two points (1,2) and (3,4):
@@ -299,7 +299,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
{
va_list ap;
if ( !resize(nPoints) )
- return FALSE;
+ return false;
setPoint( 0, firstx, firsty ); // set first point
int i = 1, x, y;
nPoints--;
@@ -310,7 +310,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
setPoint( i++, x, y );
}
va_end( ap );
- return TRUE;
+ return true;
}
/*! \overload
@@ -319,7 +319,7 @@ bool TQPointArray::setPoints( int nPoints, int firstx, int firsty, ... )
this point array, and resizes the point array if
\c{index+nPoints} exceeds the size of the array.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
*/
@@ -328,7 +328,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
{
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize( index + nPoints ) )
- return FALSE;
+ return false;
}
int i = index;
while ( nPoints-- ) { // make array of points
@@ -336,7 +336,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
points++;
points++;
}
- return TRUE;
+ return true;
}
/*!
@@ -344,7 +344,7 @@ bool TQPointArray::putPoints( int index, int nPoints, const TQCOORD *points )
point array from position \a index, and resizes the point array if
\c{index+nPoints} exceeds the size of the array.
- Returns TRUE if successful, or FALSE if the array could not be
+ Returns true if successful, or false if the array could not be
resized (typically due to lack of memory).
The example code creates an array with three points (4,5), (6,7)
@@ -376,10 +376,10 @@ bool TQPointArray::putPoints( int index, int nPoints, int firstx, int firsty,
va_list ap;
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize(index + nPoints) )
- return FALSE;
+ return false;
}
if ( nPoints <= 0 )
- return TRUE;
+ return true;
setPoint( index, firstx, firsty ); // set first point
int i = index + 1, x, y;
nPoints--;
@@ -390,7 +390,7 @@ bool TQPointArray::putPoints( int index, int nPoints, int firstx, int firsty,
setPoint( i++, x, y );
}
va_end( ap );
- return TRUE;
+ return true;
}
@@ -418,16 +418,16 @@ bool TQPointArray::putPoints( int index, int nPoints,
{
if ( index + nPoints > (int)size() ) { // extend array
if ( !resize(index + nPoints) )
- return FALSE;
+ return false;
}
if ( nPoints <= 0 )
- return TRUE;
+ return true;
int n = 0;
while( n < nPoints ) {
setPoint( index+n, from[fromIndex+n] );
n++;
}
- return TRUE;
+ return true;
}
diff --git a/src/kernel/tqpointarray.h b/src/kernel/tqpointarray.h
index 386910f15..d72d24720 100644
--- a/src/kernel/tqpointarray.h
+++ b/src/kernel/tqpointarray.h
@@ -58,7 +58,7 @@ public:
~TQPointArray() {}
TQPointArray( int size ) : TQMemArray<TQPoint>( size ) {}
TQPointArray( const TQPointArray &a ) : TQMemArray<TQPoint>( a ) {}
- TQPointArray( const TQRect &r, bool closed=FALSE );
+ TQPointArray( const TQRect &r, bool closed=false );
TQPointArray( int nPoints, const TQCOORD *points );
TQPointArray &operator=( const TQPointArray &a )
diff --git a/src/kernel/tqpolygonscanner.cpp b/src/kernel/tqpolygonscanner.cpp
index 2df631730..54a075c66 100644
--- a/src/kernel/tqpolygonscanner.cpp
+++ b/src/kernel/tqpolygonscanner.cpp
@@ -432,7 +432,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
tmpSLLBlock =
(ScanLineListBlock *)malloc(sizeof(ScanLineListBlock));
if (!tmpSLLBlock)
- return FALSE;
+ return false;
(*SLLBlock)->next = tmpSLLBlock;
tmpSLLBlock->next = 0;
*SLLBlock = tmpSLLBlock;
@@ -462,7 +462,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE,
prev->next = ETE;
else
pSLL->edgelist = ETE;
- return TRUE;
+ return true;
}
/*
@@ -525,7 +525,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
int dy;
- if (count < 2) return TRUE;
+ if (count < 2) return true;
/*
* initialize the Active Edge Table
@@ -584,7 +584,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock))
{
miFreeStorage(pSLLBlock->next);
- return FALSE;
+ return false;
}
ET->ymax = TQMAX(ET->ymax, PrevPt->y);
@@ -594,7 +594,7 @@ miCreateETandAET(int count, DDXPointPtr pts, EdgeTable *ET,
PrevPt = CurrPt;
}
- return TRUE;
+ return true;
}
/*
@@ -729,13 +729,13 @@ miInsertionSort(EdgeTableEntry *AET)
*/
void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints)
{
- scan( pa, winding, index, npoints, TRUE );
+ scan( pa, winding, index, npoints, true );
}
/*!
\overload
- If \a stitchable is FALSE, the right and bottom edges of the
+ If \a stitchable is false, the right and bottom edges of the
polygon are included. This causes adjacent polygons to overlap.
*/
void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int npoints, bool stitchable)
@@ -748,7 +748,7 @@ void TQPolygonScanner::scan(const TQPointArray& pa, bool winding, int index, int
Calls processSpans() for all scanlines of the polygon defined by
\a npoints starting at \a index in \a pa.
- If \a winding is TRUE, the Winding algorithm rather than the
+ If \a winding is true, the Winding algorithm rather than the
Odd-Even rule is used.
The \a edges is any bitwise combination of:
diff --git a/src/kernel/tqprinter.cpp b/src/kernel/tqprinter.cpp
index eaaa3854f..67f11b48e 100644
--- a/src/kernel/tqprinter.cpp
+++ b/src/kernel/tqprinter.cpp
@@ -71,8 +71,8 @@
printer to provide (in dpi).
\i setFullPage() tells TQPrinter whether you want to deal with the
full page or just with the part the printer can draw on. The
- default is FALSE, so that by default you should be able to paint
- on (0,0). If TRUE the origin of the coordinate system will be in
+ default is false, so that by default you should be able to paint
+ on (0,0). If true the origin of the coordinate system will be in
the top left corner of the paper and most probably the printer
will not be able to paint something there due to it's physical
margins.
@@ -210,7 +210,7 @@
TQPrinter::setFullPage(), to determine the printable area (see
TQPaintDeviceMetrics).
- The defined sizes (with setFullPage(TRUE)) are:
+ The defined sizes (with setFullPage(true)) are:
\value A0 841 x 1189 mm This value is not supported on windows.
\value A1 594 x 841 mm This value is not supported on windows.
@@ -245,7 +245,7 @@
\value Custom
\value NPageSize (internal)
- With setFullPage(FALSE) (the default), the metrics will be a bit
+ With setFullPage(false) (the default), the metrics will be a bit
smaller; how much depends on the printer in use.
*/
@@ -342,9 +342,9 @@
/*!
\fn bool TQPrinter::outputToFile() const
- Returns TRUE if the output should be written to a file, or FALSE
+ Returns true if the output should be written to a file, or false
if the output should be sent directly to the printer. The default
- setting is FALSE.
+ setting is false.
This function is currently only supported under X11 and Mac OS X.
@@ -355,8 +355,8 @@
Specifies whether the output should be written to a file or sent
directly to the printer.
- Will output to a file if \a enable is TRUE, or will output
- directly to the printer if \a enable is FALSE.
+ Will output to a file if \a enable is true, or will output
+ directly to the printer if \a enable is false.
This function is currently only supported under X11 and Mac OS X.
@@ -388,8 +388,8 @@ void TQPrinter::setOutputToFile( bool enable )
Sets the name of the output file to \a fileName.
Setting a null or empty name (0 or "") disables output to a file,
- i.e. calls setOutputToFile(FALSE). Setting a non-empty name
- enables output to a file, i.e. calls setOutputToFile(TRUE).
+ i.e. calls setOutputToFile(false). Setting a non-empty name
+ enables output to a file, i.e. calls setOutputToFile(true).
This function is currently only supported under X11.
@@ -745,8 +745,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- Returns TRUE if the application should provide the user with the
- option of choosing a collated printout; otherwise returns FALSE.
+ Returns true if the application should provide the user with the
+ option of choosing a collated printout; otherwise returns false.
Collation means that each page is printed in order, i.e. print the
first page, then the second page, then the third page and so on, and
@@ -763,9 +763,9 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- If \a enable is TRUE (the default) the user is given the choice of
+ If \a enable is true (the default) the user is given the choice of
whether to print out multiple copies collated in the print dialog.
- If \a enable is FALSE, then collateCopies() will be ignored.
+ If \a enable is false, then collateCopies() will be ignored.
Collation means that each page is printed in order, i.e. print the
first page, then the second page, then the third page and so on, and
@@ -782,8 +782,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
- Returns TRUE if collation is turned on when multiple copies is selected.
- Returns FALSE if it is turned off when multiple copies is selected.
+ Returns true if collation is turned on when multiple copies is selected.
+ Returns false if it is turned off when multiple copies is selected.
\sa collateCopiesEnabled() setCollateCopiesEnabled() setCollateCopies()
*/
@@ -792,8 +792,8 @@ void TQPrinter::setMinMax( int minPage, int maxPage )
\internal
Sets the default value for collation checkbox when the print dialog appears.
- If \a on is TRUE, it will enable setCollateCopiesEnabled().
- The default value is FALSE. This value will be changed by what the
+ If \a on is true, it will enable setCollateCopiesEnabled().
+ The default value is false. This value will be changed by what the
user presses in the print dialog.
\sa collateCopiesEnabled() setCollateCopiesEnabled() collateCopies()
@@ -862,16 +862,16 @@ void TQPrinter::setPrinterSelectionOption( const TQString & option )
/*!
Sets TQPrinter to have the origin of the coordinate system at the
- top-left corner of the paper if \a fp is TRUE, or where it thinks
- the top-left corner of the printable area is if \a fp is FALSE.
+ top-left corner of the paper if \a fp is true, or where it thinks
+ the top-left corner of the printable area is if \a fp is false.
- The default is FALSE. You can (probably) print on (0,0), and
+ The default is false. You can (probably) print on (0,0), and
TQPaintDeviceMetrics will report something smaller than the size
indicated by PageSize. (Note that TQPrinter may be wrong on Unix
systems - it does not have perfect knowledge of the physical
printer.)
- If you set \a fp to TRUE, TQPaintDeviceMetrics will report the
+ If you set \a fp to true, TQPaintDeviceMetrics will report the
exact same size as indicated by \c PageSize, but you cannot print
on all of that - you must take care of the output margins
yourself.
@@ -886,8 +886,8 @@ void TQPrinter::setFullPage( bool fp )
/*!
- Returns TRUE if the origin of the printer's coordinate system is
- at the corner of the sheet and FALSE if it is at the edge of the
+ Returns true if the origin of the printer's coordinate system is
+ at the corner of the sheet and false if it is at the edge of the
printable area.
See setFullPage() for details and caveats.
@@ -920,7 +920,7 @@ bool TQPrinter::fullPage() const
void TQPrinter::setResolution( int dpi )
{
res = dpi;
- res_set = TRUE;
+ res_set = true;
}
@@ -976,11 +976,11 @@ void TQPrinter::setPrintRange( PrintRange range )
if( range != AllPages ) {
if( range == Selection
&& !isOptionEnabled( PrintSelection ) ) {
- setOptionEnabled( PrintSelection, TRUE );
+ setOptionEnabled( PrintSelection, true );
}
else if( range == PageRange
&& !isOptionEnabled( PrintPageRange ) ) {
- setOptionEnabled( PrintPageRange, TRUE );
+ setOptionEnabled( PrintPageRange, true );
}
}
d->printRange = range;
@@ -999,7 +999,7 @@ TQPrinter::PrintRange TQPrinter::printRange() const
/*!
Enables the printer option with the identifier \a option if \a
- enable is TRUE, and disables option \a option if \a enable is FALSE.
+ enable is true, and disables option \a option if \a enable is false.
\sa isOptionEnabled()
*/
@@ -1015,8 +1015,8 @@ void TQPrinter::setOptionEnabled( PrinterOption option, bool enable )
}
/*!
- Returns TRUE if the printer option with identifier \a option is enabled;
- otherwise returns FALSE.
+ Returns true if the printer option with identifier \a option is enabled;
+ otherwise returns false.
\sa setOptionEnabled()
*/
diff --git a/src/kernel/tqprinter_unix.cpp b/src/kernel/tqprinter_unix.cpp
index e5bacff9c..e9caedc3d 100644
--- a/src/kernel/tqprinter_unix.cpp
+++ b/src/kernel/tqprinter_unix.cpp
@@ -121,8 +121,8 @@ TQPrinter::TQPrinter( PrinterMode m )
printer_name = getenv("PRINTER");
from_pg = to_pg = min_pg = max_pg = 0;
state = PST_IDLE;
- output_file = FALSE;
- to_edge = FALSE;
+ output_file = false;
+ to_edge = false;
paper_source = OnlyOne;
switch ( m ) {
case ScreenResolution:
@@ -137,10 +137,10 @@ TQPrinter::TQPrinter( PrinterMode m )
}
d = new TQPrinterUnixPrivate;
- D->marginsSpecified = FALSE;
+ D->marginsSpecified = false;
d->printerOptions = 0;
- setOptionEnabled( PrintToFile, TRUE );
- setOptionEnabled( PrintPageRange, TRUE );
+ setOptionEnabled( PrintToFile, true );
+ setOptionEnabled( PrintPageRange, true );
setPrintRange( AllPages );
}
@@ -161,21 +161,21 @@ TQPrinter::~TQPrinter()
/*!
- Advances to a new page on the printer. Returns TRUE if successful;
- otherwise returns FALSE.
+ Advances to a new page on the printer. Returns true if successful;
+ otherwise returns false.
*/
bool TQPrinter::newPage()
{
if ( state == PST_ACTIVE && pdrv )
return ((TQPSPrinter*)pdrv)->cmd( TQPSPrinter::NewPage, 0, 0 );
- return FALSE;
+ return false;
}
/*!
- Aborts the print job. Returns TRUE if successful; otherwise
- returns FALSE.
+ Aborts the print job. Returns true if successful; otherwise
+ returns false.
\sa aborted()
*/
@@ -195,8 +195,8 @@ bool TQPrinter::abort()
}
/*!
- Returns TRUE if the print job was aborted; otherwise returns
- FALSE.
+ Returns true if the print job was aborted; otherwise returns
+ false.
\sa abort()
*/
@@ -240,7 +240,7 @@ static void deleteGlobalPrinterDefaults()
user to specify which printer they wish to use and what settings
it should have.
- Returns TRUE if the user pressed "OK" to print, or FALSE if the
+ Returns true if the user pressed "OK" to print, or false if the
user canceled the operation.
*/
@@ -249,7 +249,7 @@ bool TQPrinter::setup( TQWidget * parent )
#ifndef TQT_NO_PRINTDIALOG
bool result = TQPrintDialog::getPrinterSetup( this, parent );
#else
- bool result = FALSE;
+ bool result = false;
#endif
if ( result ) {
if ( !globalPrinterDefaults ) {
@@ -329,7 +329,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
if ( pipe( fds ) != 0 ) {
tqWarning( "TQPSPrinter: could not open pipe to print" );
state = PST_ERROR;
- return FALSE;
+ return false;
}
// ### shouldn't we use TQProcess here????
@@ -453,7 +453,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
// ignore it? I don't know
}
} else {
- bool r = FALSE;
+ bool r = false;
if ( state == PST_ACTIVE && pdrv ) {
r = ((TQPSPrinter*)pdrv)->cmd( c, paint, p );
if ( c == PdcEnd ) {
@@ -469,7 +469,7 @@ bool TQPrinter::cmd( int c, TQPainter *paint, TQPDevCmdParam *p )
state = PST_IDLE;
return r;
}
- return TRUE;
+ return true;
}
@@ -593,12 +593,12 @@ int TQPrinter::metric( int m ) const
margin of the printer. On Unix, this is a best-effort guess, not
based on perfect knowledge.
- If you have called setFullPage( TRUE ), margins().width() may be
+ If you have called setFullPage( true ), margins().width() may be
treated as the smallest sane left margin you can use, and
margins().height() as the smallest sane top margin you can
use.
- If you have called setFullPage( FALSE ) (this is the default),
+ If you have called setFullPage( false ) (this is the default),
margins() is automatically subtracted from the pageSize() by
TQPrinter.
@@ -622,10 +622,10 @@ TQSize TQPrinter::margins() const
printer. On Unix, this is a best-effort guess, not based on
perfect knowledge.
- If you have called setFullPage( TRUE ), the four values specify
+ If you have called setFullPage( true ), the four values specify
the smallest sane margins you can use.
- If you have called setFullPage( FALSE ) (this is the default),
+ If you have called setFullPage( false ) (this is the default),
the margins are automatically subtracted from the pageSize() by
TQPrinter.
@@ -660,7 +660,7 @@ void TQPrinter::setMargins( uint top, uint left, uint bottom, uint right )
D->leftMargin = left;
D->bottomMargin = bottom;
D->rightMargin = right;
- D->marginsSpecified = TRUE;
+ D->marginsSpecified = true;
}
#endif
diff --git a/src/kernel/tqprocess.cpp b/src/kernel/tqprocess.cpp
index b43c12b4a..58b0bdbaf 100644
--- a/src/kernel/tqprocess.cpp
+++ b/src/kernel/tqprocess.cpp
@@ -225,9 +225,9 @@
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -244,9 +244,9 @@ TQProcess::TQProcess( TQObject *parent, const char *name )
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( const TQString& arg0, TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -266,9 +266,9 @@ TQProcess::TQProcess( const TQString& arg0, TQObject *parent, const char *name )
\sa setArguments() addArgument() start()
*/
TQProcess::TQProcess( const TQStringList& args, TQObject *parent, const char *name )
- : TQObject( parent, name ), ioRedirection( FALSE ), notifyOnExit( FALSE ),
- wroteToStdinConnected( FALSE ),
- readStdoutCalled( FALSE ), readStderrCalled( FALSE ),
+ : TQObject( parent, name ), ioRedirection( false ), notifyOnExit( false ),
+ wroteToStdinConnected( false ),
+ readStdoutCalled( false ), readStderrCalled( false ),
comms( Stdin|Stdout|Stderr )
{
init();
@@ -408,8 +408,8 @@ void TQProcess::setCommunication( int commFlags )
}
/*!
- Returns TRUE if the process has exited normally; otherwise returns
- FALSE. This implies that this function returns FALSE if the
+ Returns true if the process has exited normally; otherwise returns
+ false. This implies that this function returns false if the
process is still running.
\sa isRunning() exitStatus() processExited()
@@ -418,7 +418,7 @@ bool TQProcess::normalExit() const
{
// isRunning() has the side effect that it determines the exit status!
if ( isRunning() )
- return FALSE;
+ return false;
else
return exitNormal;
}
@@ -428,7 +428,7 @@ bool TQProcess::normalExit() const
still running. This function returns immediately and does not wait
until the process is finished.
- If normalExit() is FALSE (e.g. if the program was killed or
+ If normalExit() is false (e.g. if the program was killed or
crashed), this function returns 0, so you should check the return
value of normalExit() before relying on this value.
@@ -459,9 +459,9 @@ TQByteArray TQProcess::readStdout()
if ( readStdoutCalled ) {
return TQByteArray();
}
- readStdoutCalled = TRUE;
+ readStdoutCalled = true;
TQMembuf *buf = membufStdout();
- readStdoutCalled = FALSE;
+ readStdoutCalled = false;
return buf->readAll();
}
@@ -481,9 +481,9 @@ TQByteArray TQProcess::readStderr()
if ( readStderrCalled ) {
return TQByteArray();
}
- readStderrCalled = TRUE;
+ readStderrCalled = true;
TQMembuf *buf = membufStderr();
- readStderrCalled = FALSE;
+ readStderrCalled = false;
return buf->readAll();
}
@@ -491,7 +491,7 @@ TQByteArray TQProcess::readStderr()
/*!
Reads a line of text from standard output, excluding any trailing
newline or carriage return characters, and returns it. Returns
- TQString::null if canReadLineStdout() returns FALSE.
+ TQString::null if canReadLineStdout() returns false.
By default, the text is interpreted to be in Latin-1 encoding. If you need
other codecs, you can set a different codec with
@@ -527,7 +527,7 @@ TQString TQProcess::readLineStdout()
/*!
Reads a line of text from standard error, excluding any trailing
newline or carriage return characters and returns it. Returns
- TQString::null if canReadLineStderr() returns FALSE.
+ TQString::null if canReadLineStderr() returns false.
By default, the text is interpreted to be in Latin-1 encoding. If you need
other codecs, you can set a different codec with
@@ -591,8 +591,8 @@ TQString TQProcess::readLineStderr()
settings for the environment variable \c LD_LIBRARY_PATH, then
this variable is inherited from the starting process.
- Returns TRUE if the process could be started; otherwise returns
- FALSE.
+ Returns true if the process could be started; otherwise returns
+ false.
Note that you should not use the slots writeToStdin() and
closeStdin() on processes started with launch(), since the result
@@ -628,10 +628,10 @@ bool TQProcess::launch( const TQByteArray& buf, TQStringList *env )
closeStdin();
emit launchFinished();
}
- return TRUE;
+ return true;
} else {
emit launchFinished();
- return FALSE;
+ return false;
}
}
@@ -652,10 +652,10 @@ bool TQProcess::launch( const TQString& buf, TQStringList *env )
closeStdin();
emit launchFinished();
}
- return TRUE;
+ return true;
} else {
emit launchFinished();
- return FALSE;
+ return false;
}
}
@@ -755,23 +755,23 @@ void TQProcess::connectNotify( const char * signal )
qstrcmp( signal, TQ_SIGNAL(readyReadStderr()) )==0
) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set ioRedirection to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set ioRedirection to true" );
#endif
- setIoRedirection( TRUE );
+ setIoRedirection( true );
return;
}
if ( !notifyOnExit && qstrcmp( signal, TQ_SIGNAL(processExited()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set notifyOnExit to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set notifyOnExit to true" );
#endif
- setNotifyOnExit( TRUE );
+ setNotifyOnExit( true );
return;
}
if ( !wroteToStdinConnected && qstrcmp( signal, TQ_SIGNAL(wroteToStdin()) )==0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::connectNotify(): set wroteToStdinConnected to TRUE" );
+ tqDebug( "TQProcess::connectNotify(): set wroteToStdinConnected to true" );
#endif
- setWroteStdinConnected( TRUE );
+ setWroteStdinConnected( true );
return;
}
}
@@ -785,21 +785,21 @@ void TQProcess::disconnectNotify( const char * )
receivers( TQ_SIGNAL(readyReadStderr()) ) ==0
) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set ioRedirection to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set ioRedirection to false" );
#endif
- setIoRedirection( FALSE );
+ setIoRedirection( false );
}
if ( notifyOnExit && receivers( TQ_SIGNAL(processExited()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set notifyOnExit to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set notifyOnExit to false" );
#endif
- setNotifyOnExit( FALSE );
+ setNotifyOnExit( false );
}
if ( wroteToStdinConnected && receivers( TQ_SIGNAL(wroteToStdin()) ) == 0 ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::disconnectNotify(): set wroteToStdinConnected to FALSE" );
+ tqDebug( "TQProcess::disconnectNotify(): set wroteToStdinConnected to false" );
#endif
- setWroteStdinConnected( FALSE );
+ setWroteStdinConnected( false );
}
}
diff --git a/src/kernel/tqprocess_unix.cpp b/src/kernel/tqprocess_unix.cpp
index 606d1fd28..e481c92c3 100644
--- a/src/kernel/tqprocess_unix.cpp
+++ b/src/kernel/tqprocess_unix.cpp
@@ -147,11 +147,11 @@ public:
#endif
if ( process ) {
if ( process->d->notifierStdin )
- process->d->notifierStdin->setEnabled( FALSE );
+ process->d->notifierStdin->setEnabled( false );
if ( process->d->notifierStdout )
- process->d->notifierStdout->setEnabled( FALSE );
+ process->d->notifierStdout->setEnabled( false );
if ( process->d->notifierStderr )
- process->d->notifierStderr->setEnabled( FALSE );
+ process->d->notifierStderr->setEnabled( false );
process->d->proc = 0;
}
if( socketStdin )
@@ -225,11 +225,11 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
int socketOptions = 1;
setsockopt(tmpSocket, SOL_SOCKET, SO_REUSEADDR, &socketOptions, sizeof(int));
- bool found = FALSE;
+ bool found = false;
for (int socketIP = 2000; (socketIP < 2500) && !(found); socketIP++) {
ipAddr.sin_port = htons(socketIP);
if (bind(tmpSocket, (struct sockaddr *)&ipAddr, sizeof(ipAddr)))
- found = TRUE;
+ found = true;
}
if (listen(tmpSocket, 5)) { BAILOUT };
@@ -259,7 +259,7 @@ int qnx6SocketPairReplacement (int socketFD[2]) {
TQProcessManager::TQProcessManager() : sn(0)
{
procList = new TQPtrList<TQProc>;
- procList->setAutoDelete( TRUE );
+ procList->setAutoDelete( true );
// The SIGCHLD handler writes to a socket to tell the manager that
// something happened. This is done to get the processing in sync with the
@@ -279,7 +279,7 @@ TQProcessManager::TQProcessManager() : sn(0)
TQSocketNotifier::Read, this );
connect( sn, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(sigchldHnd(int)) );
- sn->setEnabled( TRUE );
+ sn->setEnabled( true );
}
// install a SIGCHLD handler and ignore SIGPIPE
@@ -375,7 +375,7 @@ void TQProcessManager::sigchldHnd( int fd )
if ( sn ) {
if ( !sn->isEnabled() )
return;
- sn->setEnabled( FALSE );
+ sn->setEnabled( false );
}
char tmp;
@@ -390,7 +390,7 @@ void TQProcessManager::sigchldHnd( int fd )
bool removeProc;
proc = procList->first();
while ( proc != 0 ) {
- removeProc = FALSE;
+ removeProc = false;
process = proc->process;
if ( process != 0 ) {
if ( !process->isRunning() ) {
@@ -434,19 +434,19 @@ void TQProcessManager::sigchldHnd( int fd )
::close( proc->socketStdout );
proc->socketStdout = 0;
if (process->d->notifierStdout)
- process->d->notifierStdout->setEnabled(FALSE);
+ process->d->notifierStdout->setEnabled(false);
}
if ( proc->socketStderr ) {
::close( proc->socketStderr );
proc->socketStderr = 0;
if (process->d->notifierStderr)
- process->d->notifierStderr->setEnabled(FALSE);
+ process->d->notifierStderr->setEnabled(false);
}
if ( process->notifyOnExit )
emit process->processExited();
- removeProc = TRUE;
+ removeProc = true;
}
} else {
int status;
@@ -454,7 +454,7 @@ void TQProcessManager::sigchldHnd( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcessManager::sigchldHnd() (PID: %d): process exited (TQProcess not available)", proc->pid );
#endif
- removeProc = TRUE;
+ removeProc = true;
}
}
if ( removeProc ) {
@@ -466,7 +466,7 @@ void TQProcessManager::sigchldHnd( int fd )
}
}
if ( sn )
- sn->setEnabled( TRUE );
+ sn->setEnabled( true );
}
#include "tqprocess_unix.moc"
@@ -490,8 +490,8 @@ TQProcessPrivate::TQProcessPrivate()
notifierStdout = 0;
notifierStderr = 0;
- exitValuesCalculated = FALSE;
- socketReadCalled = FALSE;
+ exitValuesCalculated = false;
+ socketReadCalled = false;
proc = 0;
}
@@ -582,7 +582,7 @@ void TQProcess::init()
{
d = new TQProcessPrivate();
exitStat = 0;
- exitNormal = FALSE;
+ exitNormal = false;
}
/*
@@ -594,7 +594,7 @@ void TQProcess::reset()
delete d;
d = new TQProcessPrivate();
exitStat = 0;
- exitNormal = FALSE;
+ exitNormal = false;
d->bufStdout.clear();
d->bufStderr.clear();
}
@@ -684,8 +684,8 @@ TQProcess::~TQProcess()
this variable is inherited from the starting process; under
Windows the same applies for the environment variable \c PATH.
- Returns TRUE if the process could be started; otherwise returns
- FALSE.
+ Returns true if the process could be started; otherwise returns
+ false.
You can write data to the process's standard input with
writeToStdin(). You can close standard input with closeStdin() and
@@ -718,7 +718,7 @@ bool TQProcess::start( TQStringList *env )
#else
if ( (comms & Stdin) && qnx6SocketPairReplacement(sStdin) == -1 ) {
#endif
- return FALSE;
+ return false;
}
#ifndef Q_OS_QNX6
if ( (comms & Stderr) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStderr ) == -1 ) {
@@ -729,7 +729,7 @@ bool TQProcess::start( TQStringList *env )
::close( sStdin[0] );
::close( sStdin[1] );
}
- return FALSE;
+ return false;
}
#ifndef Q_OS_QNX6
if ( (comms & Stdout) && ::socketpair( AF_UNIX, SOCK_STREAM, 0, sStdout ) == -1 ) {
@@ -744,7 +744,7 @@ bool TQProcess::start( TQStringList *env )
::close( sStderr[0] );
::close( sStderr[1] );
}
- return FALSE;
+ return false;
}
// the following pipe is only used to determine if the process could be
@@ -948,7 +948,7 @@ bool TQProcess::start( TQStringList *env )
this, TQ_SLOT(socketWrite(int)) );
// setup notifiers for the sockets
if ( !d->stdinBuf.isEmpty() ) {
- d->notifierStdin->setEnabled( TRUE );
+ d->notifierStdin->setEnabled( true );
}
}
if ( comms & Stdout ) {
@@ -958,7 +958,7 @@ bool TQProcess::start( TQStringList *env )
connect( d->notifierStdout, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(socketRead(int)) );
if ( ioRedirection )
- d->notifierStdout->setEnabled( TRUE );
+ d->notifierStdout->setEnabled( true );
}
if ( comms & Stderr ) {
::close( sStderr[1] );
@@ -967,13 +967,13 @@ bool TQProcess::start( TQStringList *env )
connect( d->notifierStderr, TQ_SIGNAL(activated(int)),
this, TQ_SLOT(socketRead(int)) );
if ( ioRedirection )
- d->notifierStderr->setEnabled( TRUE );
+ d->notifierStderr->setEnabled( true );
}
// cleanup and return
delete[] arglistQ;
delete[] arglist;
- return TRUE;
+ return true;
error:
#if defined(QT_QPROCESS_DEBUG)
@@ -997,7 +997,7 @@ error:
::close( fd[1] );
delete[] arglistQ;
delete[] arglist;
- return FALSE;
+ return false;
}
@@ -1050,7 +1050,7 @@ void TQProcess::kill() const
}
/*!
- Returns TRUE if the process is running; otherwise returns FALSE.
+ Returns true if the process is running; otherwise returns false.
\sa normalExit() exitStatus() processExited()
*/
@@ -1058,12 +1058,12 @@ bool TQProcess::isRunning() const
{
if ( d->exitValuesCalculated ) {
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning(): FALSE (already computed)" );
+ tqDebug( "TQProcess::isRunning(): false (already computed)" );
#endif
- return FALSE;
+ return false;
}
if ( d->proc == 0 )
- return FALSE;
+ return false;
int status;
if ( ::waitpid( d->proc->pid, &status, WNOHANG ) == d->proc->pid ) {
// compute the exit values
@@ -1072,7 +1072,7 @@ bool TQProcess::isRunning() const
if ( exitNormal ) {
that->exitStat = (char)WEXITSTATUS( status );
}
- d->exitValuesCalculated = TRUE;
+ d->exitValuesCalculated = true;
// On heavy processing, the socket notifier for the sigchild might not
// have found time to fire yet.
@@ -1088,19 +1088,19 @@ bool TQProcess::isRunning() const
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning() (PID: %d): FALSE", d->proc->pid );
+ tqDebug( "TQProcess::isRunning() (PID: %d): false", d->proc->pid );
#endif
- return FALSE;
+ return false;
}
#if defined(QT_QPROCESS_DEBUG)
- tqDebug( "TQProcess::isRunning() (PID: %d): TRUE", d->proc->pid );
+ tqDebug( "TQProcess::isRunning() (PID: %d): true", d->proc->pid );
#endif
- return TRUE;
+ return true;
}
/*!
- Returns TRUE if it's possible to read an entire line of text from
- standard output at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ standard output at this time; otherwise returns false.
\sa readLineStdout() canReadLineStderr()
*/
@@ -1114,8 +1114,8 @@ bool TQProcess::canReadLineStdout() const
}
/*!
- Returns TRUE if it's possible to read an entire line of text from
- standard error at this time; otherwise returns FALSE.
+ Returns true if it's possible to read an entire line of text from
+ standard error at this time; otherwise returns false.
\sa readLineStderr() canReadLineStdout()
*/
@@ -1154,7 +1154,7 @@ void TQProcess::writeToStdin( const TQByteArray& buf )
#endif
d->stdinBuf.enqueue( new TQByteArray(buf) );
if ( d->notifierStdin != 0 )
- d->notifierStdin->setEnabled( TRUE );
+ d->notifierStdin->setEnabled( true );
}
@@ -1239,7 +1239,7 @@ void TQProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): stdout (%d) closed", fd );
#endif
- d->notifierStdout->setEnabled( FALSE );
+ d->notifierStdout->setEnabled( false );
delete d->notifierStdout;
d->notifierStdout = 0;
::close( d->proc->socketStdout );
@@ -1249,7 +1249,7 @@ void TQProcess::socketRead( int fd )
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): stderr (%d) closed", fd );
#endif
- d->notifierStderr->setEnabled( FALSE );
+ d->notifierStderr->setEnabled( false );
delete d->notifierStderr;
d->notifierStderr = 0;
::close( d->proc->socketStderr );
@@ -1284,7 +1284,7 @@ void TQProcess::socketRead( int fd )
}
}
- d->socketReadCalled = TRUE;
+ d->socketReadCalled = true;
if ( fd == d->proc->socketStdout ) {
#if defined(QT_QPROCESS_DEBUG)
tqDebug( "TQProcess::socketRead(): %d bytes read from stdout (%d)",
@@ -1298,7 +1298,7 @@ void TQProcess::socketRead( int fd )
#endif
emit readyReadStderr();
}
- d->socketReadCalled = FALSE;
+ d->socketReadCalled = false;
}
@@ -1310,7 +1310,7 @@ void TQProcess::socketWrite( int fd )
{
while ( fd == d->proc->socketStdin && d->proc->socketStdin != 0 ) {
if ( d->stdinBuf.isEmpty() ) {
- d->notifierStdin->setEnabled( FALSE );
+ d->notifierStdin->setEnabled( false );
return;
}
ssize_t ret = ::write( fd,
@@ -1362,14 +1362,14 @@ void TQProcess::setIoRedirection( bool value )
ioRedirection = value;
if ( ioRedirection ) {
if ( d->notifierStdout )
- d->notifierStdout->setEnabled( TRUE );
+ d->notifierStdout->setEnabled( true );
if ( d->notifierStderr )
- d->notifierStderr->setEnabled( TRUE );
+ d->notifierStderr->setEnabled( true );
} else {
if ( d->notifierStdout )
- d->notifierStdout->setEnabled( FALSE );
+ d->notifierStdout->setEnabled( false );
if ( d->notifierStderr )
- d->notifierStderr->setEnabled( FALSE );
+ d->notifierStderr->setEnabled( false );
}
}
diff --git a/src/kernel/tqpsprinter.cpp b/src/kernel/tqpsprinter.cpp
index bc283807c..4ab9404c6 100644
--- a/src/kernel/tqpsprinter.cpp
+++ b/src/kernel/tqpsprinter.cpp
@@ -103,8 +103,8 @@
extern bool tqt_has_xft;
#endif
-static bool qt_gen_epsf = FALSE;
-static bool embedFonts = TRUE;
+static bool qt_gen_epsf = false;
+static bool embedFonts = true;
TQ_EXPORT void tqt_generate_epsf( bool b )
{
@@ -1370,7 +1370,7 @@ public:
void setFont( const TQFont &, int script );
void drawImage( TQPainter *, float x, float y, float w, float h, const TQImage &img, const TQImage &mask );
void initPage( TQPainter *paint );
- void flushPage( bool last = FALSE );
+ void flushPage( bool last = false );
TQPrinter *printer;
int pageCount;
@@ -1449,12 +1449,12 @@ public:
virtual unsigned short unicode_for_glyph(int glyphindex) { return glyphindex; }
virtual unsigned short glyph_for_unicode(unsigned short unicode) { return unicode; }
unsigned short insertIntoSubset( unsigned short unicode );
- virtual bool embedded() { return FALSE; }
+ virtual bool embedded() { return false; }
bool operator == ( const TQPSPrinterFontPrivate &other ) {
return other.psname == psname;
}
- inline void setSymbol() { symbol = TRUE; }
+ inline void setSymbol() { symbol = true; }
protected:
TQString psname;
@@ -1579,7 +1579,7 @@ static void appendReplacements( TQStringList &list, const psfont * const * repla
}
}
-static TQStringList makePSFontNameList( const TQFontEngine *fe, const TQString &psname = TQString::null, bool useNameForLookup = FALSE )
+static TQStringList makePSFontNameList( const TQFontEngine *fe, const TQString &psname = TQString::null, bool useNameForLookup = false )
{
int i;
int type;
@@ -1643,9 +1643,9 @@ static inline float pointSize( const TQFont &f, float scale )
TQPSPrinterFontPrivate::TQPSPrinterFontPrivate()
{
- global_dict = FALSE;
- downloaded = FALSE;
- symbol = FALSE;
+ global_dict = false;
+ downloaded = false;
+ symbol = false;
// map 0 to .notdef
subset.insert( 0, 0 );
subsetCount = 1;
@@ -1722,9 +1722,9 @@ static inline const char * toInt( int i )
if ( i == 0 ) {
intVal[--pos] = '0';
} else {
- bool neg = FALSE;
+ bool neg = false;
if ( i < 0 ) {
- neg = TRUE;
+ neg = true;
i = -i;
}
while ( i ) {
@@ -1800,15 +1800,15 @@ unsigned short TQPSPrinterFontPrivate::mapUnicode( unsigned short unicode )
TQMap<unsigned short, unsigned short>::iterator res;
res = subset.find( unicode );
unsigned short offset = 0;
- bool found = FALSE;
+ bool found = false;
if ( res != subset.end() ) {
- found = TRUE;
+ found = true;
} else {
if ( downloaded ) {
res = page_subset.find( unicode );
offset = (subsetCount/256 + 1) * 256;
if ( res != page_subset.end() )
- found = TRUE;
+ found = true;
}
}
if ( !found ) {
@@ -2117,7 +2117,7 @@ public:
const TQString &text, TQPSPrinterPrivate *d, TQPainter *paint);
// virtual ~TQPSPrinterFontTTF();
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
TQMemArray<ushort> uni2glyph; // to speed up lookups
@@ -2274,7 +2274,7 @@ static const char * const Apple_CharStrings[]={
TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
{
data = d;
- defective = FALSE;
+ defective = false;
BYTE *ptr;
@@ -2303,7 +2303,7 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
/* Load the "head" table and extract information from it. */
ptr = getTable("head");
if ( !ptr ) {
- defective = TRUE;
+ defective = true;
return;
}
MfrRevision = getFixed( ptr + 4 ); /* font revision number */
@@ -2319,12 +2319,12 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
indexToLocFormat = getSHORT( ptr + 50 ); /* size of 'loca' data */
if(indexToLocFormat != 0 && indexToLocFormat != 1) {
tqWarning("TrueType font is unusable because indexToLocFormat != 0");
- defective = TRUE;
+ defective = true;
return;
}
if( getSHORT(ptr+52) != 0 ) {
tqWarning("TrueType font is unusable because glyphDataFormat != 0");
- defective = TRUE;
+ defective = true;
return;
}
@@ -2339,7 +2339,7 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
BYTE* table_ptr = getTable("name"); /* pointer to table */
if ( !table_ptr ) {
- defective = TRUE;
+ defective = true;
tqDebug("couldn't find name table" );
return;
}
@@ -2395,13 +2395,13 @@ TQPSPrinterFontTTF::TQPSPrinterFontTTF(const TQFontEngine *f, TQByteArray& d)
tqWarning("TrueType font does not have a format 2.0 'post' table");
tqWarning("post format is %d.%d",post_format.whole,post_format.fraction);
// Sivan Feb 2001: no longer defective.
- // defective = TRUE;
+ // defective = true;
}
}
#endif
BYTE *maxp = getTable("maxp");
if ( !maxp ) {
- defective = TRUE;
+ defective = true;
tqDebug("no maxp table in font");
return;
}
@@ -2509,7 +2509,7 @@ void TQPSPrinterFontTTF::download(TQTextStream& s,bool global)
if ( !global )
subsetDict = &page_subset;
- downloaded = TRUE;
+ downloaded = true;
if (defective) {
s << "% Font ";
@@ -2684,8 +2684,8 @@ void TQPSPrinterFontTTF::download(TQTextStream& s,bool global)
bool glyphset[65536];
for(int c=0; c < 65536; c++)
- glyphset[c] = FALSE;
- glyphset[0] = TRUE; // always output .notdef
+ glyphset[c] = false;
+ glyphset[0] = true; // always output .notdef
TQMap<unsigned short, unsigned short>::iterator it;
for( it = subsetDict->begin(); it != subsetDict->end(); ++it ) {
@@ -2896,7 +2896,7 @@ void TQPSPrinterFontTTF::uni2glyphSetup()
ULONG offset = 0;
int map = -1;
- bool symbol = TRUE;
+ bool symbol = true;
for (i=0; i<nmaps; i++) {
USHORT platform = getUSHORT(cmap+pos); pos+=2;
USHORT encoding = getUSHORT(cmap+pos); pos+=2;
@@ -2904,7 +2904,7 @@ void TQPSPrinterFontTTF::uni2glyphSetup()
//fprintf(stderr,"[%d] plat %d enc %d\n",i,platform,encoding);
if (platform == 3 && encoding == 1) {
map = i;
- symbol = FALSE;
+ symbol = false;
break; // unicode
}
if (platform == 3 && encoding == 0) {
@@ -3019,7 +3019,7 @@ void TQPSPrinterFontTTF::sfnts_pputBYTE(BYTE n,TQTextStream& s,
s << "<";
string_len = 0;
line_len++;
- in_string = TRUE;
+ in_string = true;
}
s << hexdigits[ n / 16 ] ;
@@ -3080,7 +3080,7 @@ void TQPSPrinterFontTTF::sfnts_end_string(TQTextStream& s,
line_len++;
}
- in_string=FALSE;
+ in_string=false;
}
/*
@@ -3143,7 +3143,7 @@ void TQPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset,
*/
if( length % 2 ) {
tqWarning("TrueType font contains a 'glyf' table without 2 byte padding");
- defective = TRUE;
+ defective = true;
return;
}
@@ -3166,7 +3166,7 @@ void TQPSPrinterFontTTF::sfnts_glyf_table(ULONG oldoffset,
/* Look for unexplainable descrepancies between sizes */
if( total != correct_total_length ) {
tqWarning("TQPSPrinterFontTTF::sfnts_glyf_table: total != correct_total_length");
- defective = TRUE;
+ defective = true;
return;
}
}
@@ -3239,7 +3239,7 @@ void TQPSPrinterFontTTF::download_sfnts(TQTextStream& s)
s << "/sfnts[<";
- bool in_string=TRUE;
+ bool in_string=true;
int string_len=0;
int line_len=8;
@@ -3295,7 +3295,7 @@ void TQPSPrinterFontTTF::download_sfnts(TQTextStream& s)
} else { // other tables should not exceed 64K (not always true; Sivan)
if( tables[x].length > 65535 ) {
tqWarning("TrueType font has a table which is too long");
- defective = TRUE;
+ defective = true;
return;
}
@@ -3762,7 +3762,7 @@ void TQPSPrinterFontTTF::subsetGlyph(int charindex,bool* glyphset)
USHORT glyphIndex;
charproc_data cd;
- glyphset[charindex] = TRUE;
+ glyphset[charindex] = true;
//printf("subsetting %s ==> ",glyphName(charindex).latin1());
/* Get a pointer to the data. */
@@ -3786,7 +3786,7 @@ void TQPSPrinterFontTTF::subsetGlyph(int charindex,bool* glyphset)
glyphIndex = getUSHORT(glyph); /* read the glyphindex word */
glyph += 2;
- glyphset[ glyphIndex ] = TRUE;
+ glyphset[ glyphIndex ] = true;
subsetGlyph( glyphIndex, glyphset );
//printf("subset contains: %d %s ",glyphIndex, glyphName(glyphIndex).latin1());
@@ -4036,7 +4036,7 @@ class TQPSPrinterFontPFA
public:
TQPSPrinterFontPFA(const TQFontEngine *f, TQByteArray& data);
virtual void download(TQTextStream& s, bool global);
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
};
@@ -4092,7 +4092,7 @@ class TQPSPrinterFontPFB
public:
TQPSPrinterFontPFB(const TQFontEngine *f, TQByteArray& data);
virtual void download(TQTextStream& s, bool global);
- virtual bool embedded() { return TRUE; }
+ virtual bool embedded() { return true; }
private:
TQByteArray data;
};
@@ -4235,7 +4235,7 @@ void TQPSPrinterFontNotFound::download(TQTextStream& s, bool)
s << "% No embeddable font for ";
s << psname;
s << " found\n";
- TQPSPrinterFontPrivate::download(s, TRUE);
+ TQPSPrinterFontPrivate::download(s, true);
}
#ifndef TQT_NO_TEXTCODEC
@@ -4855,13 +4855,13 @@ TQPSPrinterFontSimplifiedChinese::TQPSPrinterFontSimplifiedChinese(const TQFontE
codec = TQTextCodec::codecForMib( 114 ); // GB18030
int type = getPsFontType( f );
TQString family = f->fontDef.family.lower();
- if( family.contains("kai",FALSE) ) {
+ if( family.contains("kai",false) ) {
psname = KaiGBK2K[type].psname;
appendReplacements( replacementList, KaiGBK2KReplacements, type );
- } else if( family.contains("fangsong",FALSE) ) {
+ } else if( family.contains("fangsong",false) ) {
psname = FangSongGBK2K[type].psname;
appendReplacements( replacementList, FangSongGBK2KReplacements, type );
- } else if( family.contains("hei",FALSE) ) {
+ } else if( family.contains("hei",false) ) {
psname = HeiGBK2K[type].psname;
appendReplacements( replacementList, HeiGBK2KReplacements, type );
} else {
@@ -4916,7 +4916,7 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
xfontname = makePSFontName( engine );
#if defined( TQ_WS_X11 )
- bool xlfd = FALSE;
+ bool xlfd = false;
//tqDebug("engine = %p name=%s, script=%d", engine, engine ? engine->name() : "(null)", script);
#ifndef TQT_NO_XFTFREETYPE
@@ -4944,7 +4944,7 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
xfontname = rawName.mid(0,index);
if ( xfontname.endsWith( "*" ) )
xfontname.truncate( xfontname.length() - 1 );
- xlfd = TRUE;
+ xlfd = true;
}
}
#endif // TQ_WS_X11
@@ -5139,17 +5139,17 @@ TQPSPrinterFont::TQPSPrinterFont(const TQFont &f, int script, TQPSPrinterPrivate
TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
- : buffer( 0 ), outDevice( 0 ), fd( filedes ), pageBuffer( 0 ), fonts(27, FALSE), fontBuffer(0), savedImage( 0 ),
- dirtypen( FALSE ), dirtybrush( FALSE ), dirtyBkColor( FALSE ), bkMode( TQt::TransparentMode ), dirtyBkMode( FALSE ),
+ : buffer( 0 ), outDevice( 0 ), fd( filedes ), pageBuffer( 0 ), fonts(27, false), fontBuffer(0), savedImage( 0 ),
+ dirtypen( false ), dirtybrush( false ), dirtyBkColor( false ), bkMode( TQt::TransparentMode ), dirtyBkMode( false ),
#ifndef TQT_NO_TEXTCODEC
currentFontCodec( 0 ),
#endif
fm( TQFont() ), textY( 0 )
{
printer = prt;
- headerFontNames.setAutoDelete( TRUE );
- pageFontNames.setAutoDelete( TRUE );
- fonts.setAutoDelete( TRUE );
+ headerFontNames.setAutoDelete( true );
+ pageFontNames.setAutoDelete( true );
+ fonts.setAutoDelete( true );
currentFontFile = 0;
scale = 1.;
scriptUsed = -1;
@@ -5157,18 +5157,18 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
#ifdef TQ_WS_X11
// append tqsettings fontpath
TQSettings settings;
- embedFonts = settings.readBoolEntry( "/qt/embedFonts", TRUE );
+ embedFonts = settings.readBoolEntry( "/qt/embedFonts", true );
int npaths;
char** font_path;
font_path = XGetFontPath( tqt_xdisplay(), &npaths);
- bool xfsconfig_read = FALSE;
+ bool xfsconfig_read = false;
for (int i=0; i<npaths; i++) {
// If we're using xfs, append font paths from /etc/X11/fs/config
// can't hurt, and chances are we'll get all fonts that way.
if (((font_path[i])[0] != '/') && !xfsconfig_read) {
// We're using xfs -> read its config
- bool finished = FALSE;
+ bool finished = false;
TQFile f("/etc/X11/fs/config");
if ( !f.exists() )
f.setName("/usr/X11R6/lib/X11/fs/config");
@@ -5182,23 +5182,23 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
fs=fs.stripWhiteSpace();
if (fs.left(9)=="catalogue" && fs.contains('=')) {
fs=fs.mid(fs.find('=')+1).stripWhiteSpace();
- bool end = FALSE;
+ bool end = false;
while( f.status()==IO_Ok && !end ) {
if ( fs[int(fs.length())-1] == ',' )
fs = fs.left(fs.length()-1);
else
- end = TRUE;
+ end = true;
if (fs[0] != '#' && !fs.contains(":unscaled"))
fontpath += fs;
f.readLine(fs, 1024);
fs=fs.stripWhiteSpace();
}
- finished = TRUE;
+ finished = true;
}
}
f.close();
}
- xfsconfig_read = TRUE;
+ xfsconfig_read = true;
} else if(!strstr(font_path[i], ":unscaled")) {
// Fonts paths marked :unscaled are always bitmapped fonts
// -> we can as well ignore them now and save time
@@ -5212,7 +5212,7 @@ TQPSPrinterPrivate::TQPSPrinterPrivate( TQPrinter *prt, int filedes )
if ( !fp.isEmpty() )
fontpath += fp;
#else
- embedFonts = FALSE;
+ embedFonts = false;
#endif
}
@@ -5560,13 +5560,13 @@ static TQByteArray compress( const TQImage & image, bool gray ) {
4 pixels back (an overlap of 6). */
if ( start + length > index && length > 0 ) {
int d = index-start;
- int equal = TRUE;
+ int equal = true;
while( equal && start + length > index &&
start > d && start-d >= index-tableSize ) {
int i = 0;
while( equal && i < d ) {
if( pixel[start+i] != pixel[start+i-d] )
- equal = FALSE;
+ equal = false;
i++;
}
if ( equal )
@@ -5825,7 +5825,7 @@ void TQPSPrinterPrivate::drawImage( TQPainter *paint, float x, float y, float w,
const char *bits;
if ( !mask.isNull() ) {
- out = ::compress( mask, TRUE );
+ out = ::compress( mask, true );
size = (width+7)/8*height;
pageStream << "/mask " << size << " string uc\n";
ps_r7( pageStream, out, out.size() );
@@ -5882,7 +5882,7 @@ void TQPSPrinterPrivate::matrixSetup( TQPainter *paint )
<< p.x() << ' ' << p.y()
<< "]ST\n";
#endif
- dirtyMatrix = FALSE;
+ dirtyMatrix = false;
}
void TQPSPrinterPrivate::orientationSetup()
@@ -6016,7 +6016,7 @@ void TQPSPrinterPrivate::emitHeader( bool finished )
<< pageCount << "\n";
TQDictIterator<TQPSPrinterFontPrivate> it(fonts);
while (it.current()) {
- it.current()->download(outStream,TRUE); // true means its global
+ it.current()->download(outStream,true); // true means its global
++it;
}
outStream.writeRawBytes( fontBuffer->buffer().data(),
@@ -6064,8 +6064,8 @@ void TQPSPrinterPrivate::resetDrawingTools( TQPainter *paint )
}
}
- dirtypen = TRUE;
- dirtybrush = TRUE;
+ dirtypen = true;
+ dirtybrush = true;
if ( paint->hasViewXForm() || paint->hasWorldXForm() )
matrixSetup( paint );
@@ -6104,7 +6104,7 @@ void TQPSPrinterPrivate::clippingSetup( TQPainter *paint )
boundingBox = boundingBox.unite( rects[i] );
}
pageStream << "CLEND\n"; // end clipping
- firstClipOnPage = FALSE;
+ firstClipOnPage = false;
} else {
if ( !firstClipOnPage ) // no need to turn off if first on page
setClippingOff( paint );
@@ -6115,7 +6115,7 @@ void TQPSPrinterPrivate::clippingSetup( TQPainter *paint )
if ( !boundingBox.isValid() )
boundingBox.setRect( 0, 0, m.width(), m.height() );
}
- dirtyClipping = FALSE;
+ dirtyClipping = false;
}
void TQPSPrinterPrivate::initPage(TQPainter *paint)
@@ -6144,12 +6144,12 @@ void TQPSPrinterPrivate::initPage(TQPainter *paint)
delete savedImage;
savedImage = 0;
textY = 0;
- dirtyClipping = TRUE;
- firstClipOnPage = TRUE;
+ dirtyClipping = true;
+ firstClipOnPage = true;
resetDrawingTools( paint );
- dirtyNewPage = FALSE;
+ dirtyNewPage = false;
pageFontNumber = headerFontNumber;
}
@@ -6176,7 +6176,7 @@ void TQPSPrinterPrivate::flushPage( bool last )
// we have already downloaded the header. Maybe we have page fonts here
TQDictIterator<TQPSPrinterFontPrivate> it(fonts);
while (it.current()) {
- it.current()->download( outStream, FALSE ); // FALSE means its for the page only
+ it.current()->download( outStream, false ); // false means its for the page only
++it;
}
}
@@ -6256,17 +6256,17 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
d->fontStream.setDevice( d->fontBuffer );
d->headerFontNumber = 0;
d->pageCount = 1; // initialize state
- d->dirtyMatrix = TRUE;
- d->dirtyClipping = TRUE;
- d->dirtyNewPage = TRUE;
- d->firstClipOnPage = TRUE;
+ d->dirtyMatrix = true;
+ d->dirtyClipping = true;
+ d->dirtyNewPage = true;
+ d->firstClipOnPage = true;
d->boundingBox = TQRect( 0, 0, -1, -1 );
d->fontsUsed = TQString::fromLatin1("");
TQPaintDeviceMetrics m( d->printer );
d->scale = 72. / ((float) m.logicalDpiY());
- return TRUE;
+ return true;
}
if ( c == PdcEnd ) { // painting done
@@ -6274,14 +6274,14 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
// we're writing to lp/lpr through a pipe, we don't want to crash with SIGPIPE
// if lp/lpr dies
- ignoreSigPipe(TRUE);
- d->flushPage( TRUE );
+ ignoreSigPipe(true);
+ d->flushPage( true );
d->outStream << "%%Trailer\n";
if ( pageCountAtEnd )
d->outStream << "%%Pages: " << d->pageCount - 1 << "\n" <<
wrapDSC( "%%DocumentFonts: " + d->fontsUsed );
d->outStream << "%%EOF\n";
- ignoreSigPipe(FALSE);
+ ignoreSigPipe(false);
d->outStream.unsetDevice();
if ( d->outDevice )
@@ -6295,7 +6295,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
if ( c >= PdcDrawFirst && c <= PdcDrawLast ) {
if ( !paint )
- return FALSE; // sanity
+ return false; // sanity
if ( d->dirtyNewPage )
d->initPage( paint );
if ( d->dirtyMatrix )
@@ -6314,7 +6314,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
<< ' ' << color( d->cpen.color(), d->printer )
<< psCap( d->cpen.capStyle() )
<< psJoin( d->cpen.joinStyle() ) << "PE\n";
- d->dirtypen = FALSE;
+ d->dirtypen = false;
}
if ( d->dirtybrush ) {
// we special-case for nobrush and solid white, since
@@ -6327,18 +6327,18 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
else
d->pageStream << (int)d->cbrush.style() << ' '
<< color( d->cbrush.color(), d->printer ) << "BR\n";
- d->dirtybrush = FALSE;
+ d->dirtybrush = false;
}
if ( d->dirtyBkColor ) {
d->pageStream << color( d->bkColor, d->printer ) << "BC\n";
- d->dirtyBkColor = FALSE;
+ d->dirtyBkColor = false;
}
if ( d->dirtyBkMode ) {
if ( d->bkMode == TQt::TransparentMode )
d->pageStream << "/OMo false d\n";
else
d->pageStream << "/OMo true d\n";
- d->dirtyBkMode = FALSE;
+ d->dirtyBkMode = false;
}
}
@@ -6442,15 +6442,15 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
break;
case PdcDrawText2:
// we use drawTextItem instead
- return TRUE;
+ return true;
case PdcDrawText2Formatted:
- return TRUE;
+ return true;
case PdcDrawTextItem: {
const TQTextItem *ti = p[1].textItem;
TQScriptItem &si = ti->engine->items[ti->item];
int len = ti->engine->length( ti->item );
if ( si.isSpace || si.isObject )
- return FALSE;
+ return false;
if ( d->currentSet != d->currentUsed || d->scriptUsed != si.analysis.script || !d->currentFontFile ) {
d->currentUsed = d->currentSet;
@@ -6459,7 +6459,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
if( d->currentFontFile ) // better not crash in case somethig goes wrong.
d->currentFontFile->drawText( d->pageStream, *p[0].point, ti->engine, ti->item,
ti->engine->string.mid( si.position, len ), d, paint);
- return FALSE;
+ return false;
}
case PdcDrawPixmap: {
if ( p[1].pixmap->isNull() )
@@ -6490,7 +6490,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
{
if ( d->bkColor != *(p[0].color) ) {
d->bkColor = *(p[0].color);
- d->dirtyBkColor = TRUE;
+ d->dirtyBkColor = true;
}
break;
}
@@ -6498,7 +6498,7 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
{
if ( d->bkMode != p[0].ival ) {
d->bkMode = (TQt::BGMode) p[0].ival;
- d->dirtyBkMode = TRUE;
+ d->dirtyBkMode = true;
}
break;
}
@@ -6514,12 +6514,12 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
d->currentSet = *(p[0].font);
d->fm = paint->fontMetrics();
// turn these off - they confuse the 'avoid font change' logic
- d->currentSet.setUnderline( FALSE );
- d->currentSet.setStrikeOut( FALSE );
+ d->currentSet.setUnderline( false );
+ d->currentSet.setStrikeOut( false );
break;
case PdcSetPen:
if ( d->cpen != *(p[0].pen) ) {
- d->dirtypen = TRUE;
+ d->dirtypen = true;
d->cpen = *(p[0].pen);
}
break;
@@ -6528,16 +6528,16 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
#if defined(CHECK_RANGE)
tqWarning( "TQPrinter: Pixmap brush not supported" );
#endif
- return FALSE;
+ return false;
}
if ( d->cbrush != *(p[0].brush) ) {
- d->dirtybrush = TRUE;
+ d->dirtybrush = true;
d->cbrush = *(p[0].brush);
}
break;
case PdcSetTabStops:
case PdcSetTabArray:
- return FALSE;
+ return false;
case PdcSetUnit:
break;
case PdcSetVXform:
@@ -6546,29 +6546,29 @@ bool TQPSPrinter::cmd( int c , TQPainter *paint, TQPDevCmdParam *p )
case PdcSetWXform:
case PdcSetWMatrix:
case PdcRestoreWMatrix:
- d->dirtyMatrix = TRUE;
+ d->dirtyMatrix = true;
break;
case PdcSetClip:
- d->dirtyClipping = TRUE;
+ d->dirtyClipping = true;
break;
case PdcSetClipRegion:
- d->dirtyClipping = TRUE;
+ d->dirtyClipping = true;
break;
case NewPage:
// we're writing to lp/lpr through a pipe, we don't want to crash with SIGPIPE
// if lp/lpr dies
- ignoreSigPipe(TRUE);
+ ignoreSigPipe(true);
d->flushPage();
- ignoreSigPipe(FALSE);
+ ignoreSigPipe(false);
- d->dirtyNewPage = TRUE;
+ d->dirtyNewPage = true;
break;
case AbortPrinting:
break;
default:
break;
}
- return TRUE;
+ return true;
}
#endif // TQT_NO_PRINTER
diff --git a/src/kernel/tqrect.cpp b/src/kernel/tqrect.cpp
index 0af8a22cb..6a03918e8 100644
--- a/src/kernel/tqrect.cpp
+++ b/src/kernel/tqrect.cpp
@@ -145,8 +145,8 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isNull() const
- Returns TRUE if the rectangle is a null rectangle; otherwise
- returns FALSE.
+ Returns true if the rectangle is a null rectangle; otherwise
+ returns false.
A null rectangle has both the width and the height set to 0, that
is right() == left() - 1 and bottom() == top() - 1.
@@ -164,7 +164,7 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isEmpty() const
- Returns TRUE if the rectangle is empty; otherwise returns FALSE.
+ Returns true if the rectangle is empty; otherwise returns false.
An empty rectangle has a left() \> right() or top() \> bottom().
@@ -176,7 +176,7 @@ TQRect::TQRect( const TQPoint &topLeft, const TQSize &size )
/*!
\fn bool TQRect::isValid() const
- Returns TRUE if the rectangle is valid; otherwise returns FALSE.
+ Returns true if the rectangle is valid; otherwise returns false.
A valid rectangle has a left() \<= right() and top() \<= bottom().
@@ -734,10 +734,10 @@ void TQRect::setSize( const TQSize &s )
}
/*!
- Returns TRUE if the point \a p is inside or on the edge of the
- rectangle; otherwise returns FALSE.
+ Returns true if the point \a p is inside or on the edge of the
+ rectangle; otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if \a p is
+ If \a proper is true, this function returns true only if \a p is
inside (not on the edge).
*/
@@ -754,27 +754,27 @@ bool TQRect::contains( const TQPoint &p, bool proper ) const
/*!
\overload bool TQRect::contains( int x, int y, bool proper ) const
- Returns TRUE if the point \a x, \a y is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the point \a x, \a y is inside this rectangle;
+ otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if the point
+ If \a proper is true, this function returns true only if the point
is entirely inside (not on the edge).
*/
/*!
\overload bool TQRect::contains( int x, int y ) const
- Returns TRUE if the point \a x, \a y is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the point \a x, \a y is inside this rectangle;
+ otherwise returns false.
*/
/*!
\overload
- Returns TRUE if the rectangle \a r is inside this rectangle;
- otherwise returns FALSE.
+ Returns true if the rectangle \a r is inside this rectangle;
+ otherwise returns false.
- If \a proper is TRUE, this function returns TRUE only if \a r is
+ If \a proper is true, this function returns true only if \a r is
entirely inside (not on the edge).
\sa unite(), intersect(), intersects()
@@ -873,9 +873,9 @@ TQRect TQRect::intersect( const TQRect &r ) const
}
/*!
- Returns TRUE if this rectangle intersects with rectangle \a r
+ Returns true if this rectangle intersects with rectangle \a r
(there is at least one pixel that is within both rectangles);
- otherwise returns FALSE.
+ otherwise returns false.
\sa intersect(), contains()
*/
@@ -890,7 +890,7 @@ bool TQRect::intersects( const TQRect &r ) const
/*!
\relates TQRect
- Returns TRUE if \a r1 and \a r2 are equal; otherwise returns FALSE.
+ Returns true if \a r1 and \a r2 are equal; otherwise returns false.
*/
bool operator==( const TQRect &r1, const TQRect &r2 )
@@ -901,7 +901,7 @@ bool operator==( const TQRect &r1, const TQRect &r2 )
/*!
\relates TQRect
- Returns TRUE if \a r1 and \a r2 are different; otherwise returns FALSE.
+ Returns true if \a r1 and \a r2 are different; otherwise returns false.
*/
bool operator!=( const TQRect &r1, const TQRect &r2 )
diff --git a/src/kernel/tqrect.h b/src/kernel/tqrect.h
index 1b66b1834..dffdc26a5 100644
--- a/src/kernel/tqrect.h
+++ b/src/kernel/tqrect.h
@@ -123,10 +123,10 @@ public:
TQRect& operator|=(const TQRect &r);
TQRect& operator&=(const TQRect &r);
- bool contains( const TQPoint &p, bool proper=FALSE ) const;
+ bool contains( const TQPoint &p, bool proper=false ) const;
bool contains( int x, int y ) const; // inline methods, _don't_ merge these
bool contains( int x, int y, bool proper ) const;
- bool contains( const TQRect &r, bool proper=FALSE ) const;
+ bool contains( const TQRect &r, bool proper=false ) const;
TQRect unite( const TQRect &r ) const;
TQRect intersect( const TQRect &r ) const;
bool intersects( const TQRect &r ) const;
diff --git a/src/kernel/tqregion.h b/src/kernel/tqregion.h
index e8590cbdb..ff56ad665 100644
--- a/src/kernel/tqregion.h
+++ b/src/kernel/tqregion.h
@@ -58,7 +58,7 @@ public:
TQRegion();
TQRegion( int x, int y, int w, int h, RegionType = Rectangle );
TQRegion( const TQRect &, RegionType = Rectangle );
- TQRegion( const TQPointArray &, bool winding=FALSE );
+ TQRegion( const TQPointArray &, bool winding=false );
TQRegion( const TQRegion & );
TQRegion( const TQBitmap & );
~TQRegion();
@@ -101,7 +101,7 @@ public:
#elif defined(TQ_WS_X11)
Region handle() const { if(!data->rgn) updateX11Region(); return data->rgn; }
#elif defined(TQ_WS_MAC)
- RgnHandle handle(bool require_rgn=FALSE) const;
+ RgnHandle handle(bool require_rgn=false) const;
#endif
#ifndef TQT_NO_DATASTREAM
diff --git a/src/kernel/tqregion_x11.cpp b/src/kernel/tqregion_x11.cpp
index a42b0f11e..4866ff539 100644
--- a/src/kernel/tqregion_x11.cpp
+++ b/src/kernel/tqregion_x11.cpp
@@ -1324,13 +1324,13 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
{
int i;
- if( r1->numRects != r2->numRects ) return FALSE;
- else if( r1->numRects == 0 ) return TRUE;
+ if( r1->numRects != r2->numRects ) return false;
+ else if( r1->numRects == 0 ) return true;
else if ( r1->extents.left() != r2->extents.left() ||
r1->extents.right() != r2->extents.right() ||
r1->extents.top() != r2->extents.top() ||
r1->extents.bottom() != r2->extents.bottom() )
- return FALSE;
+ return false;
else {
TQRect *rr1 = r1->rects.data();
TQRect *rr2 = r2->rects.data();
@@ -1339,10 +1339,10 @@ static bool EqualRegion( TQRegionPrivate *r1, TQRegionPrivate *r2 )
rr1->right() != rr2->right() ||
rr1->top() != rr2->top() ||
rr1->bottom() != rr2->bottom() )
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
@@ -1350,15 +1350,15 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
int i;
if (pRegion->numRects == 0)
- return FALSE;
+ return false;
if (!pRegion->extents.contains(x, y))
- return FALSE;
+ return false;
for (i=0; i<pRegion->numRects; i++)
{
if (pRegion->rects[i].contains(x, y))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
static bool RectInRegion(TQRegionPrivate *region,
@@ -1374,10 +1374,10 @@ static bool RectInRegion(TQRegionPrivate *region,
if ((region->numRects == 0) || !EXTENTCHECK(&region->extents, prect))
return(RectangleOut);
- partOut = FALSE;
- partIn = FALSE;
+ partOut = false;
+ partIn = false;
- /* can stop when both partOut and partIn are TRUE, or we reach prect->y2 */
+ /* can stop when both partOut and partIn are true, or we reach prect->y2 */
for (pbox = region->rects.data(), pboxEnd = pbox + region->numRects;
pbox < pboxEnd;
pbox++)
@@ -1388,7 +1388,7 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->top() > ry)
{
- partOut = TRUE; /* missed part of rectangle above */
+ partOut = true; /* missed part of rectangle above */
if (partIn || (pbox->top() > prect->bottom()))
break;
ry = pbox->top(); /* x guaranteed to be == prect->x1 */
@@ -1399,14 +1399,14 @@ static bool RectInRegion(TQRegionPrivate *region,
if (pbox->left() > rx)
{
- partOut = TRUE; /* missed part of rectangle to left */
+ partOut = true; /* missed part of rectangle to left */
if (partIn)
break;
}
if (pbox->left() <= prect->right())
{
- partIn = TRUE; /* definitely overlap */
+ partIn = true; /* definitely overlap */
if (partOut)
break;
}
@@ -2166,7 +2166,7 @@ static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
}
reg->numRects = numRects;
- return(TRUE);
+ return(true);
}
/*
@@ -2193,7 +2193,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
EdgeTableEntry AET; /* header node for AET */
EdgeTableEntry *pETEs; /* EdgeTableEntries pool */
ScanLineListBlock SLLBlock; /* header for scanlinelist */
- int fixWAET = FALSE;
+ int fixWAET = false;
POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */
POINTBLOCK *tmpPtBlock;
int numFullPtBlocks = 0;
@@ -2325,7 +2325,7 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
*/
if (InsertionSort(&AET) || fixWAET) {
computeWAET(&AET);
- fixWAET = FALSE;
+ fixWAET = false;
}
}
}
@@ -2434,7 +2434,7 @@ TQRegion::TQRegion()
{
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2470,7 +2470,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
if ( r.isEmpty() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2478,7 +2478,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
if ( t == Rectangle ) { // rectangular region
@@ -2496,7 +2496,7 @@ TQRegion::TQRegion( const TQRect &r, RegionType t )
/*!
Constructs a polygon region from the point array \a a.
- If \a winding is TRUE, the polygon region is filled using the
+ If \a winding is true, the polygon region is filled using the
winding algorithm, otherwise the default even-odd fill algorithm
is used.
@@ -2509,7 +2509,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
if (a.size() > 2) {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = PolygonRegion( (TQPoint*)a.data(), a.size(),
@@ -2517,7 +2517,7 @@ TQRegion::TQRegion( const TQPointArray &a, bool winding )
} else {
if ( !empty_region ) {
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2552,7 +2552,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
if ( bm.isNull() ) {
if ( !empty_region ) { // avoid too many allocs
tqAddPostRoutine( cleanup_empty_region );
- empty_region = new TQRegion( TRUE );
+ empty_region = new TQRegion( true );
TQ_CHECK_PTR( empty_region );
}
data = empty_region->data;
@@ -2560,7 +2560,7 @@ TQRegion::TQRegion( const TQBitmap & bm )
} else {
data = new TQRegionData;
TQ_CHECK_PTR( data );
- data->is_null = FALSE;
+ data->is_null = false;
data->rgn = 0;
data->xrectangles = 0;
data->region = qt_bitmapToRegion(bm);
@@ -2618,8 +2618,8 @@ TQRegion TQRegion::copy() const
}
/*!
- Returns TRUE if the region is a null region; otherwise returns
- FALSE.
+ Returns true if the region is a null region; otherwise returns
+ false.
A null region is a region that has not been initialized. A null
region is always empty.
@@ -2634,7 +2634,7 @@ bool TQRegion::isNull() const
/*!
- Returns TRUE if the region is empty; otherwise returns FALSE. An
+ Returns true if the region is empty; otherwise returns false. An
empty region is a region that contains no points.
Example:
@@ -2642,16 +2642,16 @@ bool TQRegion::isNull() const
TQRegion r1( 10, 10, 20, 20 );
TQRegion r2( 40, 40, 20, 20 );
TQRegion r3;
- r1.isNull(); // FALSE
- r1.isEmpty(); // FALSE
- r3.isNull(); // TRUE
- r3.isEmpty(); // TRUE
+ r1.isNull(); // false
+ r1.isEmpty(); // false
+ r3.isNull(); // true
+ r3.isEmpty(); // true
r3 = r1.intersect( r2 ); // r3 = intersection of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // TRUE
+ r3.isNull(); // false
+ r3.isEmpty(); // true
r3 = r1.unite( r2 ); // r3 = union of r1 and r2
- r3.isNull(); // FALSE
- r3.isEmpty(); // FALSE
+ r3.isNull(); // false
+ r3.isEmpty(); // false
\endcode
\sa isNull()
@@ -2664,8 +2664,8 @@ bool TQRegion::isEmpty() const
/*!
- Returns TRUE if the region contains the point \a p; otherwise
- returns FALSE.
+ Returns true if the region contains the point \a p; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQPoint &p ) const
@@ -2676,8 +2676,8 @@ bool TQRegion::contains( const TQPoint &p ) const
/*!
\overload
- Returns TRUE if the region overlaps the rectangle \a r; otherwise
- returns FALSE.
+ Returns true if the region overlaps the rectangle \a r; otherwise
+ returns false.
*/
bool TQRegion::contains( const TQRect &r ) const
@@ -2715,7 +2715,7 @@ void TQRegion::translate( int dx, int dy )
TQRegion TQRegion::unite( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
UnionRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2730,7 +2730,7 @@ TQRegion TQRegion::unite( const TQRegion &r ) const
TQRegion TQRegion::intersect( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
IntersectRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2746,7 +2746,7 @@ TQRegion TQRegion::intersect( const TQRegion &r ) const
TQRegion TQRegion::subtract( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
SubtractRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2762,7 +2762,7 @@ TQRegion TQRegion::subtract( const TQRegion &r ) const
TQRegion TQRegion::eor( const TQRegion &r ) const
{
- TQRegion result( FALSE );
+ TQRegion result( false );
XorRegion( data->region, r.data->region, result.data->region );
return result;
}
@@ -2806,7 +2806,7 @@ TQMemArray<TQRect> TQRegion::rects() const
*/
void TQRegion::setRects( const TQRect *rects, int num )
{
- *this = TQRegion( FALSE );
+ *this = TQRegion( false );
if ( !rects || (num == 1 && rects->isEmpty()) )
num = 0;
@@ -2828,21 +2828,21 @@ void TQRegion::setRects( const TQRect *rects, int num )
}
/*!
- Returns TRUE if the region is equal to \a r; otherwise returns
- FALSE.
+ Returns true if the region is equal to \a r; otherwise returns
+ false.
*/
bool TQRegion::operator==( const TQRegion &r ) const
{
return data == r.data ?
- TRUE : EqualRegion( data->region, r.data->region );
+ true : EqualRegion( data->region, r.data->region );
}
/*!
\fn bool TQRegion::operator!=( const TQRegion &r ) const
- Returns TRUE if the region is different from \a r; otherwise
- returns FALSE.
+ Returns true if the region is different from \a r; otherwise
+ returns false.
*/
/*
diff --git a/src/kernel/tqrichtext.cpp b/src/kernel/tqrichtext.cpp
index 98fbc8f53..eddb23761 100644
--- a/src/kernel/tqrichtext.cpp
+++ b/src/kernel/tqrichtext.cpp
@@ -83,7 +83,7 @@ const int border_tolerance = 2;
static inline bool is_printer( TQPainter *p )
{
if ( !p || !p->device() )
- return FALSE;
+ return false;
return p->device()->devType() == TQInternal::Printer;
}
@@ -111,7 +111,7 @@ static inline int scale( int value, TQPainter *painter )
inline bool isBreakable( TQTextString *string, int pos )
{
if (string->at(pos).nobreak)
- return FALSE;
+ return false;
return (pos < string->length()-1 && string->at(pos+1).softBreak);
}
@@ -121,7 +121,7 @@ void TQTextCommandHistory::addCommand( TQTextCommand *cmd )
{
if ( current < (int)history.count() - 1 ) {
TQPtrList<TQTextCommand> commands;
- commands.setAutoDelete( FALSE );
+ commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) );
@@ -131,7 +131,7 @@ void TQTextCommandHistory::addCommand( TQTextCommand *cmd )
commands.append( cmd );
history.clear();
history = commands;
- history.setAutoDelete( TRUE );
+ history.setAutoDelete( true );
} else {
history.append( cmd );
}
@@ -254,7 +254,7 @@ TQTextCursor *TQTextDeleteCommand::unexecute( TQTextCursor *c )
cursor.setParagraph( s );
cursor.setIndex( index );
TQString str = TQTextString::toString( text );
- cursor.insert( str, TRUE, &text );
+ cursor.insert( str, true, &text );
if ( c )
*c = cursor;
cursor.setParagraph( s );
@@ -275,7 +275,7 @@ TQTextCursor *TQTextDeleteCommand::unexecute( TQTextCursor *c )
s = cursor.paragraph();
while ( s ) {
s->format();
- s->setChanged( TRUE );
+ s->setChanged( true );
if ( s == c->paragraph() )
break;
s = s->next();
@@ -429,7 +429,7 @@ TQTextCursor *TQTextStyleCommand::unexecute( TQTextCursor *c )
TQTextCursor::TQTextCursor( TQTextDocument *d )
: idx( 0 ), tmpX( -1 ), ox( 0 ), oy( 0 ),
- valid( TRUE )
+ valid( true )
{
para = d ? d->firstParagraph() : 0;
}
@@ -522,7 +522,7 @@ void TQTextCursor::invalidateNested()
void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting )
{
tmpX = -1;
- bool justInsert = TRUE;
+ bool justInsert = true;
TQString s( str );
#if defined(TQ_WS_WIN)
if ( checkNewLine ) {
@@ -539,7 +539,7 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
for ( int i = 0; i < (int)s.length(); ++i ) {
if ( formatting->at( i ).format() ) {
formatting->at( i ).format()->addRef();
- para->string()->setFormat( idx + i, formatting->at( i ).format(), TRUE );
+ para->string()->setFormat( idx + i, formatting->at( i ).format(), true );
}
}
}
@@ -562,7 +562,7 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
for ( int i = 0; i < len; ++i ) {
if ( formatting->at( i + lastIndex ).format() ) {
formatting->at( i + lastIndex ).format()->addRef();
- para->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), TRUE );
+ para->string()->setFormat( i + idx, formatting->at( i + lastIndex ).format(), true );
}
}
lastIndex += len;
@@ -570,15 +570,15 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
start = end; // next start is at the end of this line
idx += len; // increase the index of the cursor to the end of the inserted text
if ( s[end] == '\n' ) { // if at the end was a line break, break the line
- splitAndInsertEmptyParagraph( FALSE, TRUE );
+ splitAndInsertEmptyParagraph( false, true );
para->setEndState( -1 );
- para->prev()->format( -1, FALSE );
+ para->prev()->format( -1, false );
lastIndex++;
}
} while ( end < (int)s.length() );
- para->format( -1, FALSE );
+ para->format( -1, false );
int dy = para->rect().y() + para->rect().height() - y;
TQTextParagraph *p = para;
p->setParagId( p->prev() ? p->prev()->paragId() + 1 : 0 );
@@ -593,11 +593,11 @@ void TQTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<TQ
}
int h = para->rect().height();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
+ para->document()->nextDoubleBuffered = true;
fixCursorPosition();
}
@@ -688,7 +688,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
str = s;
if ( pos.y() >= r.y() && pos.y() <= r.y() + r.height() )
break;
- if ( loosePlacing == TRUE && !s->next() ) {
+ if ( loosePlacing && !s->next() ) {
#ifdef TQ_WS_MACX
pos.setX( s->rect().x() + s->rect().width() );
#endif
@@ -698,7 +698,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
}
if ( !s || !str )
- return FALSE;
+ return false;
s = str;
@@ -715,7 +715,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
cy = s->lineY( i );
ch = s->lineHeight( i );
if ( !chr )
- return FALSE;
+ return false;
if ( pos.y() <= y + cy + ch )
break;
}
@@ -731,7 +731,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
int cw;
int curpos = -1;
int dist = 10000000;
- bool inCustom = FALSE;
+ bool inCustom = false;
while ( i < nextLine ) {
chr = s->at(i);
int cpos = x + chr->x;
@@ -740,7 +740,7 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
if ( chr->isCustom() && chr->customItem()->isNested() ) {
if ( pos.x() >= cpos && pos.x() <= cpos + cw &&
pos.y() >= y + cy && pos.y() <= y + cy + chr->height() ) {
- inCustom = TRUE;
+ inCustom = true;
curpos = i;
break;
}
@@ -751,20 +751,20 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
cpos += cw;
int d = cpos - pos.x();
bool dm = d < 0 ? !chr->rightToLeft : chr->rightToLeft;
- if ( ( matchBetweenCharacters == TRUE && (TQABS( d ) < dist || (dist == d && dm == TRUE )) && para->string()->validCursorPosition( i ) ) ||
- ( matchBetweenCharacters == FALSE && ( d == 0 || dm == TRUE ) ) ) {
+ if ( ( matchBetweenCharacters && (TQABS( d ) < dist || (dist == d && dm)) && para->string()->validCursorPosition( i ) ) ||
+ ( !matchBetweenCharacters && ( d == 0 || dm ) ) ) {
dist = TQABS( d );
- if ( !link || ( pos.x() >= x + chr->x && ( loosePlacing == TRUE || pos.x() < cpos ) ) )
+ if ( !link || ( pos.x() >= x + chr->x && ( loosePlacing || pos.x() < cpos ) ) )
curpos = i;
}
}
i++;
}
if ( curpos == -1 ) {
- if ( loosePlacing == TRUE )
+ if ( loosePlacing )
curpos = s->length()-1;
else
- return FALSE;
+ return false;
}
setIndex( curpos );
@@ -773,26 +773,26 @@ bool TQTextCursor::place( const TQPoint &p, TQTextParagraph *s, bool link, bool
TQTextDocument *oldDoc = para->document();
gotoIntoNested( pos );
if ( oldDoc == para->document() )
- return TRUE;
+ return true;
TQPoint p( pos.x() - offsetX(), pos.y() - offsetY() );
if ( !place( p, document()->firstParagraph(), link ) )
pop();
}
#endif
- return TRUE;
+ return true;
}
bool TQTextCursor::processNesting( Operation op )
{
if ( !para->document() )
- return FALSE;
+ return false;
TQTextDocument* doc = para->document();
push();
ox = para->at( idx )->x;
int bl, y;
para->lineHeightOfChar( idx, &bl, &y );
oy = y + para->rect().y();
- bool ok = FALSE;
+ bool ok = false;
#ifndef TQT_NO_TEXTCUSTOMITEM
switch ( op ) {
@@ -800,7 +800,7 @@ bool TQTextCursor::processNesting( Operation op )
ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy );
break;
case EnterEnd:
- ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy, TRUE );
+ ok = para->at( idx )->customItem()->enter( this, doc, para, idx, ox, oy, true );
break;
case Next:
ok = para->at( idx )->customItem()->next( this, doc, para, idx, ox, oy );
@@ -1092,7 +1092,7 @@ void TQTextCursor::gotoPreviousWord( bool onlySpace )
gotoPreviousLetter();
tmpX = -1;
TQTextString *s = para->string();
- bool allowSame = FALSE;
+ bool allowSame = false;
if ( idx == ((int)s->length()-1) )
return;
for ( int i = idx; i >= 0; --i ) {
@@ -1103,7 +1103,7 @@ void TQTextCursor::gotoPreviousWord( bool onlySpace )
return;
}
if ( !allowSame && !is_seperator( s->at( i ).c, onlySpace ) )
- allowSame = TRUE;
+ allowSame = true;
}
idx = 0;
}
@@ -1112,7 +1112,7 @@ void TQTextCursor::gotoNextWord( bool onlySpace )
{
tmpX = -1;
TQTextString *s = para->string();
- bool allowSame = FALSE;
+ bool allowSame = false;
for ( int i = idx; i < (int)s->length(); ++i ) {
if ( !is_seperator( s->at( i ).c, onlySpace ) ) {
if ( !allowSame )
@@ -1121,7 +1121,7 @@ void TQTextCursor::gotoNextWord( bool onlySpace )
return;
}
if ( !allowSame && is_seperator( s->at( i ).c, onlySpace ) )
- allowSame = TRUE;
+ allowSame = true;
}
@@ -1170,7 +1170,7 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *n = para->next();
TQTextParagraph *s = para->document()->createParagraph( para->document(), para, n, updateIds );
if ( f )
- s->setFormat( 0, 1, f, TRUE );
+ s->setFormat( 0, 1, f, true );
s->copyParagData( para );
if ( ind ) {
int oi, ni;
@@ -1185,7 +1185,7 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *p = para->prev();
TQTextParagraph *s = para->document()->createParagraph( para->document(), p, para, updateIds );
if ( f )
- s->setFormat( 0, 1, f, TRUE );
+ s->setFormat( 0, 1, f, true );
s->copyParagData( para );
if ( ind ) {
s->indent();
@@ -1199,10 +1199,10 @@ void TQTextCursor::splitAndInsertEmptyParagraph( bool ind, bool updateIds )
TQTextParagraph *s = para->document()->createParagraph( para->document(), para, n, updateIds );
s->copyParagData( para );
s->remove( 0, 1 );
- s->append( str, TRUE );
+ s->append( str, true );
for ( uint i = 0; i < str.length(); ++i ) {
TQTextStringChar* tsc = para->at( idx + i );
- s->setFormat( i, 1, tsc->format(), TRUE );
+ s->setFormat( i, 1, tsc->format(), true );
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( tsc->isCustom() ) {
TQTextCustomItem * item = tsc->customItem();
@@ -1236,18 +1236,18 @@ bool TQTextCursor::remove()
int next = para->string()->nextCursorPosition( idx );
para->remove( idx, next-idx );
int h = para->rect().height();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
- return FALSE;
+ para->document()->nextDoubleBuffered = true;
+ return false;
} else if ( para->next() ) {
para->join( para->next() );
invalidateNested();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
/* needed to implement backspace the correct way */
@@ -1268,19 +1268,19 @@ bool TQTextCursor::removePreviousChar()
int h = para->rect().height();
// shouldn't be needed, just to make sure.
fixCursorPosition();
- para->format( -1, TRUE );
+ para->format( -1, true );
if ( h != para->rect().height() )
invalidateNested();
else if ( para->document() && para->document()->parent() )
- para->document()->nextDoubleBuffered = TRUE;
- return FALSE;
+ para->document()->nextDoubleBuffered = true;
+ return false;
} else if ( para->prev() ) {
para = para->prev();
para->join( para->next() );
invalidateNested();
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void TQTextCursor::indent()
@@ -1342,18 +1342,18 @@ TQTextDocument::TQTextDocument( TQTextDocument *p )
void TQTextDocument::init()
{
- oTextValid = TRUE;
- mightHaveCustomItems = FALSE;
+ oTextValid = true;
+ mightHaveCustomItems = false;
if ( par )
par->insertChild( this );
pProcessor = 0;
- useFC = TRUE;
+ useFC = true;
pFormatter = 0;
indenter = 0;
fParag = 0;
txtFormat = TQt::AutoText;
- preferRichText = FALSE;
- pages = FALSE;
+ preferRichText = false;
+ pages = false;
focusIndicator.parag = 0;
minw = 0;
wused = 0;
@@ -1367,15 +1367,15 @@ void TQTextDocument::init()
#endif
contxt = TQString::null;
- underlLinks = par ? par->underlLinks : TRUE;
+ underlLinks = par ? par->underlLinks : true;
backBrush = 0;
buf_pixmap = 0;
- nextDoubleBuffered = FALSE;
+ nextDoubleBuffered = false;
if ( par )
withoutDoubleBuffer = par->withoutDoubleBuffer;
else
- withoutDoubleBuffer = FALSE;
+ withoutDoubleBuffer = false;
lParag = fParag = createParagraph( this, 0, 0 );
@@ -1393,9 +1393,9 @@ void TQTextDocument::init()
selectionColors[ Standard ] = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Highlight );
- selectionText[ Standard ] = TRUE;
- selectionText[ IMSelectionText ] = TRUE;
- selectionText[ IMCompositionText ] = FALSE;
+ selectionText[ Standard ] = true;
+ selectionText[ IMSelectionText ] = true;
+ selectionText[ IMCompositionText ] = false;
commandHistory = new TQTextCommandHistory( 100 );
tStopWidth = formatCollection()->defaultFormat()->width( 'x' ) * 8;
}
@@ -1433,7 +1433,7 @@ void TQTextDocument::clear( bool createEmptyParag )
focusIndicator.parag = 0;
selections.clear();
oText = TQString::null;
- oTextValid = FALSE;
+ oTextValid = false;
}
int TQTextDocument::widthUsed() const
@@ -1485,14 +1485,14 @@ bool TQTextDocument::setMinimumWidth( int needed, int used, TQTextParagraph *p )
wused = TQMAX( wused, used );
wused = TQMAX( wused, minw );
cw = TQMAX( minw, cw );
- return TRUE;
+ return true;
}
void TQTextDocument::setPlainText( const TQString &text )
{
- preferRichText = FALSE;
+ preferRichText = false;
clear();
- oTextValid = TRUE;
+ oTextValid = true;
oText = text;
int lastNl = 0;
@@ -1576,33 +1576,33 @@ struct TQ_EXPORT TQTextDocumentTag {
if ( !textEditMode && curpar && curpar->length()>1 && curpar->at( curpar->length()-2)->c == TQChar_linesep ) \
curpar->remove( curpar->length()-2, 1 ); \
curpar = createParagraph( this, curpar, curpar->next() ); styles.append( vec ); vec = 0;} \
- hasNewPar = TRUE; \
- curpar->rtext = TRUE; \
+ hasNewPar = true; \
+ curpar->rtext = true; \
curpar->align = curtag.alignment; \
curpar->lstyle = curtag.liststyle; \
curpar->litem = ( curtag.style->displayMode() == TQStyleSheetItem::DisplayListItem ); \
curpar->str->setDirection( (TQChar::Direction)curtag.direction ); \
- space = TRUE; \
+ space = true; \
tabExpansionColumn = 0; \
delete vec; vec = new TQPtrVector<TQStyleSheetItem>( (uint)tags.count() + 1); \
int i = 0; \
for ( TQValueStack<TQTextDocumentTag>::Iterator it = tags.begin(); it != tags.end(); ++it ) \
vec->insert( i++, (*it).style ); \
vec->insert( i, curtag.style ); \
- }while(FALSE);
+ }while(false);
void TQTextDocument::setRichText( const TQString &text, const TQString &context, const TQTextFormat *initialFormat )
{
- preferRichText = TRUE;
+ preferRichText = true;
if ( !context.isEmpty() )
setContext( context );
clear();
fParag = lParag = createParagraph( this );
- oTextValid = TRUE;
+ oTextValid = true;
oText = text;
setRichTextInternal( text, 0, initialFormat );
- fParag->rtext = TRUE;
+ fParag->rtext = true;
}
void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cursor, const TQTextFormat *initialFormat )
@@ -1616,10 +1616,10 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( bodyText.isValid() )
initag.format.setColor( bodyText );
TQTextDocumentTag curtag = initag;
- bool space = TRUE;
- bool canMergeLi = FALSE;
+ bool space = true;
+ bool canMergeLi = false;
- bool textEditMode = FALSE;
+ bool textEditMode = false;
int tabExpansionColumn = 0;
const TQChar* doc = text.unicode();
@@ -1631,21 +1631,21 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
TQTextParagraph* stylesPar = curpar;
TQPtrVector<TQStyleSheetItem>* vec = 0;
TQPtrList< TQPtrVector<TQStyleSheetItem> > styles;
- styles.setAutoDelete( TRUE );
+ styles.setAutoDelete( true );
if ( cursor ) {
cursor->splitAndInsertEmptyParagraph();
TQTextCursor tmp = *cursor;
tmp.gotoPreviousLetter();
stylesPar = curpar = tmp.paragraph();
- hasNewPar = TRUE;
- textEditMode = TRUE;
+ hasNewPar = true;
+ textEditMode = true;
} else {
NEWPAR;
}
- // set rtext spacing to FALSE for the initial paragraph.
- curpar->rtext = FALSE;
+ // set rtext spacing to false for the initial paragraph.
+ curpar->rtext = false;
TQString wellKnownTags = "br hr wsp table qt body meta title";
@@ -1654,7 +1654,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( !hasPrefix( doc, length, pos+1, TQChar('/') ) ) {
// open tag
TQMap<TQString, TQString> attr;
- bool emptyTag = FALSE;
+ bool emptyTag = false;
TQString tagname = parseOpenTag(doc, length, pos, attr, emptyTag);
if ( tagname.isEmpty() )
continue; // nothing we could do with this, probably parse error
@@ -1678,7 +1678,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
p, and we do not want new blocks inside non-empty
lis. Plus we want to merge empty lis sometimes. */
if( nstyle->displayMode() == TQStyleSheetItem::DisplayListItem ) {
- canMergeLi = TRUE;
+ canMergeLi = true;
} else if ( nstyle->displayMode() == TQStyleSheetItem::DisplayBlock ) {
while ( curtag.style->name() == "p" ) {
if ( tags.isEmpty() )
@@ -1689,7 +1689,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( curtag.style->displayMode() == TQStyleSheetItem::DisplayListItem ) {
// we are in a li and a new block comes along
if ( nstyle->name() == "ul" || nstyle->name() == "ol" )
- hasNewPar = FALSE; // we want an empty li (like most browsers)
+ hasNewPar = false; // we want an empty li (like most browsers)
if ( !hasNewPar ) {
/* do not add new blocks inside
non-empty lis */
@@ -1703,7 +1703,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
comes along, merge them */
nstyle = curtag.style;
}
- canMergeLi = FALSE;
+ canMergeLi = false;
}
}
}
@@ -1711,25 +1711,25 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
#ifndef TQT_NO_TEXTCUSTOMITEM
TQTextCustomItem* custom = 0;
#else
- bool custom = FALSE;
+ bool custom = false;
#endif
// some well-known tags, some have a nstyle, some not
if ( wellKnownTags.find( tagname ) != -1 ) {
if ( tagname == "br" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
int index = TQMAX( curpar->length(),1) - 1;
TQTextFormat format = curtag.format.makeTextFormat( nstyle, attr, scaleFontsFactor );
curpar->append( TQChar_linesep );
curpar->setFormat( index, 1, &format );
hasNewPar = false;
} else if ( tagname == "hr" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
#ifndef TQT_NO_TEXTCUSTOMITEM
custom = sheet_->tag( tagname, attr, contxt, *factory_ , emptyTag, this );
#endif
} else if ( tagname == "table" ) {
- emptyTag = space = TRUE;
+ emptyTag = space = true;
#ifndef TQT_NO_TEXTCUSTOMITEM
TQTextFormat format = curtag.format.makeTextFormat( nstyle, attr, scaleFontsFactor );
curpar->setAlignment( curtag.alignment );
@@ -1785,7 +1785,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
// end qt- and body-tag handling
} else if ( tagname == "meta" ) {
if ( attr["name"] == "qrichtext" && attr["content"] == "1" )
- textEditMode = TRUE;
+ textEditMode = true;
} else if ( tagname == "title" ) {
TQString title;
while ( pos < length ) {
@@ -1821,7 +1821,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
anchorName = TQString::null;
}
registerCustomItem( custom, curpar );
- hasNewPar = FALSE;
+ hasNewPar = false;
#endif
} else if ( !emptyTag ) {
/* if we do nesting, push curtag on the stack,
@@ -1932,7 +1932,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( attr.contains( "style" ) ) {
TQString a = attr["style"];
- bool ok = TRUE;
+ bool ok = true;
for ( int s = 0; ok && s < a.contains(';')+1; s++ ) {
TQString style = a.section( ';', s, s );
if ( style.startsWith("margin-top:" ) && style.endsWith("px") )
@@ -1985,7 +1985,7 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
if ( needNewPar ) {
if ( textEditMode && (tagname == "p" || tagname == "div" ) ) // preserve empty paragraphs
- hasNewPar = FALSE;
+ hasNewPar = false;
NEWPAR;
}
}
@@ -2026,9 +2026,9 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
*/
if ( curtag.wsm == TQStyleSheetItem::WhiteSpaceNormal && s.length() > 4096 ) do {
if ( doc[l] == '\n' ) {
- hasNewPar = FALSE; // for a new paragraph ...
+ hasNewPar = false; // for a new paragraph ...
NEWPAR;
- hasNewPar = FALSE; // ... and make it non-reusable
+ hasNewPar = false; // ... and make it non-reusable
c = '\n'; // make sure we break below
break;
}
@@ -2049,17 +2049,17 @@ void TQTextDocument::setRichTextInternal( const TQString &text, TQTextCursor* cu
s += c;
}
if ( !s.isEmpty() && curtag.style->displayMode() != TQStyleSheetItem::DisplayNone ) {
- hasNewPar = FALSE;
+ hasNewPar = false;
int index = TQMAX( curpar->length(),1) - 1;
curpar->append( s );
if (curtag.wsm != TQStyleSheetItem::WhiteSpaceNormal) {
TQTextString *str = curpar->string();
for (uint i = index; i < index + s.length(); ++i)
- str->at(i).nobreak = TRUE;
+ str->at(i).nobreak = true;
}
TQTextFormat* f = formatCollection()->format( &curtag.format );
- curpar->setFormat( index, s.length(), f, FALSE ); // do not use collection because we have done that already
+ curpar->setFormat( index, s.length(), f, false ); // do not use collection because we have done that already
f->ref += s.length() -1; // that what friends are for...
if ( !curtag.anchorHref.isEmpty() ) {
for ( int i = 0; i < int(s.length()); i++ )
@@ -2113,7 +2113,7 @@ void TQTextDocument::setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleS
int i, mar;
TQStyleSheetItem* mainStyle = curStyle->size() ? (*curStyle)[curStyle->size()-1] : 0;
if ( mainStyle && mainStyle->displayMode() == TQStyleSheetItem::DisplayListItem )
- stylesPar->setListItem( TRUE );
+ stylesPar->setListItem( true );
int numLists = 0;
for ( i = 0; i < (int)curStyle->size(); ++i ) {
if ( (*curStyle)[ i ]->displayMode() == TQStyleSheetItem::DisplayBlock
@@ -2273,7 +2273,7 @@ TQString TQTextDocument::plainText() const
while ( p ) {
if ( !p->mightHaveCustomItems ) {
const TQTextString *ts = p->string();
- s = ts->toString(); // with FALSE we don't fix spaces (nbsp)
+ s = ts->toString(); // with false we don't fix spaces (nbsp)
} else {
for ( int i = 0; i < p->length() - 1; ++i ) {
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -2575,7 +2575,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
{
TQMap<int, TQTextDocumentSelection>::Iterator it = selections.find( id );
if ( it == selections.end() )
- return FALSE;
+ return false;
TQTextDocumentSelection &sel = *it;
TQTextCursor start = sel.startCursor;
@@ -2584,15 +2584,15 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
if ( start == end ) {
removeSelection( id );
setSelectionStart( id, cursor );
- return TRUE;
+ return true;
}
if ( sel.endCursor.paragraph() == end.paragraph() ) {
setSelectionEndHelper( id, sel, start, end );
- return TRUE;
+ return true;
}
- bool inSelection = FALSE;
+ bool inSelection = false;
TQTextCursor c( this );
TQTextCursor tmp = sel.startCursor;
if ( sel.swapped )
@@ -2601,32 +2601,32 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
TQTextCursor tmp2 = cursor;
tmp2.restoreState();
c.setParagraph( tmp.paragraph()->paragId() < tmp2.paragraph()->paragId() ? tmp.paragraph() : tmp2.paragraph() );
- bool hadStart = FALSE;
- bool hadEnd = FALSE;
- bool hadStartParag = FALSE;
- bool hadEndParag = FALSE;
- bool hadOldStart = FALSE;
- bool hadOldEnd = FALSE;
- bool leftSelection = FALSE;
- sel.swapped = FALSE;
+ bool hadStart = false;
+ bool hadEnd = false;
+ bool hadStartParag = false;
+ bool hadEndParag = false;
+ bool hadOldStart = false;
+ bool hadOldEnd = false;
+ bool leftSelection = false;
+ sel.swapped = false;
for ( ;; ) {
if ( c == start )
- hadStart = TRUE;
+ hadStart = true;
if ( c == end )
- hadEnd = TRUE;
+ hadEnd = true;
if ( c.paragraph() == start.paragraph() )
- hadStartParag = TRUE;
+ hadStartParag = true;
if ( c.paragraph() == end.paragraph() )
- hadEndParag = TRUE;
+ hadEndParag = true;
if ( c == sel.startCursor )
- hadOldStart = TRUE;
+ hadOldStart = true;
if ( c == sel.endCursor )
- hadOldEnd = TRUE;
+ hadOldEnd = true;
if ( !sel.swapped &&
( ( hadEnd && !hadStart ) ||
( hadEnd && hadStart && start.paragraph() == end.paragraph() && start.index() > end.index() ) ) )
- sel.swapped = TRUE;
+ sel.swapped = true;
if ( ( c == end && hadStartParag ) ||
( c == start && hadEndParag ) ) {
@@ -2641,9 +2641,9 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
if ( inSelection &&
( ( c == end && hadStart ) || ( c == start && hadEnd ) ) )
- leftSelection = TRUE;
+ leftSelection = true;
else if ( !leftSelection && !inSelection && ( hadStart || hadEnd ) )
- inSelection = TRUE;
+ inSelection = true;
bool noSelectionAnymore = hadOldStart && hadOldEnd && leftSelection && !inSelection && !c.paragraph()->hasSelection( id ) && c.atParagEnd();
c.paragraph()->removeSelection( id );
@@ -2664,7 +2664,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
}
if ( leftSelection )
- inSelection = FALSE;
+ inSelection = false;
if ( noSelectionAnymore )
break;
@@ -2694,7 +2694,7 @@ bool TQTextDocument::setSelectionEnd( int id, const TQTextCursor &cursor )
setSelectionEndHelper( id, sel, start, end );
- return TRUE;
+ return true;
}
void TQTextDocument::selectAll( int id )
@@ -2702,7 +2702,7 @@ void TQTextDocument::selectAll( int id )
removeSelection( id );
TQTextDocumentSelection sel;
- sel.swapped = FALSE;
+ sel.swapped = false;
TQTextCursor c( this );
c.setParagraph( fParag );
@@ -2728,7 +2728,7 @@ void TQTextDocument::selectAll( int id )
bool TQTextDocument::removeSelection( int id )
{
if ( !selections.contains( id ) )
- return FALSE;
+ return false;
TQTextDocumentSelection &sel = selections[ id ];
@@ -2748,7 +2748,7 @@ bool TQTextDocument::removeSelection( int id )
p = start.paragraph();
p->removeSelection( id );
selections.remove( id );
- return TRUE;
+ return true;
}
TQString TQTextDocument::selectedText( int id, bool asRichText ) const
@@ -2916,17 +2916,17 @@ void TQTextDocument::setFormat( int id, TQTextFormat *f, int flags )
c1.restoreState();
if ( c1.paragraph() == c2.paragraph() ) {
- c1.paragraph()->setFormat( c1.index(), c2.index() - c1.index(), f, TRUE, flags );
+ c1.paragraph()->setFormat( c1.index(), c2.index() - c1.index(), f, true, flags );
return;
}
- c1.paragraph()->setFormat( c1.index(), c1.paragraph()->length() - c1.index(), f, TRUE, flags );
+ c1.paragraph()->setFormat( c1.index(), c1.paragraph()->length() - c1.index(), f, true, flags );
TQTextParagraph *p = c1.paragraph()->next();
while ( p && p != c2.paragraph() ) {
- p->setFormat( 0, p->length(), f, TRUE, flags );
+ p->setFormat( 0, p->length(), f, true, flags );
p = p->next();
}
- c2.paragraph()->setFormat( 0, c2.index(), f, TRUE, flags );
+ c2.paragraph()->setFormat( 0, c2.index(), f, true, flags );
}
void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor )
@@ -2960,9 +2960,9 @@ void TQTextDocument::removeSelectedText( int id, TQTextCursor *cursor )
if ( c1.paragraph() == fParag && c1.index() == 0 &&
c2.paragraph() == lParag && c2.index() == lParag->length() - 1 )
- cursor->setValid( FALSE );
+ cursor->setValid( false );
- bool didGoLeft = FALSE;
+ bool didGoLeft = false;
if ( c1.index() == 0 && c1.paragraph() != fParag ) {
cursor->gotoPreviousLetter();
didGoLeft = cursor->isValid();
@@ -3034,7 +3034,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
removeSelection( Standard );
TQTextParagraph *p = 0;
if ( expr.isEmpty() )
- return FALSE;
+ return false;
for (;;) {
if ( p != cursor.paragraph() ) {
p = cursor.paragraph();
@@ -3054,7 +3054,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
setSelectionEnd( Standard, cursor );
if ( !forward )
cursor.setIndex( res );
- return TRUE;
+ return true;
}
start = res + (forward ? 1 : -1);
}
@@ -3069,7 +3069,7 @@ bool TQTextDocument::find( TQTextCursor& cursor, const TQString &expr, bool cs,
cursor.gotoPreviousLetter();
}
}
- return FALSE;
+ return false;
}
void TQTextDocument::setTextFormat( TQt::TextFormat f )
@@ -3088,14 +3088,14 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
{
TQMap<int, TQTextDocumentSelection>::ConstIterator it = selections.find( selId );
if ( it == selections.end() )
- return FALSE;
+ return false;
TQTextDocumentSelection sel = *it;
TQTextParagraph *startParag = sel.startCursor.paragraph();
TQTextParagraph *endParag = sel.endCursor.paragraph();
if ( sel.startCursor.paragraph() == sel.endCursor.paragraph() &&
sel.startCursor.paragraph()->selectionStart( selId ) == sel.endCursor.paragraph()->selectionEnd( selId ) )
- return FALSE;
+ return false;
if ( sel.endCursor.paragraph()->paragId() < sel.startCursor.paragraph()->paragId() ) {
endParag = sel.startCursor.paragraph();
startParag = sel.endCursor.paragraph();
@@ -3104,14 +3104,14 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
TQTextParagraph *p = startParag;
while ( p ) {
if ( p->rect().contains( pos ) ) {
- bool inSel = FALSE;
+ bool inSel = false;
int selStart = p->selectionStart( selId );
int selEnd = p->selectionEnd( selId );
int y = 0;
int h = 0;
for ( int i = 0; i < p->length(); ++i ) {
if ( i == selStart )
- inSel = TRUE;
+ inSel = true;
if ( i == selEnd )
break;
if ( p->at( i )->lineStart ) {
@@ -3121,7 +3121,7 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
if ( pos.y() - p->rect().y() >= y && pos.y() - p->rect().y() <= y + h ) {
if ( inSel && pos.x() >= p->at( i )->x &&
pos.x() <= p->at( i )->x + p->at( i )->format()->width( p->at( i )->c ) )
- return TRUE;
+ return true;
}
}
}
@@ -3132,7 +3132,7 @@ bool TQTextDocument::inSelection( int selId, const TQPoint &pos ) const
p = p->next();
}
- return FALSE;
+ return false;
}
void TQTextDocument::doLayout( TQPainter *p, int w )
@@ -3199,13 +3199,13 @@ void TQTextDocument::draw( TQPainter *p, const TQRect &rect, const TQColorGroup
}
p->translate( 0, y );
if ( rect.isValid() )
- parag->paint( *p, cg, 0, FALSE, rect.x(), rect.y(), rect.width(), rect.height() );
+ parag->paint( *p, cg, 0, false, rect.x(), rect.y(), rect.width(), rect.height() );
else
- parag->paint( *p, cg, 0, FALSE );
+ parag->paint( *p, cg, 0, false );
p->translate( 0, -y );
parag = parag->next();
if ( !flow()->isEmpty() )
- flow()->drawFloatingItems( p, rect.x(), rect.y(), rect.width(), rect.height(), cg, FALSE );
+ flow()->drawFloatingItems( p, rect.x(), rect.y(), rect.width(), rect.height(), cg, false );
}
TQTextFormat::setPainter(oldPainter);
}
@@ -3216,7 +3216,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
{
TQPainter *painter = 0;
if ( resetChanged )
- parag->setChanged( FALSE );
+ parag->setChanged( false );
TQRect ir( parag->rect() );
#ifndef TQT_NO_TEXTCUSTOMITEM
if (!parag->tableCell())
@@ -3252,7 +3252,7 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
painter->translate( -( ir.x() - parag->rect().x() ),
-( ir.y() - parag->rect().y() ) );
- parag->paint( *painter, cg, drawCursor ? cursor : 0, TRUE, cx, cy, cw, ch );
+ parag->paint( *painter, cg, drawCursor ? cursor : 0, true, cx, cy, cw, ch );
if ( uDoubleBuffer ) {
delete painter;
@@ -3262,19 +3262,19 @@ void TQTextDocument::drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx
painter->translate( -ir.x(), -ir.y() );
}
- parag->document()->nextDoubleBuffered = FALSE;
+ parag->document()->nextDoubleBuffered = false;
}
TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
bool onlyChanged, bool drawCursor, TQTextCursor *cursor, bool resetChanged )
{
if ( withoutDoubleBuffer || ( par && par->withoutDoubleBuffer ) ) {
- withoutDoubleBuffer = TRUE;
+ withoutDoubleBuffer = true;
TQRect r;
draw( p, r, cg );
return 0;
}
- withoutDoubleBuffer = FALSE;
+ withoutDoubleBuffer = false;
if ( !firstParagraph() )
return 0;
@@ -3328,7 +3328,7 @@ TQTextParagraph *TQTextDocument::draw( TQPainter *p, int cx, int cy, int cw, int
}
if ( !flow()->isEmpty() ) {
TQRect cr( cx, cy, cw, ch );
- flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, FALSE );
+ flow()->drawFloatingItems( p, cr.x(), cr.y(), cr.width(), cr.height(), cg, false );
}
}
@@ -3376,7 +3376,7 @@ void TQTextDocument::registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p
p->registerFloatingItem( i );
}
if (i) i->setParagraph( p );
- p->mightHaveCustomItems = mightHaveCustomItems = TRUE;
+ p->mightHaveCustomItems = mightHaveCustomItems = true;
}
void TQTextDocument::unregisterCustomItem( TQTextCustomItem *i, TQTextParagraph *p )
@@ -3415,7 +3415,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.len = 0;
}
} else {
- focusIndicator.parag->setChanged( TRUE );
+ focusIndicator.parag->setChanged( true );
}
focusIndicator.href = TQString::null;
focusIndicator.name = TQString::null;
@@ -3426,7 +3426,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( p ) {
for ( int i = index; i < p->length(); ++i ) {
if ( p->at( i )->isAnchor() ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
@@ -3434,7 +3434,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.name = p->at( i )->anchorName();
while ( i < p->length() ) {
if ( !p->at( i )->isAnchor() )
- return TRUE;
+ return true;
focusIndicator.len++;
i++;
}
@@ -3445,19 +3445,19 @@ bool TQTextDocument::focusNextPrevChild( bool next )
TQPtrList<TQTextTableCell> cells = t->tableCells();
// first try to continue
TQTextTableCell *c;
- bool resetCells = TRUE;
+ bool resetCells = true;
for ( c = cells.first(); c; c = cells.next() ) {
if ( c->richText()->hasFocusParagraph() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
} else {
- resetCells = FALSE;
+ resetCells = false;
c = cells.next();
break;
}
@@ -3468,13 +3468,13 @@ bool TQTextDocument::focusNextPrevChild( bool next )
c = cells.first();
for ( ; c; c = cells.next() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
}
}
}
@@ -3492,7 +3492,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( p ) {
for ( int i = index; i >= 0; --i ) {
if ( p->at( i )->isAnchor() ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
@@ -3501,7 +3501,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
while ( i >= -1 ) {
if ( i < 0 || !p->at( i )->isAnchor() ) {
focusIndicator.start++;
- return TRUE;
+ return true;
}
if ( i < 0 )
break;
@@ -3516,19 +3516,19 @@ bool TQTextDocument::focusNextPrevChild( bool next )
TQPtrList<TQTextTableCell> cells = t->tableCells();
// first try to continue
TQTextTableCell *c;
- bool resetCells = TRUE;
+ bool resetCells = true;
for ( c = cells.last(); c; c = cells.prev() ) {
if ( c->richText()->hasFocusParagraph() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
} else {
- resetCells = FALSE;
+ resetCells = false;
c = cells.prev();
break;
}
@@ -3541,13 +3541,13 @@ bool TQTextDocument::focusNextPrevChild( bool next )
c = cells.last();
for ( ; c; c = cells.prev() ) {
if ( c->richText()->focusNextPrevChild( next ) ) {
- p->setChanged( TRUE );
+ p->setChanged( true );
focusIndicator.parag = p;
focusIndicator.start = i;
focusIndicator.len = 0;
focusIndicator.href = c->richText()->focusHref();
focusIndicator.name = c->richText()->focusName();
- return TRUE;
+ return true;
}
if ( cells.at() == 0 )
break;
@@ -3564,7 +3564,7 @@ bool TQTextDocument::focusNextPrevChild( bool next )
focusIndicator.parag = 0;
- return FALSE;
+ return false;
}
int TQTextDocument::length() const
@@ -3656,15 +3656,15 @@ int TQTextFormat::width( const TQString &str, int pos ) const
TQTextString::TQTextString()
{
- bidiDirty = TRUE;
- bidi = FALSE;
- rightToLeft = FALSE;
+ bidiDirty = true;
+ bidi = false;
+ rightToLeft = false;
dir = TQChar::DirON;
}
TQTextString::TQTextString( const TQTextString &s )
{
- bidiDirty = TRUE;
+ bidiDirty = true;
bidi = s.bidi;
rightToLeft = s.rightToLeft;
dir = s.dir;
@@ -3695,14 +3695,14 @@ void TQTextString::insert( int index, const TQChar *unicode, int len, TQTextForm
ch->x = 0;
ch->lineStart = 0;
ch->d.format = 0;
- ch->nobreak = FALSE;
+ ch->nobreak = false;
ch->type = TQTextStringChar::Regular;
ch->d.format = f;
ch->rightToLeft = 0;
ch->c = unicode[i];
++ch;
}
- bidiDirty = TRUE;
+ bidiDirty = true;
}
TQTextString::~TQTextString()
@@ -3725,11 +3725,11 @@ void TQTextString::insert( int index, TQTextStringChar *c, bool doAddRefFormat
ch.rightToLeft = 0;
ch.d.format = 0;
ch.type = TQTextStringChar::Regular;
- ch.nobreak = FALSE;
+ ch.nobreak = false;
if ( doAddRefFormat && c->format() )
c->format()->addRef();
ch.setFormat( c->format() );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end )
@@ -3755,14 +3755,14 @@ int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end
d[i].lineStart = 0;
d[i].rightToLeft = 0;
d[i].type = TQTextStringChar::Regular;
- d[i].nobreak = FALSE;
+ d[i].nobreak = false;
d[i].d.format = src[i].format();
if (d[i].d.format)
d[i].d.format->addRef();
}
d[i].x = 0;
d[i].lineStart = 0;
- d[i].nobreak = FALSE;
+ d[i].nobreak = false;
d[i].type = TQTextStringChar::Regular;
d[i].d.format = 0;
d[i].rightToLeft = 0;
@@ -3770,7 +3770,7 @@ int TQTextString::appendParagraphs( TQTextParagraph *start, TQTextParagraph *end
d += p->length();
}
- bidiDirty = TRUE;
+ bidiDirty = true;
return paragCount;
}
@@ -3796,7 +3796,7 @@ void TQTextString::truncate( int index )
}
}
data.truncate( index );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::remove( int index, int len )
@@ -3819,7 +3819,7 @@ void TQTextString::remove( int index, int len )
memmove( data.data() + index, data.data() + index + len,
sizeof( TQTextStringChar ) * ( data.size() - index - len ) );
data.resize( data.size() - len, TQGArray::SpeedOptim );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::clear()
@@ -3841,7 +3841,7 @@ void TQTextString::clear()
}
}
data.resize( 0 );
- bidiDirty = TRUE;
+ bidiDirty = true;
}
void TQTextString::setFormat( int index, TQTextFormat *f, bool useCollection )
@@ -3855,10 +3855,10 @@ void TQTextString::setFormat( int index, TQTextFormat *f, bool useCollection )
void TQTextString::checkBidi() const
{
TQTextString *that = (TQTextString *)this;
- that->bidiDirty = FALSE;
+ that->bidiDirty = false;
int length = data.size();
if ( !length ) {
- that->bidi = FALSE;
+ that->bidi = false;
that->rightToLeft = dir == TQChar::DirR;
return;
}
@@ -3877,7 +3877,7 @@ void TQTextString::checkBidi() const
TQScriptItem *item = &textEngine.items[textEngine.items.size()-1];
unsigned char bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel )
- that->bidi = TRUE;
+ that->bidi = true;
int pos = length-1;
while ( ch >= start ) {
if ( item->position > pos ) {
@@ -3886,7 +3886,7 @@ void TQTextString::checkBidi() const
Q_ASSERT( item < &textEngine.items[textEngine.items.size()] );
bidiLevel = item->analysis.bidiLevel;
if ( bidiLevel )
- that->bidi = TRUE;
+ that->bidi = true;
}
ch->softBreak = ca->softBreak;
ch->whiteSpace = ca->whiteSpace;
@@ -3900,10 +3900,10 @@ void TQTextString::checkBidi() const
}
if ( dir == TQChar::DirR ) {
- that->bidi = TRUE;
- that->rightToLeft = TRUE;
+ that->bidi = true;
+ that->rightToLeft = true;
} else if ( dir == TQChar::DirL ) {
- that->rightToLeft = FALSE;
+ that->rightToLeft = false;
} else {
that->rightToLeft = (textEngine.direction == TQChar::DirR);
}
@@ -4051,9 +4051,9 @@ int TQTextString::width( int idx ) const
TQTextParagraph::TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr, TQTextParagraph *nx, bool updateIds )
: p( pr ), n( nx ), docOrPseudo( d ),
- changed(FALSE), firstFormat(TRUE), firstPProcess(TRUE), needPreProcess(FALSE), fullWidth(TRUE),
- lastInFrame(FALSE), visible(TRUE), breakable(TRUE), movedDown(FALSE),
- mightHaveCustomItems(FALSE), hasdoc( d != 0 ), litem(FALSE), rtext(FALSE),
+ changed(false), firstFormat(true), firstPProcess(true), needPreProcess(false), fullWidth(true),
+ lastInFrame(false), visible(true), breakable(true), movedDown(false),
+ mightHaveCustomItems(false), hasdoc( d != 0 ), litem(false), rtext(false),
align( 0 ), lstyle( TQStyleSheetItem::ListDisc ), invalid( 0 ), mSelections( 0 ),
#ifndef TQT_NO_TEXTCUSTOMITEM
mFloatingItems( 0 ),
@@ -4184,14 +4184,14 @@ void TQTextParagraph::insert( int index, const TQChar *unicode, int len )
else
str->insert( index, unicode, len, formatCollection()->defaultFormat() );
invalidate( index );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::truncate( int index )
{
str->truncate( index );
insert( length(), " " );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::remove( int index, int len )
@@ -4208,7 +4208,7 @@ void TQTextParagraph::remove( int index, int len )
#endif
str->remove( index, len );
invalidate( 0 );
- needPreProcess = TRUE;
+ needPreProcess = true;
}
void TQTextParagraph::join( TQTextParagraph *s )
@@ -4225,12 +4225,12 @@ void TQTextParagraph::join( TQTextParagraph *s )
remove( length() - 1, 1 );
--start;
}
- append( s->str->toString(), TRUE );
+ append( s->str->toString(), true );
for ( int i = 0; i < s->length(); ++i ) {
if ( !hasdoc || document()->useFormatCollection() ) {
s->str->at( i ).format()->addRef();
- str->setFormat( i + start, s->str->at( i ).format(), TRUE );
+ str->setFormat( i + start, s->str->at( i ).format(), true );
}
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( s->str->at( i ).isCustom() ) {
@@ -4258,15 +4258,15 @@ void TQTextParagraph::join( TQTextParagraph *s )
delete s;
invalidate( 0 );
r.setHeight( oh );
- needPreProcess = TRUE;
+ needPreProcess = true;
if ( n ) {
TQTextParagraph *s = n;
s->invalidate( 0 );
while ( s ) {
s->id = s->p->id + 1;
s->state = -1;
- s->needPreProcess = TRUE;
- s->changed = TRUE;
+ s->needPreProcess = true;
+ s->changed = true;
s->invalidateStyleCache();
s = s->n;
}
@@ -4279,7 +4279,7 @@ void TQTextParagraph::move( int &dy )
{
if ( dy == 0 )
return;
- changed = TRUE;
+ changed = true;
r.moveBy( 0, dy );
#ifndef TQT_NO_TEXTCUSTOMITEM
if ( mFloatingItems ) {
@@ -4288,14 +4288,14 @@ void TQTextParagraph::move( int &dy )
}
#endif
if ( p )
- p->lastInFrame = TRUE;
+ p->lastInFrame = true;
// do page breaks if required
if ( hasdoc && document()->isPageBreakEnabled() ) {
int shift;
if ( ( shift = document()->formatter()->formatVertically( document(), this ) ) ) {
if ( p )
- p->setChanged( TRUE );
+ p->setChanged( true );
dy += shift;
}
}
@@ -4310,17 +4310,17 @@ void TQTextParagraph::format( int start, bool doMove )
{
document()->preProcessor()->process( document(), this, invalid <= 0 ? 0 : invalid );
}
- needPreProcess = FALSE;
+ needPreProcess = false;
if ( invalid == -1 )
return;
r.moveTopLeft( TQPoint( documentX(), p ? p->r.y() + p->r.height() : documentY() ) );
if ( p )
- p->lastInFrame = FALSE;
+ p->lastInFrame = false;
- movedDown = FALSE;
- bool formattedAgain = FALSE;
+ movedDown = false;
+ bool formattedAgain = false;
formatAgain:
@@ -4384,7 +4384,7 @@ void TQTextParagraph::format( int start, bool doMove )
if ( hasdoc && document()->isPageBreakEnabled() ) {
int shift = document()->formatter()->formatVertically( document(), this );
if ( shift && !formattedAgain ) {
- formattedAgain = TRUE;
+ formattedAgain = true;
goto formatAgain;
}
}
@@ -4395,20 +4395,20 @@ void TQTextParagraph::format( int start, bool doMove )
bool makeInvalid = p && p->lastInFrame;
while ( s && dy ) {
if ( !s->isFullWidth() )
- makeInvalid = TRUE;
+ makeInvalid = true;
if ( makeInvalid )
s->invalidate( 0 );
s->move( dy );
if ( s->lastInFrame )
- makeInvalid = TRUE;
+ makeInvalid = true;
s = s->n;
}
}
- firstFormat = FALSE;
- changed = TRUE;
+ firstFormat = false;
+ changed = true;
invalid = -1;
- //##### string()->setTextChanged( FALSE );
+ //##### string()->setTextChanged( false );
}
int TQTextParagraph::lineHeightOfChar( int i, int *bl, int *y ) const
@@ -4532,7 +4532,7 @@ void TQTextParagraph::setFormat( int index, int len, TQTextFormat *f, bool useCo
for ( int i = 0; i < len; ++i ) {
of = str->at( i + index ).format();
if ( !changed && ( !of || f->key() != of->key() ) )
- changed = TRUE;
+ changed = true;
if ( invalid == -1 &&
( f->font().family() != of->font().family() ||
f->font().pointSize() != of->font().pointSize() ||
@@ -4603,7 +4603,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
// we flush at end of document
bool flush = (i == length()-1);
- bool ignoreSoftHyphen = FALSE;
+ bool ignoreSoftHyphen = false;
if ( !flush ) {
// we flush at end of line
flush |= nextchr->lineStart;
@@ -4619,9 +4619,9 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
flush |= ( chr->c == '\t' || nextchr->c == '\t' );
// we flush on soft hypens
if (chr->c.unicode() == 0xad) {
- flush = TRUE;
+ flush = true;
if (!nextchr->lineStart)
- ignoreSoftHyphen = TRUE;
+ ignoreSoftHyphen = true;
}
// we flush on custom items
flush |= chr->isCustom();
@@ -4696,7 +4696,7 @@ void TQTextParagraph::paint( TQPainter &painter, const TQColorGroup &cg, TQTextC
chr, cg, chr->rightToLeft );
#ifndef TQT_NO_TEXTCUSTOMITEM
else if ( chr->customItem()->placement() == TQTextCustomItem::PlaceInline ) {
- bool inSelection = FALSE;
+ bool inSelection = false;
if (drawSelections) {
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard );
inSelection = (it != mSelections->end() && (*it).start <= i && (*it).end > i);
@@ -4767,7 +4767,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
TQTextStringChar *formatChar, const TQColorGroup& cg,
bool rightToLeft )
{
- bool plainText = hasdoc ? document()->textFormat() == TQt::PlainText : FALSE;
+ bool plainText = hasdoc ? document()->textFormat() == TQt::PlainText : false;
TQTextFormat* format = formatChar->format();
if ( !plainText || ( hasdoc && format->color() != document()->formatCollection()->defaultFormat()->color() ) )
@@ -4781,7 +4781,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
painter.setPen(document()->linkColor.isValid() ? document()->linkColor : cg.link());
if ( document()->underlineLinks() ) {
TQFont fn = format->font();
- fn.setUnderline( TRUE );
+ fn.setUnderline( true );
painter.setFont( fn );
}
}
@@ -4808,7 +4808,7 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
baseLine += (vAlign == TQTextFormat::AlignSubScript) ? h/6 : -h/2;
}
- bool allSelected = FALSE;
+ bool allSelected = false;
if (drawSelections) {
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( TQTextDocument::Standard );
allSelected = (it != mSelections->end() && (*it).start <= start && (*it).end >= start+len);
@@ -4843,8 +4843,8 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
selStart = TQMAX(selStart, start);
int real_selEnd = TQMIN(selEnd, start+real_length);
selEnd = TQMIN(selEnd, start+len);
- bool extendRight = FALSE;
- bool extendLeft = FALSE;
+ bool extendRight = false;
+ bool extendLeft = false;
bool selWrap = (real_selEnd == length()-1 && n && n->hasSelection(it.key()));
if (selWrap || this->str->at(real_selEnd).lineStart) {
extendRight = (fullSelectionWidth != 0);
@@ -4852,10 +4852,10 @@ void TQTextParagraph::drawString( TQPainter &painter, const TQString &str, int s
tmpw += painter.fontMetrics().width(' ');
}
if (fullSelectionWidth && (selStart == 0 || this->str->at(selStart).lineStart)) {
- extendLeft = TRUE;
+ extendLeft = true;
}
if (this->str->isRightToLeft() != rightToLeft)
- extendLeft = extendRight = FALSE;
+ extendLeft = extendRight = false;
if (this->str->isRightToLeft()) {
bool tmp = extendLeft;
@@ -5046,7 +5046,7 @@ void TQTextParagraph::setListItem( bool li )
if ( (bool)litem == li )
return;
litem = li;
- changed = TRUE;
+ changed = true;
TQTextParagraph* s = prev() ? prev() : this;
while ( s ) {
s->invalidate( 0 );
@@ -5278,14 +5278,14 @@ void TQTextParagraph::show()
{
if ( visible || !hasdoc )
return;
- visible = TRUE;
+ visible = true;
}
void TQTextParagraph::hide()
{
if ( !visible || !hasdoc )
return;
- visible = FALSE;
+ visible = false;
}
void TQTextParagraph::setDirection( TQChar::Direction d )
@@ -5320,7 +5320,7 @@ TQTextPreProcessor::TQTextPreProcessor()
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
TQTextFormatter::TQTextFormatter()
- : thisminw(0), thiswused(0), wrapEnabled( TRUE ), wrapColumn( -1 ), biw( FALSE )
+ : thisminw(0), thiswused(0), wrapEnabled( true ), wrapColumn( -1 ), biw( false )
{
}
@@ -5506,11 +5506,11 @@ TQTextLineStart *TQTextFormatter::bidiReorderLine( TQTextParagraph * /*parag*/,
if ( text->isRightToLeft() ) {
xorig -= sw;
lastChar->x = xorig;
- ch->rightToLeft = TRUE;
+ ch->rightToLeft = true;
} else {
lastChar->x = x;
x += sw;
- ch->rightToLeft = FALSE;
+ ch->rightToLeft = false;
}
}
@@ -5559,7 +5559,7 @@ int TQTextFormatter::formatVertically( TQTextDocument* doc, TQTextParagraph* par
int delta = c->customItem()->height - h;
ls->h += delta;
if ( delta )
- parag->setMovedDown( TRUE );
+ parag->setMovedDown( true );
} else
#endif
{
@@ -5567,7 +5567,7 @@ int TQTextFormatter::formatVertically( TQTextDocument* doc, TQTextParagraph* par
int shift = doc->flow()->adjustFlow( parag->rect().y() + ls->y, ls->w, ls->h );
ls->y += shift;
if ( shift )
- parag->setMovedDown( TRUE );
+ parag->setMovedDown( true );
}
h = ls->y + ls->h;
}
@@ -5607,7 +5607,7 @@ int TQTextFormatterBreakInWords::format( TQTextDocument *doc,TQTextParagraph *pa
x = doc->flow()->adjustLMargin( y + parag->rect().y(), parag->rect().height(), x, 4 );
int rm = parag->rightMargin();
int w = dw - ( doc ? doc->flow()->adjustRMargin( y + parag->rect().y(), parag->rect().height(), rm, 4 ) : 0 );
- bool fullWidth = TRUE;
+ bool fullWidth = true;
int minw = 0;
int wused = 0;
bool wrapEnabled = isWrapEnabled( parag );
@@ -5723,7 +5723,7 @@ TQTextFormatterBreakWords::TQTextFormatterBreakWords()
int shift = doc->flow()->adjustFlow( yflow, dw, lineStart->h ); \
lineStart->y += shift;\
y += shift;\
- }}while(FALSE)
+ }}while(false)
int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *parag,
int start, const TQMap<int, TQTextLineStart*> & )
@@ -5747,7 +5747,7 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
int rm = parag->rightMargin();
int rdiff = doc ? doc->flow()->adjustRMargin( y + parag->rect().y(), parag->rect().height(), rm, 0 ) : 0;
int w = dw - rdiff;
- bool fullWidth = TRUE;
+ bool fullWidth = true;
int marg = left + rdiff;
int minw = 0;
int wused = 0;
@@ -5762,7 +5762,7 @@ int TQTextFormatterBreakWords::format( TQTextDocument *doc, TQTextParagraph *par
insertLineStart( parag, 0, lineStart );
int lastBreak = -1;
int tmpBaseLine = 0, tmph = 0;
- bool lastWasNonInlineCustom = FALSE;
+ bool lastWasNonInlineCustom = false;
int align = parag->alignment();
if ( align == TQt::AlignAuto && doc && doc->alignment() != TQt::AlignAuto )
@@ -6071,7 +6071,7 @@ TQTextFormatCollection::TQTextFormatCollection()
TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ) );
lastFormat = cres = 0;
cflags = -1;
- cKey.setAutoDelete( TRUE );
+ cKey.setAutoDelete( true );
cachedFormat = 0;
}
@@ -6184,7 +6184,7 @@ TQTextFormat *TQTextFormatCollection::format( const TQFont &f, const TQColor &c
return cachedFormat;
}
- TQString key = TQTextFormat::getKey( f, c, FALSE, TQTextFormat::AlignNormal );
+ TQString key = TQTextFormat::getKey( f, c, false, TQTextFormat::AlignNormal );
cachedFormat = cKey.find( key );
cfont = f;
ccol = c;
@@ -6264,7 +6264,7 @@ void TQTextFormatCollection::updateKeys()
{
if ( cKey.isEmpty() )
return;
- cKey.setAutoDelete( FALSE );
+ cKey.setAutoDelete( false );
TQTextFormat** formats = new TQTextFormat*[ cKey.count() + 1 ];
TQTextFormat **f = formats;
TQDictIterator<TQTextFormat> it( cKey );
@@ -6275,7 +6275,7 @@ void TQTextFormatCollection::updateKeys()
cKey.clear();
for ( f = formats; *f; f++ )
cKey.insert( (*f)->key(), *f );
- cKey.setAutoDelete( TRUE );
+ cKey.setAutoDelete( true );
delete [] formats;
}
@@ -6344,7 +6344,7 @@ void TQTextFormat::setPointSize( int s )
if ( s == fn.pointSize() )
return;
fn.setPointSize( s );
- usePixelSizes = FALSE;
+ usePixelSizes = false;
update();
}
@@ -6387,24 +6387,24 @@ TQString TQTextFormat::makeFormatChangeTags( TQTextFormat* defaultFormat, TQText
if ( font().weight() != defaultFormat->font().weight() )
s += TQString(!!s?";":"") + "font-weight:" + TQString::number( fn.weight() * 8 );
TQString textDecoration;
- bool none = FALSE;
+ bool none = false;
if ( font().underline() != defaultFormat->font().underline() ) {
if (font().underline())
textDecoration = "underline";
else
- none = TRUE;
+ none = true;
}
if ( font().overline() != defaultFormat->font().overline() ) {
if (font().overline())
textDecoration += " overline";
else
- none = TRUE;
+ none = true;
}
if ( font().strikeOut() != defaultFormat->font().strikeOut() ) {
if (font().strikeOut())
textDecoration += " line-through";
else
- none = TRUE;
+ none = true;
}
if (none && textDecoration.isEmpty())
textDecoration = "none";
@@ -6455,7 +6455,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
// the style is not an anchor and defines a color.
// It might be used inside an anchor and it should
// override the link color.
- format.linkColor = FALSE;
+ format.linkColor = false;
}
switch ( style->verticalAlignment() ) {
case TQStyleSheetItem::VAlignBaseline:
@@ -6505,7 +6505,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
TQString s = attr["color"];
if ( !s.isEmpty() ) {
format.col.setNamedColor( s );
- format.linkColor = FALSE;
+ format.linkColor = false;
}
}
if ( attr.contains("face") ) {
@@ -6538,12 +6538,12 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
} else if ( style.startsWith("font-style:" ) ) {
TQString s = style.mid( 11 ).stripWhiteSpace();
if ( s == "normal" )
- format.fn.setItalic( FALSE );
+ format.fn.setItalic( false );
else if ( s == "italic" || s == "oblique" )
- format.fn.setItalic( TRUE );
+ format.fn.setItalic( true );
} else if ( style.startsWith("font-weight:" ) ) {
TQString s = style.mid( 12 );
- bool ok = TRUE;
+ bool ok = true;
int n = s.toInt( &ok );
if ( ok )
format.fn.setWeight( n/8 );
@@ -6568,7 +6568,7 @@ TQTextFormat TQTextFormat::makeTextFormat( const TQStyleSheetItem *style, const
format.setVAlign( TQTextFormat::AlignNormal );
} else if ( style.startsWith("color:" ) ) {
format.col.setNamedColor( style.mid(6) );
- format.linkColor = FALSE;
+ format.linkColor = false;
}
}
}
@@ -6818,7 +6818,7 @@ void TQTextHorizontalLine::draw( TQPainter* p, int x, int y, int , int , int , i
g.setColor( TQColorGroup::Dark, color );
if ( selected )
p->fillRect( r, g.highlight() );
- qDrawShadeLine( p, r.left() - 1, y + height / 2, r.right() + 1, y + height / 2, g, TRUE, height / 8 );
+ qDrawShadeLine( p, r.left() - 1, y + height / 2, r.right() + 1, y + height / 2, g, true, height / 8 );
}
}
#endif //TQT_NO_TEXTCUSTOMITEM
@@ -6830,19 +6830,19 @@ void TQTextHorizontalLine::draw( TQPainter* p, int x, int y, int , int , int , i
bool TQTextDocument::hasPrefix(const TQChar* doc, int length, int pos, TQChar c)
{
if ( pos + 1 > length )
- return FALSE;
+ return false;
return doc[ pos ].lower() == c.lower();
}
bool TQTextDocument::hasPrefix( const TQChar* doc, int length, int pos, const TQString& s )
{
if ( pos + (int) s.length() > length )
- return FALSE;
+ return false;
for ( int i = 0; i < (int)s.length(); i++ ) {
if ( doc[ pos + i ].lower() != s[ i ].lower() )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -6851,9 +6851,9 @@ static bool qt_is_cell_in_use( TQPtrList<TQTextTableCell>& cells, int row, int c
for ( TQTextTableCell* c = cells.first(); c; c = cells.next() ) {
if ( row >= c->row() && row < c->row() + c->rowspan()
&& col >= c->column() && col < c->column() + c->colspan() )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQTextCustomItem* TQTextDocument::parseTable( const TQMap<TQString, TQString> &attr, const TQTextFormat &fmt,
@@ -6881,7 +6881,7 @@ TQTextCustomItem* TQTextDocument::parseTable( const TQMap<TQString, TQString> &a
}
} else {
TQMap<TQString, TQString> attr2;
- bool emptyTag = FALSE;
+ bool emptyTag = false;
tagname = parseOpenTag( doc, length, pos, attr2, emptyTag );
if ( tagname == "tr" ) {
rowbgcolor = attr2["bgcolor"];
@@ -7378,7 +7378,7 @@ TQChar TQTextDocument::parseChar(const TQChar* doc, int length, int& pos, TQStyl
TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
TQMap<TQString, TQString> &attr, bool& emptyTag)
{
- emptyTag = FALSE;
+ emptyTag = false;
pos++;
if ( hasPrefix(doc, length, pos, '!') ) {
if ( hasPrefix( doc, length, pos+1, "--")) {
@@ -7389,9 +7389,9 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
pos++;
if ( hasPrefix(doc, length, pos, pref ) ) {
pos += 3;
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
- emptyTag = TRUE;
+ emptyTag = true;
return TQString::null;
}
else {
@@ -7400,20 +7400,20 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
pos++;
if ( hasPrefix(doc, length, pos, '>') ) {
pos++;
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
return TQString::null;
}
}
TQString tag = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
static TQString term = TQString::fromLatin1("/>");
static TQString s_TRUE = TQString::fromLatin1("TRUE");
while (doc[pos] != '>' && ! (emptyTag = hasPrefix(doc, length, pos, term) )) {
TQString key = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
if ( key.isEmpty()) {
// error recovery
while ( pos < length && doc[pos] != '>' )
@@ -7424,12 +7424,12 @@ TQString TQTextDocument::parseOpenTag(const TQChar* doc, int length, int& pos,
if (hasPrefix(doc, length, pos, '=') ){
pos++;
eatSpace(doc, length, pos);
- value = parseWord(doc, length, pos, FALSE);
+ value = parseWord(doc, length, pos, false);
}
else
value = s_TRUE;
attr.insert(key.lower(), value );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
}
if (emptyTag) {
@@ -7447,7 +7447,7 @@ TQString TQTextDocument::parseCloseTag( const TQChar* doc, int length, int& pos
pos++;
pos++;
TQString tag = parseWord(doc, length, pos );
- eatSpace(doc, length, pos, TRUE);
+ eatSpace(doc, length, pos, true);
eat(doc, length, pos, '>');
return tag;
}
@@ -7465,12 +7465,12 @@ TQTextFlow::~TQTextFlow()
void TQTextFlow::clear()
{
#ifndef TQT_NO_TEXTCUSTOMITEM
- leftItems.setAutoDelete( TRUE );
- rightItems.setAutoDelete( TRUE );
+ leftItems.setAutoDelete( true );
+ rightItems.setAutoDelete( true );
leftItems.clear();
rightItems.clear();
- leftItems.setAutoDelete( FALSE );
- rightItems.setAutoDelete( FALSE );
+ leftItems.setAutoDelete( false );
+ rightItems.setAutoDelete( false );
#endif
}
@@ -7587,7 +7587,7 @@ void TQTextCustomItem::pageBreak( int /*y*/ , TQTextFlow* /*flow*/ )
TQTextTable::TQTextTable( TQTextDocument *p, const TQMap<TQString, TQString> & attr )
: TQTextCustomItem( p )
{
- cells.setAutoDelete( FALSE );
+ cells.setAutoDelete( false );
cellspacing = 2;
if ( attr.contains("cellspacing") )
cellspacing = attr["cellspacing"].toInt();
@@ -7657,7 +7657,7 @@ TQString TQTextTable::richText() const
s += ">\n";
int lastRow = -1;
- bool needEnd = FALSE;
+ bool needEnd = false;
TQPtrListIterator<TQTextTableCell> it2( cells );
while ( it2.current() ) {
TQTextTableCell *cell = it2.current();
@@ -7667,7 +7667,7 @@ TQString TQTextTable::richText() const
s += "</tr>\n";
s += "<tr>";
lastRow = cell->row();
- needEnd = TRUE;
+ needEnd = true;
}
s += "<td";
it = cell->attributes.begin();
@@ -7708,18 +7708,18 @@ void TQTextTable::adjustCells( int y , int shift )
{
TQPtrListIterator<TQTextTableCell> it( cells );
TQTextTableCell* cell;
- bool enlarge = FALSE;
+ bool enlarge = false;
while ( ( cell = it.current() ) ) {
++it;
TQRect r = cell->geometry();
if ( y <= r.top() ) {
r.moveBy(0, shift );
cell->setGeometry( r );
- enlarge = TRUE;
+ enlarge = true;
} else if ( y <= r.bottom() ) {
r.rBottom() += shift;
cell->setGeometry( r );
- enlarge = TRUE;
+ enlarge = true;
}
}
if ( enlarge )
@@ -7781,7 +7781,7 @@ void TQTextTable::draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int c
p->fillRect( r.left()-s, r.top()-s, r.width()+2*s, s, cg.button() );
p->fillRect( r.left()-s, r.bottom(), r.width()+2*s, s, cg.button() );
}
- qDrawShadePanel( p, r, cg, TRUE, innerborder );
+ qDrawShadePanel( p, r, cg, true, innerborder );
}
}
}
@@ -7803,7 +7803,7 @@ void TQTextTable::draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int c
p->fillRect( r.left(), r.top(), r.width(), s, cg.button() );
p->fillRect( r.left(), r.bottom()-s, r.width(), s, cg.button() );
}
- qDrawShadePanel( p, r, cg, FALSE, border );
+ qDrawShadePanel( p, r, cg, false, border );
}
}
@@ -7904,24 +7904,24 @@ bool TQTextTable::enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagrap
}
}
if ( i == (int) cells.count() )
- return FALSE; // no cell found
+ return false; // no cell found
if ( currCell.find( c ) == currCell.end() ) {
if ( lastY != -1 )
currCell.insert( c, lastCell );
else
- return FALSE;
+ return false;
}
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
@@ -7938,23 +7938,23 @@ bool TQTextTable::next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
TQTextCustomItem::next( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
@@ -7971,45 +7971,45 @@ bool TQTextTable::prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
TQTextCustomItem::prev( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
parag = doc->lastParagraph();
idx = parag->length() - 1;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
{
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( cell->row_ == layout->numRows() - 1 ) {
currCell.insert( c, 0 );
TQTextCustomItem::down( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
int oldRow = cell->row_;
int oldCol = cell->col_;
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
int cc = *currCell.find( c );
for ( int i = cc; i < (int)cells.count(); ++i ) {
cell = cells.at( i );
@@ -8020,34 +8020,34 @@ bool TQTextTable::down( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *
}
doc = cell->richText();
if ( !cell )
- return FALSE;
+ return false;
parag = doc->firstParagraph();
idx = 0;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy )
{
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
TQTextTableCell *cell = cells.at( *currCell.find( c ) );
if ( cell->row_ == 0 ) {
currCell.insert( c, 0 );
TQTextCustomItem::up( c, doc, parag, idx, ox, oy );
TQTextTableCell *cell = cells.first();
if ( !cell )
- return FALSE;
+ return false;
doc = cell->richText();
idx = -1;
- return TRUE;
+ return true;
}
int oldRow = cell->row_;
int oldCol = cell->col_;
if ( currCell.find( c ) == currCell.end() )
- return FALSE;
+ return false;
int cc = *currCell.find( c );
for ( int i = cc; i >= 0; --i ) {
cell = cells.at( i );
@@ -8058,12 +8058,12 @@ bool TQTextTable::up( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&p
}
doc = cell->richText();
if ( !cell )
- return FALSE;
+ return false;
parag = doc->lastParagraph();
idx = parag->length() - 1;
ox += cell->geometry().x() + cell->horizontalAlignmentOffset() + outerborder + parent->x();
oy += cell->geometry().y() + cell->verticalAlignmentOffset() + outerborder;
- return TRUE;
+ return true;
}
TQTextTableCell::TQTextTableCell( TQTextTable* table,
@@ -8127,7 +8127,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
}
- hasFixedWidth = FALSE;
+ hasFixedWidth = false;
if ( attr.contains("width") ) {
bool b;
TQString s( attr["width"] );
@@ -8135,7 +8135,7 @@ TQTextTableCell::TQTextTableCell( TQTextTable* table,
if ( b ) {
maxw = w;
minw = maxw;
- hasFixedWidth = TRUE;
+ hasFixedWidth = true;
} else {
s = s.stripWhiteSpace();
if ( s.length() > 1 && s[ (int)s.length()-1 ] == '%' )
@@ -8187,7 +8187,7 @@ TQSizePolicy::ExpandData TQTextTableCell::expanding() const
bool TQTextTableCell::isEmpty() const
{
- return FALSE;
+ return false;
}
void TQTextTableCell::setGeometry( const TQRect& r )
{
@@ -8205,7 +8205,7 @@ TQRect TQTextTableCell::geometry() const
bool TQTextTableCell::hasHeightForWidth() const
{
- return TRUE;
+ return true;
}
int TQTextTableCell::heightForWidth( int w ) const
@@ -8270,9 +8270,9 @@ void TQTextTableCell::draw( TQPainter* p, int x, int y, int cx, int cy, int cw,
if ( cx >= 0 && cy >= 0 )
richtext->draw( p, cx - ( x + horizontalAlignmentOffset() + geom.x() ),
cy - ( y + geom.y() + verticalAlignmentOffset() ),
- cw, ch, g, FALSE, FALSE, 0 );
+ cw, ch, g, false, false, 0 );
else
- richtext->draw( p, -1, -1, -1, -1, g, FALSE, FALSE, 0 );
+ richtext->draw( p, -1, -1, -1, -1, g, false, false, 0 );
p->restore();
}
diff --git a/src/kernel/tqrichtext_p.cpp b/src/kernel/tqrichtext_p.cpp
index 165d319db..13dba99c6 100644
--- a/src/kernel/tqrichtext_p.cpp
+++ b/src/kernel/tqrichtext_p.cpp
@@ -51,38 +51,38 @@ TQTextCustomItem::~TQTextCustomItem() {}
void TQTextCustomItem::adjustToPainter( TQPainter* p){ if ( p ) width = 0; }
TQTextCustomItem::Placement TQTextCustomItem::placement() const { return PlaceInline; }
-bool TQTextCustomItem::ownLine() const { return FALSE; }
+bool TQTextCustomItem::ownLine() const { return false; }
void TQTextCustomItem::resize( int nwidth ){ width = nwidth; }
void TQTextCustomItem::invalidate() {}
-bool TQTextCustomItem::isNested() const { return FALSE; }
+bool TQTextCustomItem::isNested() const { return false; }
int TQTextCustomItem::minimumWidth() const { return 0; }
TQString TQTextCustomItem::richText() const { return TQString::null; }
bool TQTextCustomItem::enter( TQTextCursor *, TQTextDocument*&, TQTextParagraph *&, int &, int &, int &, bool )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::enterAt( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int &, const TQPoint & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::next( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::prev( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::down( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
bool TQTextCustomItem::up( TQTextCursor *, TQTextDocument *&, TQTextParagraph *&, int &, int &, int & )
{
- return TRUE;
+ return true;
}
#endif // TQT_NO_TEXTCUSTOMITEM
@@ -90,7 +90,7 @@ void TQTextFlow::setPageSize( int ps ) { pagesize = ps; }
#ifndef TQT_NO_TEXTCUSTOMITEM
bool TQTextFlow::isEmpty() { return leftItems.isEmpty() && rightItems.isEmpty(); }
#else
-bool TQTextFlow::isEmpty() { return TRUE; }
+bool TQTextFlow::isEmpty() { return true; }
#endif
#ifndef TQT_NO_TEXTCUSTOMITEM
@@ -177,7 +177,7 @@ void TQTextDocument::setSelectionStart( int id, const TQTextCursor &cursor )
TQTextDocumentSelection sel;
sel.startCursor = cursor;
sel.endCursor = cursor;
- sel.swapped = FALSE;
+ sel.swapped = false;
selections[ id ] = sel;
}
@@ -198,33 +198,33 @@ TQTextFormat::~TQTextFormat()
}
TQTextFormat::TQTextFormat()
- : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
+ : fm( TQFontMetrics( fn ) ), linkColor( true ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = tqApp->font().pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
collection = 0;
}
TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
- : fm( TQFontMetrics( fn ) ), linkColor( TRUE ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
+ : fm( TQFontMetrics( fn ) ), linkColor( true ), logicalFontSize( 3 ), stdSize( tqApp->font().pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = tqApp->font().pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
collection = 0;
fn = TQFont( style->fontFamily(),
@@ -240,7 +240,7 @@ TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
hei = fm.lineSpacing();
asc = fm.ascent() + (fm.leading()+1)/2;
dsc = fm.descent();
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
memset( widths, 0, 256 );
generateKey();
@@ -248,14 +248,14 @@ TQTextFormat::TQTextFormat( const TQStyleSheetItem *style )
}
TQTextFormat::TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatCollection *parent )
- : fn( f ), col( c ), fm( TQFontMetrics( f ) ), linkColor( TRUE ),
+ : fn( f ), col( c ), fm( TQFontMetrics( f ) ), linkColor( true ),
logicalFontSize( 3 ), stdSize( f.pointSize() )
{
ref = 0;
- usePixelSizes = FALSE;
+ usePixelSizes = false;
if ( stdSize == -1 ) {
stdSize = f.pixelSize();
- usePixelSizes = TRUE;
+ usePixelSizes = true;
}
collection = parent;
leftBearing = fm.minLeftBearing();
@@ -263,7 +263,7 @@ TQTextFormat::TQTextFormat( const TQFont &f, const TQColor &c, TQTextFormatColle
hei = fm.lineSpacing();
asc = fm.ascent() + (fm.leading()+1)/2;
dsc = fm.descent();
- missp = FALSE;
+ missp = false;
ha = AlignNormal;
memset( widths, 0, 256 );
generateKey();
@@ -475,7 +475,7 @@ void TQTextParagraph::setSelection( int id, int start, int end )
sel.start = start;
sel.end = end;
(*mSelections)[ id ] = sel;
- setChanged( TRUE, TRUE );
+ setChanged( true, true );
}
void TQTextParagraph::removeSelection( int id )
@@ -484,7 +484,7 @@ void TQTextParagraph::removeSelection( int id )
return;
if ( mSelections )
mSelections->remove( id );
- setChanged( TRUE, TRUE );
+ setChanged( true, true );
}
int TQTextParagraph::selectionStart( int id ) const
@@ -509,16 +509,16 @@ int TQTextParagraph::selectionEnd( int id ) const
bool TQTextParagraph::hasSelection( int id ) const
{
- return mSelections ? mSelections->contains( id ) : FALSE;
+ return mSelections ? mSelections->contains( id ) : false;
}
bool TQTextParagraph::fullSelected( int id ) const
{
if ( !mSelections )
- return FALSE;
+ return false;
TQMap<int, TQTextParagraphSelection>::ConstIterator it = mSelections->find( id );
if ( it == mSelections->end() )
- return FALSE;
+ return false;
return ( *it ).start == 0 && ( *it ).end == str->length() - 1;
}
diff --git a/src/kernel/tqrichtext_p.h b/src/kernel/tqrichtext_p.h
index 11dfcc6d1..2d75c779b 100644
--- a/src/kernel/tqrichtext_p.h
+++ b/src/kernel/tqrichtext_p.h
@@ -103,7 +103,7 @@ class TQ_EXPORT TQTextStringChar
public:
// this is never called, initialize variables in TQTextString::insert()!!!
- TQTextStringChar() : nobreak(FALSE), lineStart( 0 ), type( Regular ) {d.format=0;}
+ TQTextStringChar() : nobreak(false), lineStart( 0 ), type( Regular ) {d.format=0;}
~TQTextStringChar();
struct CustomData
@@ -195,7 +195,7 @@ public:
void insert( int index, const TQString &s, TQTextFormat *f );
void insert( int index, const TQChar *unicode, int len, TQTextFormat *f );
- void insert( int index, TQTextStringChar *c, bool doAddRefFormat = FALSE );
+ void insert( int index, TQTextStringChar *c, bool doAddRefFormat = false );
void truncate( int index );
void remove( int index, int len );
void clear();
@@ -206,7 +206,7 @@ public:
bool isBidi() const;
bool isRightToLeft() const;
TQChar::Direction direction() const;
- void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = TRUE; }
+ void setDirection( TQChar::Direction d ) { dir = d; bidiDirty = true; }
TQMemArray<TQTextStringChar> rawData() const { return data.copy(); }
@@ -338,13 +338,13 @@ public:
void gotoEnd();
void gotoPageUp( int visibleHeight );
void gotoPageDown( int visibleHeight );
- void gotoNextWord( bool onlySpace = FALSE );
- void gotoPreviousWord( bool onlySpace = FALSE );
+ void gotoNextWord( bool onlySpace = false );
+ void gotoPreviousWord( bool onlySpace = false );
void gotoWordLeft();
void gotoWordRight();
void insert( const TQString &s, bool checkNewLine, TQMemArray<TQTextStringChar> *formatting = 0 );
- void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE );
+ void splitAndInsertEmptyParagraph( bool ind = true, bool updateIds = true );
bool remove();
bool removePreviousChar();
void indent();
@@ -364,8 +364,8 @@ public:
int totalOffsetX() const; // total document offset
int totalOffsetY() const; // total document offset
- bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, FALSE ); }
- bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, TRUE, TRUE ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s ) { return place( pos, s, false ); }
+ bool place( const TQPoint &pos, TQTextParagraph *s, bool link ) { return place( pos, s, link, true, true ); }
bool place( const TQPoint &pos, TQTextParagraph *s, bool link, bool loosePlacing, bool matchBetweenCharacters );
void restoreState();
@@ -426,7 +426,7 @@ Q_TEMPLATE_EXTERN template class TQ_EXPORT TQPtrList<TQTextCommand>;
class TQ_EXPORT TQTextCommandHistory
{
public:
- TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); }
+ TQTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( true ); }
virtual ~TQTextCommandHistory();
void clear() { history.clear(); current = -1; }
@@ -490,7 +490,7 @@ public:
TQRect geometry() const { return TQRect( xpos, ypos, width, height ); }
- virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint & );
virtual bool next( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -552,7 +552,7 @@ public:
void draw(TQPainter* p, int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected );
TQString richText() const;
- bool ownLine() const { return TRUE; }
+ bool ownLine() const { return true; }
private:
int tmpheight;
@@ -702,14 +702,14 @@ public:
void draw( TQPainter* p, int x, int y, int cx, int cy, int cw, int ch,
const TQColorGroup& cg, bool selected );
- bool noErase() const { return TRUE; }
- bool ownLine() const { return TRUE; }
+ bool noErase() const { return true; }
+ bool ownLine() const { return true; }
Placement placement() const { return place; }
- bool isNested() const { return TRUE; }
+ bool isNested() const { return true; }
void resize( int nwidth );
virtual void invalidate();
- virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = FALSE );
+ virtual bool enter( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, bool atEnd = false );
virtual bool enterAt( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy, const TQPoint &pos );
virtual bool next( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
virtual bool prev( TQTextCursor *c, TQTextDocument *&doc, TQTextParagraph *&parag, int &idx, int &ox, int &oy );
@@ -843,7 +843,7 @@ public:
bool invertSelectionText( int id ) const;
void setSelectionColor( int id, const TQColor &c );
void setInvertSelectionText( int id, bool b );
- bool hasSelection( int id, bool visible = FALSE ) const;
+ bool hasSelection( int id, bool visible = false ) const;
void setSelectionStart( int id, const TQTextCursor &cursor );
bool setSelectionEnd( int id, const TQTextCursor &cursor );
void selectAll( int id );
@@ -856,7 +856,7 @@ public:
int numSelections() const { return nSelections; }
void addSelection( int id );
- TQString selectedText( int id, bool asRichText = FALSE ) const;
+ TQString selectedText( int id, bool asRichText = false ) const;
void removeSelectedText( int id, TQTextCursor *cursor );
void indentSelection( int id );
@@ -901,10 +901,10 @@ public:
void drawParagraph( TQPainter *p, TQTextParagraph *parag, int cx, int cy, int cw, int ch,
TQPixmap *&doubleBuffer, const TQColorGroup &cg,
- bool drawCursor, TQTextCursor *cursor, bool resetChanged = TRUE );
+ bool drawCursor, TQTextCursor *cursor, bool resetChanged = true );
TQTextParagraph *draw( TQPainter *p, int cx, int cy, int cw, int ch, const TQColorGroup &cg,
- bool onlyChanged = FALSE, bool drawCursor = FALSE, TQTextCursor *cursor = 0,
- bool resetChanged = TRUE );
+ bool onlyChanged = false, bool drawCursor = false, TQTextCursor *cursor = 0,
+ bool resetChanged = true );
#ifndef TQT_NO_TEXTCUSTOMITEM
void registerCustomItem( TQTextCustomItem *i, TQTextParagraph *p );
@@ -944,9 +944,9 @@ public:
int undoDepth() const { return commandHistory->undoDepth(); }
int length() const;
- void clear( bool createEmptyParag = FALSE );
+ void clear( bool createEmptyParag = false );
- virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ virtual TQTextParagraph *createParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
void insertChild( TQObject *o ) { TQObject::insertChild( o ); }
void removeChild( TQObject *o ) { TQObject::removeChild( o ); }
void insertChild( TQTextDocument *d ) { childList.append( d ); }
@@ -957,7 +957,7 @@ public:
TQString focusHref() const;
TQString focusName() const;
- void invalidateOriginalText() { oTextValid = FALSE; oText = ""; }
+ void invalidateOriginalText() { oTextValid = false; oText = ""; }
signals:
void minimumWidthChanged( int );
@@ -972,12 +972,12 @@ private:
TQTextCustomItem* parseTable( const TQMap<TQString, TQString> &attr, const TQTextFormat &fmt,
const TQChar* doc, int length, int& pos, TQTextParagraph *curpar );
#endif
- bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = FALSE );
+ bool eatSpace(const TQChar* doc, int length, int& pos, bool includeNbsp = false );
bool eat(const TQChar* doc, int length, int& pos, TQChar c);
TQString parseOpenTag(const TQChar* doc, int length, int& pos, TQMap<TQString, TQString> &attr, bool& emptyTag);
TQString parseCloseTag( const TQChar* doc, int length, int& pos );
TQChar parseHTMLSpecialChar(const TQChar* doc, int length, int& pos);
- TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = TRUE);
+ TQString parseWord(const TQChar* doc, int length, int& pos, bool lower = true);
TQChar parseChar(const TQChar* doc, int length, int& pos, TQStyleSheetItem::WhiteSpaceMode wsm );
void setRichTextInternal( const TQString &text, TQTextCursor* cursor = 0, const TQTextFormat *initialFormat = 0 );
void setRichTextMarginsInternal( TQPtrList< TQPtrVector<TQStyleSheetItem> >& styles, TQTextParagraph* stylesPar );
@@ -1170,7 +1170,7 @@ class TQ_EXPORT TQTextParagraph
friend class TQSyntaxHighlighter;
public:
- TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = TRUE );
+ TQTextParagraph( TQTextDocument *d, TQTextParagraph *pr = 0, TQTextParagraph *nx = 0, bool updateIds = true );
~TQTextParagraph();
TQTextString *string() const;
@@ -1178,7 +1178,7 @@ public:
int leftGap() const;
int length() const; // maybe remove later
- void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; }
+ void setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = true; }
TQStyleSheetItem::ListStyle listStyle() const { return (TQStyleSheetItem::ListStyle)lstyle; }
void setListItem( bool li );
bool isListItem() const { return litem; }
@@ -1210,7 +1210,7 @@ public:
void insert( int index, const TQString &s );
void insert( int index, const TQChar *unicode, int len );
- void append( const TQString &s, bool reallyAtEnd = FALSE );
+ void append( const TQString &s, bool reallyAtEnd = false );
void truncate( int index );
void remove( int index, int len );
void join( TQTextParagraph *s );
@@ -1218,11 +1218,11 @@ public:
void invalidate( int chr );
void move( int &dy );
- void format( int start = -1, bool doMove = TRUE );
+ void format( int start = -1, bool doMove = true );
bool isValid() const;
bool hasChanged() const;
- void setChanged( bool b, bool recursive = FALSE );
+ void setChanged( bool b, bool recursive = false );
int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const;
TQTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const;
@@ -1257,12 +1257,12 @@ public:
TQMap<int, TQTextLineStart*> &lineStartList();
- void setFormat( int index, int len, TQTextFormat *f, bool useCollection = TRUE, int flags = -1 );
+ void setFormat( int index, int len, TQTextFormat *f, bool useCollection = true, int flags = -1 );
void setAlignment( int a );
int alignment() const;
- void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = FALSE,
+ void paint( TQPainter &painter, const TQColorGroup &cg, TQTextCursor *cursor = 0, bool drawSelections = false,
int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 );
int topMargin() const;
@@ -1392,7 +1392,7 @@ public:
virtual int format( TQTextDocument *doc, TQTextParagraph *parag, int start, const TQMap<int, TQTextLineStart*> &oldLineStarts ) = 0;
virtual int formatVertically( TQTextDocument* doc, TQTextParagraph* parag );
- bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return FALSE; if ( p && !p->isBreakable() ) return FALSE; return TRUE;}
+ bool isWrapEnabled( TQTextParagraph *p ) const { if ( !wrapEnabled ) return false; if ( p && !p->isBreakable() ) return false; return true;}
int wrapAtColumn() const { return wrapColumn;}
virtual void setWrapEnabled( bool b );
virtual void setWrapAtColumn( int c );
@@ -1474,7 +1474,7 @@ public:
TQTextPreProcessor();
virtual ~TQTextPreProcessor() {}
- virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = TRUE ) = 0;
+ virtual void process( TQTextDocument *doc, TQTextParagraph *, int, bool = true ) = 0;
virtual TQTextFormat *format( int id ) = 0;
};
@@ -1931,12 +1931,12 @@ inline void TQTextParagraph::setBackgroundColor( const TQColor & c )
{
delete bgcol;
bgcol = new TQColor( c );
- setChanged( TRUE );
+ setChanged( true );
}
inline void TQTextParagraph::clearBackgroundColor()
{
- delete bgcol; bgcol = 0; setChanged( TRUE );
+ delete bgcol; bgcol = 0; setChanged( true );
}
inline void TQTextParagraph::append( const TQString &s, bool reallyAtEnd )
@@ -1959,7 +1959,7 @@ inline TQTextParagraph *TQTextParagraph::next() const
inline bool TQTextParagraph::hasAnySelection() const
{
- return mSelections ? !selections().isEmpty() : FALSE;
+ return mSelections ? !selections().isEmpty() : false;
}
inline void TQTextParagraph::setEndState( int s )
diff --git a/src/kernel/tqscriptengine.cpp b/src/kernel/tqscriptengine.cpp
index 36df1fa77..963d2bb3b 100644
--- a/src/kernel/tqscriptengine.cpp
+++ b/src/kernel/tqscriptengine.cpp
@@ -259,7 +259,7 @@ static inline void positionCluster(TQShaperItem *item, int gfrom, int glast)
}
item->advances[gfrom+i] = 0;
}
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
@@ -306,31 +306,31 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
// first char in a run is never (treated as) a mark
int cStart = 0;
- item->attributes[0].mark = FALSE;
- item->attributes[0].clusterStart = TRUE;
+ item->attributes[0].mark = false;
+ item->attributes[0].clusterStart = true;
item->attributes[0].combiningClass = 0;
if (qIsZeroWidthChar(uc[0].unicode())) {
- item->attributes[0].zeroWidth = TRUE;
+ item->attributes[0].zeroWidth = true;
item->advances[0] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else {
- item->attributes[0].zeroWidth = FALSE;
+ item->attributes[0].zeroWidth = false;
}
int lastCat = ::category(uc[0]);
for (int i = 1; i < length; ++i) {
int cat = ::category(uc[i]);
if (qIsZeroWidthChar(uc[i].unicode())) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
- item->attributes[i].zeroWidth = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
+ item->attributes[i].zeroWidth = true;
item->attributes[i].combiningClass = 0;
cStart = i;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
} else if (cat != TQChar::Mark_NonSpacing) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = TRUE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = true;
item->attributes[i].combiningClass = 0;
cStart = i;
} else {
@@ -366,12 +366,12 @@ static void heuristicSetGlyphAttributes(TQShaperItem *item, const TQChar *uc, in
}
}
- item->attributes[i].mark = TRUE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = true;
+ item->attributes[i].clusterStart = false;
item->attributes[i].combiningClass = cmb;
logClusters[i] = cStart;
item->advances[i] = 0;
- item->has_positioning = TRUE;
+ item->has_positioning = true;
}
if (lastCat == TQChar::Separator_Space)
@@ -395,11 +395,11 @@ static bool basic_shape(TQShaperItem *item)
{
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
// --------------------------------------------------------------------------------------------------------------------------------------------
@@ -436,7 +436,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
@@ -467,7 +467,7 @@ static bool hebrew_shape(TQShaperItem *item)
for (i = 1; i < item->length; ++i) {
ushort base = shapedChars[slen-1].unicode();
ushort shaped = 0;
- bool invalid = FALSE;
+ bool invalid = false;
if (uc[i].unicode() == Dagesh) {
if (base >= 0x5d0
&& base <= 0x5ea
@@ -480,7 +480,7 @@ static bool hebrew_shape(TQShaperItem *item)
} else if (base == 0xfb2a || base == 0xfb2b /* Shin with Shin or Sin dot */) {
shaped = base + 2;
} else {
- invalid = TRUE;
+ invalid = true;
}
} else if (uc[i].unicode() == ShinDot) {
if (base == 0x05e9)
@@ -488,14 +488,14 @@ static bool hebrew_shape(TQShaperItem *item)
else if (base == 0xfb49)
shaped = 0xfb2c;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == SinDot) {
if (base == 0x05e9)
shaped = 0xfb2b;
else if (base == 0xfb49)
shaped = 0xfb2d;
else
- invalid = TRUE;
+ invalid = true;
} else if (uc[i].unicode() == Patah) {
if (base == 0x5d0)
shaped = 0xfb2e;
@@ -516,8 +516,8 @@ static bool hebrew_shape(TQShaperItem *item)
if (invalid) {
shapedChars[slen] = 0x25cc;
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
++slen;
@@ -531,13 +531,13 @@ static bool hebrew_shape(TQShaperItem *item)
if (!shaped) {
shapedChars[slen] = uc[i];
if (::category(uc[i]) != TQChar::Mark_NonSpacing) {
- item->attributes[slen].clusterStart = TRUE;
- item->attributes[slen].mark = FALSE;
+ item->attributes[slen].clusterStart = true;
+ item->attributes[slen].mark = false;
item->attributes[slen].combiningClass = 0;
cluster_start = slen;
} else {
- item->attributes[slen].clusterStart = FALSE;
- item->attributes[slen].mark = TRUE;
+ item->attributes[slen].clusterStart = false;
+ item->attributes[slen].mark = true;
item->attributes[slen].combiningClass = ::combiningClass(uc[i]);
}
++slen;
@@ -547,7 +547,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->font->stringToCMap(shapedChars, slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < item->num_glyphs; ++i) {
if (item->attributes[i].mark)
item->advances[i] = 0;
@@ -556,7 +556,7 @@ static bool hebrew_shape(TQShaperItem *item)
if (item->length > 256)
::free(shapedChars);
- return TRUE;
+ return true;
}
// these groups correspond to the groups defined in the Unicode standard.
@@ -957,7 +957,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
break;
default:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastGroup = ArabicNone;
@@ -1005,7 +1005,7 @@ static void getArabicProperties(const unsigned short *chars, int len, TQArabicPr
lastGroup = Noon;
break;
case ArabicGroupsEnd:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
lastPos = i;
@@ -1451,10 +1451,10 @@ static void shapedString(const TQString *uc, int from, int len, TQChar *shapeBuf
// ##### Fixme
//attributes[gpos].zeroWidth = zeroWidth;
if (::category(*ch) == TQChar::Mark_NonSpacing) {
- attributes[gpos].mark = TRUE;
+ attributes[gpos].mark = true;
// tqDebug("glyph %d (char %d) is mark!", gpos, i);
} else {
- attributes[gpos].mark = FALSE;
+ attributes[gpos].mark = false;
clusterStart = data - shapeBuffer;
}
attributes[gpos].clusterStart = !attributes[gpos].mark;
@@ -1524,7 +1524,7 @@ static bool arabicSyriacOpenTypeShape(TQOpenType *openType, TQShaperItem *item,
int nglyphs = item->num_glyphs;
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
unsigned short *logClusters = item->log_clusters;
@@ -1613,13 +1613,13 @@ static bool arabic_shape(TQShaperItem *item)
if (item->font->stringToCMap((TQChar *)shapedChars.data(), slen, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (int i = 0; i < slen; ++i)
if (item->attributes[i].mark)
item->advances[i] = 0;
qt_heuristicPosition(item);
- return TRUE;
+ return true;
}
#if defined(TQ_WS_X11)
diff --git a/src/kernel/tqscriptengine_x11.cpp b/src/kernel/tqscriptengine_x11.cpp
index 5d22fdf49..7d997457c 100644
--- a/src/kernel/tqscriptengine_x11.cpp
+++ b/src/kernel/tqscriptengine_x11.cpp
@@ -71,7 +71,7 @@ static bool thaana_shape(TQShaperItem *item)
openType->selectScript(TQFont::Thaana);
if (item->font->stringToCMap(item->string->unicode()+item->from, item->length, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
heuristicSetGlyphAttributes(item);
openType->shape(item);
return openType->positionAndAdd(item);
@@ -1252,7 +1252,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (item->num_glyphs < len+4) {
item->num_glyphs = len+4;
- return FALSE;
+ return false;
}
TQVarLengthArray<unsigned short> reordered(len+4);
@@ -1283,7 +1283,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (len != 1) {
unsigned short *uc = reordered.data();
- bool beginsWithRa = FALSE;
+ bool beginsWithRa = false;
// Rule 1: find base consonant
//
@@ -1306,7 +1306,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
beginsWithRa = (properties & HasReph) && ((len > 2) && *uc == ra && *(uc+1) == halant);
if (beginsWithRa && form(*(uc+2)) == Control)
- beginsWithRa = FALSE;
+ beginsWithRa = false;
base = (beginsWithRa ? 2 : 0);
IDEBUG(" length = %d, beginsWithRa = %d, base=%d", len, beginsWithRa, base);
@@ -1320,7 +1320,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
// figure out possible base glyphs
memset(position.data(), 0, len);
if (script == TQFont::Devanagari || script == TQFont::Gujarati) {
- bool vattu = FALSE;
+ bool vattu = false;
for (i = base; i < len; ++i) {
position[i] = form(uc[i]);
if (position[i] == Consonant) {
@@ -1552,22 +1552,22 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (item->font->stringToCMap((const TQChar *)reordered.data(), len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
IDEBUG(" base=%d, reph=%d", base, reph);
IDEBUG("reordered:");
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, reordered[i]);
}
// now we have the syllable in the right order, and can start running it through open type.
- bool control = FALSE;
+ bool control = false;
for (i = 0; i < len; ++i)
control |= (form(reordered[i]) == Control);
@@ -1618,7 +1618,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
if (script == TQFont::Devanagari || script == TQFont::Gujarati) {
// vattu glyphs need this aswell
- bool vattu = FALSE;
+ bool vattu = false;
for (i = base-2; i > 1; --i) {
if (form(reordered[i]) == Consonant) {
vattu = (!vattu && reordered[i] == ra);
@@ -1694,8 +1694,8 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
}
}
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
if (control) {
IDEBUG("found a control char in the syllable");
@@ -1716,9 +1716,9 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
}
#endif
- item->attributes[0].clusterStart = TRUE;
+ item->attributes[0].clusterStart = true;
IDEBUG("<<<<<<");
- return TRUE;
+ return true;
}
@@ -1732,7 +1732,7 @@ static bool indic_shape_syllable(TQOpenType *openType, TQShaperItem *item, bool
*/
static int indic_nextSyllableBoundary(int script, const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
IDEBUG("indic_nextSyllableBoundary: start=%d, end=%d", start, end);
const TQChar *uc = s.unicode()+start;
@@ -1743,7 +1743,7 @@ static int indic_nextSyllableBoundary(int script, const TQString &s, int start,
if (state != Consonant && state != IndependentVowel) {
if (state != Other)
- *invalid = TRUE;
+ *invalid = true;
goto finish;
}
@@ -1846,7 +1846,7 @@ static bool indic_shape(TQShaperItem *item)
if (!indic_shape_syllable(openType, &syllable, invalid)) {
IDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -1864,7 +1864,7 @@ static bool indic_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
@@ -1877,12 +1877,12 @@ static void indic_attributes(int script, const TQString &text, int from, int len
while (i < len) {
bool invalid;
int boundary = indic_nextSyllableBoundary(script, text, from+i, end, &invalid) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -1932,13 +1932,13 @@ static void thaiWordBreaks(const TQChar *string, const int len, TQCharAttributes
numbreaks = th_brk(cstr.data(),break_positions, numbreaks);
}
- attributes[0].softBreak = TRUE;
+ attributes[0].softBreak = true;
int i;
for (i = 1; i < len; ++i)
- attributes[i].softBreak = FALSE;
+ attributes[i].softBreak = false;
for (i = 0; i < numbreaks; ++i)
- attributes[break_positions[i]].softBreak = TRUE;
+ attributes[break_positions[i]].softBreak = true;
if (break_positions != brp)
delete [] break_positions;
@@ -2042,7 +2042,7 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->num_glyphs < item->length + 4) {
item->num_glyphs = item->length + 4;
- return FALSE;
+ return false;
}
int i;
@@ -2058,13 +2058,13 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->font->stringToCMap(str, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < item->length; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, str[i].unicode());
}
@@ -2075,13 +2075,13 @@ static bool tibetan_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
openType->selectScript(TQFont::Tibetan, tibetan_features);
openType->shape(item);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
}
#endif
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
@@ -2097,7 +2097,7 @@ static int tibetan_nextSyllableBoundary(const TQString &s, int start, int end, b
if (state != TibetanHeadConsonant) {
if (state != TibetanOther)
- *invalid = TRUE;
+ *invalid = true;
goto finish;
}
@@ -2125,7 +2125,7 @@ static int tibetan_nextSyllableBoundary(const TQString &s, int start, int end, b
}
finish:
- *invalid = FALSE;
+ *invalid = false;
return start+pos;
}
@@ -2161,7 +2161,7 @@ static bool tibetan_shape(TQShaperItem *item)
syllable.num_glyphs = item->num_glyphs - first_glyph;
if (!tibetan_shape_syllable(openType, &syllable, invalid)) {
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -2172,7 +2172,7 @@ static bool tibetan_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void tibetan_attributes(int script, const TQString &text, int from, int len, TQCharAttributes *attributes)
@@ -2187,12 +2187,12 @@ static void tibetan_attributes(int script, const TQString &text, int from, int l
bool invalid;
int boundary = tibetan_nextSyllableBoundary(text, from+i, end, &invalid) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -2484,7 +2484,7 @@ static const signed char khmerStateTable[][CC_COUNT] =
//
static inline int khmer_nextSyllableBoundary(const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
const TQChar *uc = s.unicode() + start;
int state = 0;
int pos = start;
@@ -2710,14 +2710,14 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
KHDEBUG("after shaping: len=%d", len);
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
KHDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
}
@@ -2745,8 +2745,8 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
} else
#endif
{
@@ -2754,8 +2754,8 @@ static bool khmer_shape_syllable(TQOpenType *openType, TQShaperItem *item)
Q_UNUSED(openType);
}
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool khmer_shape(TQShaperItem *item)
@@ -2792,7 +2792,7 @@ static bool khmer_shape(TQShaperItem *item)
if (!khmer_shape_syllable(openType, &syllable)) {
KHDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -2810,7 +2810,7 @@ static bool khmer_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void khmer_attributes( int script, const TQString &text, int from, int len, TQCharAttributes *attributes )
@@ -2825,12 +2825,12 @@ static void khmer_attributes( int script, const TQString &text, int from, int le
bool invalid;
int boundary = khmer_nextSyllableBoundary( text, from+i, end, &invalid ) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if ( boundary > len-1 ) boundary = len;
i++;
while ( i < boundary ) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
@@ -3008,7 +3008,7 @@ static const signed char mymrStateTable[][Mymr_CC_COUNT] =
//
static inline int myanmar_nextSyllableBoundary(const TQString &s, int start, int end, bool *invalid)
{
- *invalid = FALSE;
+ *invalid = false;
const TQChar *uc = s.unicode() + start;
int state = 0;
int pos = start;
@@ -3152,7 +3152,7 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
++len;
}
- bool lastWasVirama = FALSE;
+ bool lastWasVirama = false;
int basePos = -1;
// copy the rest of the syllable to the output, inserting the kinzi
// at the correct place
@@ -3217,14 +3217,14 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
if (item->font->stringToCMap((const TQChar *)reordered, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
MMDEBUG("after shaping: len=%d", len);
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
MMDEBUG(" %d: %4x property=%x", i, reordered[i], properties[i]);
}
@@ -3252,8 +3252,8 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
}
openType->shape(item, where);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
} else
#endif
{
@@ -3261,8 +3261,8 @@ static bool myanmar_shape_syllable(TQOpenType *openType, TQShaperItem *item, boo
Q_UNUSED(openType);
}
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool myanmar_shape(TQShaperItem *item)
@@ -3299,7 +3299,7 @@ static bool myanmar_shape(TQShaperItem *item)
if (!myanmar_shape_syllable(openType, &syllable, invalid)) {
MMDEBUG("syllable shaping failed, syllable requests %d glyphs", syllable.num_glyphs);
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
@@ -3317,7 +3317,7 @@ static bool myanmar_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
static void myanmar_attributes( int script, const TQString &text, int from, int len, TQCharAttributes *attributes )
@@ -3332,14 +3332,14 @@ static void myanmar_attributes( int script, const TQString &text, int from, int
bool invalid;
int boundary = myanmar_nextSyllableBoundary( text, from+i, end, &invalid ) - from;
- attributes[i].charStop = TRUE;
- attributes[i].softBreak = TRUE;
+ attributes[i].charStop = true;
+ attributes[i].softBreak = true;
if ( boundary > len-1 ) boundary = len;
i++;
while ( i < boundary ) {
- attributes[i].charStop = FALSE;
- attributes[i].softBreak = FALSE;
+ attributes[i].charStop = false;
+ attributes[i].softBreak = false;
++uc;
++i;
}
@@ -3501,12 +3501,12 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
if (item->font->stringToCMap(ch, len, item->glyphs, item->advances,
&item->num_glyphs, item->flags & TQTextEngine::RightToLeft) != TQFontEngine::NoError)
- return FALSE;
+ return false;
for (i = 0; i < len; i++) {
- item->attributes[i].mark = FALSE;
- item->attributes[i].clusterStart = FALSE;
+ item->attributes[i].mark = false;
+ item->attributes[i].clusterStart = false;
item->attributes[i].justification = 0;
- item->attributes[i].zeroWidth = FALSE;
+ item->attributes[i].zeroWidth = false;
IDEBUG(" %d: %4x", i, ch[i].unicode());
}
@@ -3519,14 +3519,14 @@ static bool hangul_shape_syllable(TQOpenType *openType, TQShaperItem *item)
item->log_clusters = logClusters.data();
openType->shape(item);
- if (!openType->positionAndAdd(item, FALSE))
- return FALSE;
+ if (!openType->positionAndAdd(item, false))
+ return false;
}
#endif
- item->attributes[0].clusterStart = TRUE;
- return TRUE;
+ item->attributes[0].clusterStart = true;
+ return true;
}
static bool hangul_shape(TQShaperItem *item)
@@ -3535,10 +3535,10 @@ static bool hangul_shape(TQShaperItem *item)
const TQChar *uc = item->string->unicode() + item->from;
- bool allPrecomposed = TRUE;
+ bool allPrecomposed = true;
for (int i = 0; i < item->length; ++i) {
if (!hangul_isPrecomposed(uc[i].unicode())) {
- allPrecomposed = FALSE;
+ allPrecomposed = false;
break;
}
}
@@ -3573,7 +3573,7 @@ static bool hangul_shape(TQShaperItem *item)
syllable.num_glyphs = item->num_glyphs - first_glyph;
if (!hangul_shape_syllable(openType, &syllable)) {
item->num_glyphs += syllable.num_glyphs;
- return FALSE;
+ return false;
}
item->has_positioning |= syllable.has_positioning;
// fix logcluster array
@@ -3583,7 +3583,7 @@ static bool hangul_shape(TQShaperItem *item)
first_glyph += syllable.num_glyphs;
}
item->num_glyphs = first_glyph;
- return TRUE;
+ return true;
}
return basic_shape(item);
@@ -3600,12 +3600,12 @@ static void hangul_attributes(int script, const TQString &text, int from, int le
while (i < len) {
int boundary = hangul_nextSyllableBoundary(text, from+i, end) - from;
- attributes[i].charStop = TRUE;
+ attributes[i].charStop = true;
if (boundary > len-1) boundary = len;
i++;
while (i < boundary) {
- attributes[i].charStop = FALSE;
+ attributes[i].charStop = false;
++uc;
++i;
}
diff --git a/src/kernel/tqsignal.cpp b/src/kernel/tqsignal.cpp
index 073b61949..f8f918bb2 100644
--- a/src/kernel/tqsignal.cpp
+++ b/src/kernel/tqsignal.cpp
@@ -114,7 +114,7 @@
TQSignal::TQSignal( TQObject *parent, const char *name )
: TQObject( parent, name )
{
- isSignal = TRUE;
+ isSignal = true;
#ifndef TQT_NO_VARIANT
val = 0;
#endif
@@ -128,7 +128,7 @@ TQSignal::~TQSignal()
{
}
#ifndef TQT_NO_VARIANT
-// Returns TRUE if it matches ".+(.*int.*"
+// Returns true if it matches ".+(.*int.*"
static inline bool intSignature( const char *member )
{
TQCString s( member );
diff --git a/src/kernel/tqsignalmapper.cpp b/src/kernel/tqsignalmapper.cpp
index 08a7b9400..fe9b9a7a4 100644
--- a/src/kernel/tqsignalmapper.cpp
+++ b/src/kernel/tqsignalmapper.cpp
@@ -60,7 +60,7 @@ class TQSignalMapperData {
public:
TQSignalMapperData()
{
- dict.setAutoDelete( TRUE );
+ dict.setAutoDelete( true );
}
TQPtrDict<TQSignalMapperRec> dict;
diff --git a/src/kernel/tqsimplerichtext.cpp b/src/kernel/tqsimplerichtext.cpp
index c2808b1cd..b78d2ad28 100644
--- a/src/kernel/tqsimplerichtext.cpp
+++ b/src/kernel/tqsimplerichtext.cpp
@@ -72,7 +72,7 @@ void TQSimpleRichTextData::adjustSize(TQPainter *p) {
}
}
cachedWidth = doc->width();
- cachedWidthWithPainter = FALSE;
+ cachedWidthWithPainter = false;
}
/*!
@@ -138,7 +138,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -184,7 +184,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
{
d = new TQSimpleRichTextData;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->font = fnt;
d->doc = new TQTextDocument( 0 );
d->doc->setTextFormat( TQt::RichText );
@@ -192,7 +192,7 @@ TQSimpleRichText::TQSimpleRichText( const TQString& text, const TQFont& fnt,
d->doc->setStyleSheet( (TQStyleSheet*)sheet );
d->doc->setDefaultFormat( fnt, TQColor() );
d->doc->flow()->setPageSize( pageBreak );
- d->doc->setPageBreakEnabled( TRUE );
+ d->doc->setPageBreakEnabled( true );
#ifndef TQT_NO_MIME
d->doc->setMimeSourceFactory( (TQMimeSourceFactory*)factory );
#endif
@@ -224,7 +224,7 @@ void TQSimpleRichText::setWidth( int w )
return;
d->doc->formatter()->setAllowBreakInWords( d->doc->isPageBreakEnabled() );
d->cachedWidth = w;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->doLayout( 0, w );
}
@@ -248,7 +248,7 @@ void TQSimpleRichText::setWidth( TQPainter *p, int w )
(p->device()->devType() == TQInternal::Printer)) );
p->save();
d->cachedWidth = w;
- d->cachedWidthWithPainter = TRUE;
+ d->cachedWidthWithPainter = true;
d->doc->doLayout( p, w );
p->restore();
}
@@ -382,13 +382,13 @@ TQString TQSimpleRichText::anchorAt( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
TQTextCursor c( d->doc );
- c.place( pos, d->doc->firstParagraph(), TRUE );
+ c.place( pos, d->doc->firstParagraph(), true );
return c.paragraph()->at( c.index() )->anchorHref();
}
/*!
- Returns TRUE if \a pos is within a text line of the rich text
- object; otherwise returns FALSE.
+ Returns true if \a pos is within a text line of the rich text
+ object; otherwise returns false.
*/
bool TQSimpleRichText::inText( const TQPoint& pos ) const
@@ -396,7 +396,7 @@ bool TQSimpleRichText::inText( const TQPoint& pos ) const
if ( d->cachedWidth < 0 )
d->adjustSize();
if ( pos.y() > d->doc->height() )
- return FALSE;
+ return false;
TQTextCursor c( d->doc );
c.place( pos, d->doc->firstParagraph() );
return c.totalOffsetX() + c.paragraph()->at( c.index() )->x +
@@ -413,7 +413,7 @@ void TQSimpleRichText::setDefaultFont( const TQFont &f )
return;
d->font = f;
d->cachedWidth = -1;
- d->cachedWidthWithPainter = FALSE;
+ d->cachedWidthWithPainter = false;
d->doc->setDefaultFormat( f, TQColor() );
d->doc->setText( d->doc->originalText(), d->doc->context() );
}
diff --git a/src/kernel/tqsimplerichtext.h b/src/kernel/tqsimplerichtext.h
index 45ddd6b10..9fcae3649 100644
--- a/src/kernel/tqsimplerichtext.h
+++ b/src/kernel/tqsimplerichtext.h
@@ -64,7 +64,7 @@ public:
TQSimpleRichText( const TQString& text, const TQFont& fnt,
const TQString& context, const TQStyleSheet* sheet,
const TQMimeSourceFactory* factory, int pageBreak = -1,
- const TQColor& linkColor = TQt::blue, bool linkUnderline = TRUE );
+ const TQColor& linkColor = TQt::blue, bool linkUnderline = true );
~TQSimpleRichText();
void setWidth( int );
diff --git a/src/kernel/tqsize.cpp b/src/kernel/tqsize.cpp
index 8a302eaa6..77fb16278 100644
--- a/src/kernel/tqsize.cpp
+++ b/src/kernel/tqsize.cpp
@@ -83,20 +83,20 @@
/*!
\fn bool TQSize::isNull() const
- Returns TRUE if the width is 0 and the height is 0; otherwise
- returns FALSE.
+ Returns true if the width is 0 and the height is 0; otherwise
+ returns false.
*/
/*!
\fn bool TQSize::isEmpty() const
- Returns TRUE if the width is less than or equal to 0, or the height is
- less than or equal to 0; otherwise returns FALSE.
+ Returns true if the width is less than or equal to 0, or the height is
+ less than or equal to 0; otherwise returns false.
*/
/*!
\fn bool TQSize::isValid() const
- Returns TRUE if the width is equal to or greater than 0 and the height is
- equal to or greater than 0; otherwise returns FALSE.
+ Returns true if the width is equal to or greater than 0 and the height is
+ equal to or greater than 0; otherwise returns false.
*/
/*!
@@ -182,7 +182,7 @@ void TQSize::scale( int w, int h, ScaleMode mode )
wd = (TQCOORD)w;
ht = (TQCOORD)h;
} else {
- bool useHeight = TRUE;
+ bool useHeight = true;
int w0 = width();
int h0 = height();
int rw = h * w0 / h0;
@@ -287,13 +287,13 @@ void TQSize::scale( const TQSize &s, ScaleMode mode )
/*!
\fn bool operator==( const TQSize &s1, const TQSize &s2 )
\relates TQSize
- Returns TRUE if \a s1 and \a s2 are equal; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are equal; otherwise returns false.
*/
/*!
\fn bool operator!=( const TQSize &s1, const TQSize &s2 )
\relates TQSize
- Returns TRUE if \a s1 and \a s2 are different; otherwise returns FALSE.
+ Returns true if \a s1 and \a s2 are different; otherwise returns false.
*/
/*!
diff --git a/src/kernel/tqsizegrip.cpp b/src/kernel/tqsizegrip.cpp
index 65b29a1c9..928c8e7dc 100644
--- a/src/kernel/tqsizegrip.cpp
+++ b/src/kernel/tqsizegrip.cpp
@@ -280,7 +280,7 @@ bool TQSizeGrip::eventFilter( TQObject *o, TQEvent *e )
}
#endif
}
- return FALSE;
+ return false;
}
#endif //TQT_NO_SIZEGRIP
diff --git a/src/kernel/tqsizepolicy.h b/src/kernel/tqsizepolicy.h
index 6bb8aa0cf..bab360cc4 100644
--- a/src/kernel/tqsizepolicy.h
+++ b/src/kernel/tqsizepolicy.h
@@ -72,9 +72,9 @@ public:
TQSizePolicy() : data( 0 ) { }
- TQSizePolicy( SizeType hor, SizeType ver, bool hfw = FALSE )
+ TQSizePolicy( SizeType hor, SizeType ver, bool hfw = false )
: data( hor | (ver<<HSize) | (hfw ? (TQ_UINT32)(1<<2*HSize) : 0) ) { }
- TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = FALSE );
+ TQSizePolicy( SizeType hor, SizeType ver, uchar hors, uchar vers, bool hfw = false );
SizeType horData() const { return (SizeType)( data & HMask ); }
SizeType verData() const { return (SizeType)( (data & VMask) >> HSize ); }
diff --git a/src/kernel/tqsocketnotifier.cpp b/src/kernel/tqsocketnotifier.cpp
index 3a3d32a07..e16a35a41 100644
--- a/src/kernel/tqsocketnotifier.cpp
+++ b/src/kernel/tqsocketnotifier.cpp
@@ -154,7 +154,7 @@ TQSocketNotifier::TQSocketNotifier( int socket, Type type, TQObject *parent,
#endif
sockfd = socket;
sntype = type;
- snenabled = TRUE;
+ snenabled = true;
TQApplication::eventLoop()->registerSocketNotifier( this );
}
@@ -164,7 +164,7 @@ TQSocketNotifier::TQSocketNotifier( int socket, Type type, TQObject *parent,
TQSocketNotifier::~TQSocketNotifier()
{
- setEnabled( FALSE );
+ setEnabled( false );
}
@@ -208,14 +208,14 @@ TQSocketNotifier::~TQSocketNotifier()
/*!
\fn bool TQSocketNotifier::isEnabled() const
- Returns TRUE if the notifier is enabled; otherwise returns FALSE.
+ Returns true if the notifier is enabled; otherwise returns false.
\sa setEnabled()
*/
/*!
- Enables the notifier if \a enable is TRUE or disables it if \a
- enable is FALSE.
+ Enables the notifier if \a enable is true or disables it if \a
+ enable is false.
The notifier is enabled by default.
@@ -259,7 +259,7 @@ bool TQSocketNotifier::event( TQEvent *e )
TQObject::event( e ); // will activate filters
if ( e->type() == TQEvent::SockAct ) {
emit activated( sockfd );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/src/kernel/tqsound.cpp b/src/kernel/tqsound.cpp
index c5c64300f..5e7a1c826 100644
--- a/src/kernel/tqsound.cpp
+++ b/src/kernel/tqsound.cpp
@@ -141,7 +141,7 @@ public:
/*!
\fn static bool TQSound::available()
- Returns TRUE if sound support is available; otherwise returns FALSE.
+ Returns true if sound support is available; otherwise returns false.
*/
/*!
@@ -181,9 +181,9 @@ TQSound::~TQSound()
}
/*!
- Returns TRUE if the sound has finished playing; otherwise returns FALSE.
+ Returns true if the sound has finished playing; otherwise returns false.
- \warning On Windows this function always returns TRUE for unlooped sounds.
+ \warning On Windows this function always returns true for unlooped sounds.
*/
bool TQSound::isFinished() const
{
@@ -257,8 +257,8 @@ void TQSound::stop()
/*!
- Returns TRUE if sound facilities exist on the platform; otherwise
- returns FALSE. An application may choose either to notify the user
+ Returns true if sound facilities exist on the platform; otherwise
+ returns false. An application may choose either to notify the user
if sound is crucial to the application or to operate silently
without bothering the user.
diff --git a/src/kernel/tqsound_x11.cpp b/src/kernel/tqsound_x11.cpp
index dba19b144..84999b79f 100644
--- a/src/kernel/tqsound_x11.cpp
+++ b/src/kernel/tqsound_x11.cpp
@@ -58,22 +58,22 @@ static AuBool eventPred(AuServer *, AuEvent *e, AuPointer p)
{
if (e && (e->type == AuEventTypeElementNotify)) {
if (e->auelementnotify.flow == *((AuFlowID *)p))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
class TQAuBucketNAS : public TQAuBucket {
public:
- TQAuBucketNAS(AuBucketID b, AuFlowID f = 0) : id(b), flow(f), stopped(TRUE), numplaying(0) { }
+ TQAuBucketNAS(AuBucketID b, AuFlowID f = 0) : id(b), flow(f), stopped(true), numplaying(0) { }
~TQAuBucketNAS()
{
if ( nas ) {
- AuSync(nas, FALSE);
+ AuSync(nas, false);
AuDestroyBucket(nas, id, NULL);
AuEvent ev;
- while (AuScanEvents(nas, AuEventsQueuedAfterFlush, TRUE, eventPred, &flow, &ev))
+ while (AuScanEvents(nas, AuEventsQueuedAfterFlush, true, eventPred, &flow, &ev))
;
}
}
@@ -142,7 +142,7 @@ void TQAuServerNAS::soundDestroyed(TQObject *o)
if (inprogress) {
TQSound *so = static_cast<TQSound *>(o);
while (inprogress->remove(so))
- ; // Loop while remove returns TRUE
+ ; // Loop while remove returns true
}
}
@@ -175,11 +175,11 @@ void TQAuServerNAS::setDone(TQSound* s)
if (nas) {
decLoop(s);
if (s->loopsRemaining() && !bucket(s)->stopped) {
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
play(s);
} else {
if (--(bucket(s)->numplaying) == 0)
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
inprogress->remove(s);
}
}
@@ -193,7 +193,7 @@ void TQAuServerNAS::play(TQSound* s)
stop(s);
}
- bucket(s)->stopped = FALSE;
+ bucket(s)->stopped = false;
if ( !inprogress )
inprogress = new TQPtrDict<void>;
inprogress->insert(s,(void*)this);
@@ -212,7 +212,7 @@ void TQAuServerNAS::play(TQSound* s)
void TQAuServerNAS::stop(TQSound* s)
{
if (nas && !bucket(s)->stopped) {
- bucket(s)->stopped = TRUE;
+ bucket(s)->stopped = true;
AuStopFlow(nas, bucket(s)->flow, NULL);
AuFlush(nas);
dataReceived();
@@ -256,7 +256,7 @@ public:
void play(const TQString&) { }
void play(TQSound*s) { while(decLoop(s) > 0) /* nothing */ ; }
void stop(TQSound*) { }
- bool okay() { return FALSE; }
+ bool okay() { return false; }
};
TQAuServerNull::TQAuServerNull(TQObject* parent) :
diff --git a/src/kernel/tqstyle.cpp b/src/kernel/tqstyle.cpp
index 7b21783b0..ccf8fb66f 100644
--- a/src/kernel/tqstyle.cpp
+++ b/src/kernel/tqstyle.cpp
@@ -63,7 +63,7 @@ public:
};
TQStyleOption::TQStyleOption(StyleOptionDefault) :
- def(TRUE),
+ def(true),
tb(NULL),
i1(-1),
i2(-1),
@@ -76,7 +76,7 @@ TQStyleOption::TQStyleOption(StyleOptionDefault) :
}
TQStyleOption::TQStyleOption(int in1) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(-1),
@@ -89,7 +89,7 @@ TQStyleOption::TQStyleOption(int in1) :
}
TQStyleOption::TQStyleOption(int in1, int in2) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(in2),
@@ -102,7 +102,7 @@ TQStyleOption::TQStyleOption(int in1, int in2) :
}
TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(in1),
i2(in2),
@@ -115,7 +115,7 @@ TQStyleOption::TQStyleOption(int in1, int in2, int in3, int in4) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(-1),
@@ -129,7 +129,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(in1),
@@ -143,7 +143,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m, int in1) :
}
TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) :
- def(FALSE),
+ def(false),
mi(m),
tb(NULL),
i1(in1),
@@ -157,7 +157,7 @@ TQStyleOption::TQStyleOption(TQMenuItem* m, int in1, int in2) :
}
TQStyleOption::TQStyleOption(const TQColor& c) :
- def(FALSE),
+ def(false),
tb(NULL),
cl(&c),
i1(-1),
@@ -171,7 +171,7 @@ TQStyleOption::TQStyleOption(const TQColor& c) :
}
TQStyleOption::TQStyleOption(TQTab* t) :
- def(FALSE),
+ def(false),
tb(t),
i1(-1),
i2(-1),
@@ -184,7 +184,7 @@ TQStyleOption::TQStyleOption(TQTab* t) :
}
TQStyleOption::TQStyleOption(TQListViewItem* i) :
- def(FALSE),
+ def(false),
tb(NULL),
li(i),
i1(-1),
@@ -198,7 +198,7 @@ TQStyleOption::TQStyleOption(TQListViewItem* i) :
}
TQStyleOption::TQStyleOption(TQCheckListItem* i) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(-1),
i2(-1),
@@ -211,7 +211,7 @@ TQStyleOption::TQStyleOption(TQCheckListItem* i) :
}
TQStyleOption::TQStyleOption(TQt::ArrowType a) :
- def(FALSE),
+ def(false),
tb(NULL),
i1((int)a),
i2(-1),
@@ -224,7 +224,7 @@ TQStyleOption::TQStyleOption(TQt::ArrowType a) :
}
TQStyleOption::TQStyleOption(const TQRect& r) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(r.x()),
i2(r.y()),
@@ -237,7 +237,7 @@ TQStyleOption::TQStyleOption(const TQRect& r) :
}
TQStyleOption::TQStyleOption(TQWidget *w) :
- def(FALSE),
+ def(false),
tb(NULL),
i1(-1),
i2(-1),
@@ -383,8 +383,8 @@ TQStyleOption::TQStyleOption(TQWidget *w) :
/*!
\fn bool TQStyleOption::isDefault() const
- Returns TRUE if the option was constructed with the default
- constructor; otherwise returns FALSE.
+ Returns true if the option was constructed with the default
+ constructor; otherwise returns false.
*/
/*!
@@ -883,7 +883,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
bool clip = (flags & TQt::DontClip) == 0;
if ( clip ) {
if ( pm.width() < w && pm.height() < h ) {
- clip = FALSE;
+ clip = false;
} else {
p->save();
TQRegion cr = TQRect(x, y, w, h);
@@ -917,7 +917,7 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
TQString k;
k.sprintf( "$qt-drawitem-%x", pm.serialNumber() );
TQPixmap *mask = TQPixmapCache::find(k);
- bool del=FALSE;
+ bool del=false;
if ( !mask ) {
mask = new TQPixmap( pm.createHeuristicMask() );
mask->setMask( *((TQBitmap*)mask) );
@@ -1973,19 +1973,19 @@ void TQStyle::drawItem( TQPainter *p, const TQRect &r,
TQt::BackgroundMode BackgroundMode\endlink enum.
\value SH_ScrollBar_MiddleClickAbsolutePosition a boolean value.
- If TRUE, middle clicking on a scrollbar causes the slider to
- jump to that position. If FALSE, the middle clicking is
+ If true, middle clicking on a scrollbar causes the slider to
+ jump to that position. If false, the middle clicking is
ignored.
\value SH_ScrollBar_LeftClickAbsolutePosition a boolean value.
- If TRUE, left clicking on a scrollbar causes the slider to
- jump to that position. If FALSE, the left clicking will
+ If true, left clicking on a scrollbar causes the slider to
+ jump to that position. If false, the left clicking will
behave as appropriate for each control.
\value SH_ScrollBar_ScrollWhenPointerLeavesControl a boolean
- value. If TRUE, when clicking a scrollbar SubControl, holding
+ value. If true, when clicking a scrollbar SubControl, holding
the mouse button down and moving the pointer outside the
- SubControl, the scrollbar continues to scroll. If FALSE, the
+ SubControl, the scrollbar continues to scroll. If false, the
scrollbar stops scrolling when the pointer leaves the
SubControl.
@@ -2402,7 +2402,7 @@ void TQStyle::setWidgetActionRequestHook( WidgetActionRequestHook hook ) {
/*!
\fn bool widgetActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request );
- Handles widget action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing.
+ Handles widget action requests. Return false to continue processing in base classes, true to eat the request and halt processing.
*/
bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, WidgetActionRequest request, TQStyleWidgetActionRequestData requestData ) {
bool cbret = false;
@@ -2413,33 +2413,33 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
if (ceData.widgetObjectTypes.contains("TQWidget")) {
TQWidget* widget = reinterpret_cast<TQWidget*>(source);
if (request == WAR_Repaint) {
- widget->repaint(FALSE);
+ widget->repaint(false);
}
else if (request == WAR_RepaintRect) {
- widget->repaint(requestData.rect, FALSE);
+ widget->repaint(requestData.rect, false);
}
else if (request == WAR_EnableMouseTracking) {
- widget->setMouseTracking(TRUE);
+ widget->setMouseTracking(true);
}
else if (request == WAR_DisableMouseTracking) {
- widget->setMouseTracking(FALSE);
+ widget->setMouseTracking(false);
}
else if (request == WAR_SetAutoMask) {
- widget->setAutoMask(TRUE);
+ widget->setAutoMask(true);
}
else if (request == WAR_UnSetAutoMask) {
- widget->setAutoMask(FALSE);
+ widget->setAutoMask(false);
}
else if (request == WAR_SetCheckable) {
TQPopupMenu *pm = dynamic_cast<TQPopupMenu*>(widget);
if (pm) {
- pm->setCheckable(TRUE);
+ pm->setCheckable(true);
}
}
else if (request == WAR_UnSetCheckable) {
TQPopupMenu *pm = dynamic_cast<TQPopupMenu*>(widget);
if (pm) {
- pm->setCheckable(FALSE);
+ pm->setCheckable(false);
}
}
else if (request == WAR_FrameSetStyle) {
@@ -2493,7 +2493,7 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
it2.toFirst();
while ( (w = (TQWidget*)it2.current()) != 0 ) {
++it2;
- w->repaint(FALSE);
+ w->repaint(false);
}
delete l;
}
@@ -2502,13 +2502,13 @@ bool TQStyle::widgetActionRequest( const TQStyleControlElementData &ceData, Cont
else if (request == WAR_SetDefault) {
TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
if (button) {
- button->setDefault(TRUE);
+ button->setDefault(true);
}
}
else if (request == WAR_UnSetDefault) {
TQPushButton *button = dynamic_cast<TQPushButton*>(widget);
if (button) {
- button->setDefault(FALSE);
+ button->setDefault(false);
}
}
else if (request == WAR_SendPaintEvent) {
@@ -2536,7 +2536,7 @@ void TQStyle::setApplicationActionRequestHook( ApplicationActionRequestHook hook
/*!
\fn bool applicationActionRequestHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request );
- Handles application action requests. Return FALSE to continue processing in base classes, TRUE to eat the request and halt processing.
+ Handles application action requests. Return false to continue processing in base classes, true to eat the request and halt processing.
*/
bool TQStyle::applicationActionRequest( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, ApplicationActionRequest request, TQStyleApplicationActionRequestData requestData ) {
bool cbret = false;
diff --git a/src/kernel/tqstyle.h b/src/kernel/tqstyle.h
index 01e091ff9..54ea59cbe 100644
--- a/src/kernel/tqstyle.h
+++ b/src/kernel/tqstyle.h
@@ -103,7 +103,7 @@ public:
TQRect rect() const { return TQRect( i1, i2, i3, i4 ); }
TQWidget* widget() const { return (TQWidget*)p1; }
- TQStyleOption(TQTab* t, TQTab* h) : def(FALSE), tb(t), cli(NULL), tbh(h) {}
+ TQStyleOption(TQTab* t, TQTab* h) : def(false), tb(t), cli(NULL), tbh(h) {}
TQTab* hoverTab() const { return tbh; }
private:
@@ -302,8 +302,8 @@ class TQ_EXPORT TQStyleWidgetActionRequestData {
public:
TQStyleWidgetActionRequestData();
TQStyleWidgetActionRequestData(int metric1, int metric2=0);
- TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = FALSE, const char* className = 0);
- TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = FALSE, const char* className = 0);
+ TQStyleWidgetActionRequestData(TQPalette palette, bool informWidgets = false, const char* className = 0);
+ TQStyleWidgetActionRequestData(TQFont font, bool informWidgets = false, const char* className = 0);
TQStyleWidgetActionRequestData(TQRect rect);
TQStyleWidgetActionRequestData(TQPaintEvent* paintEvent);
~TQStyleWidgetActionRequestData();
diff --git a/src/kernel/tqstylesheet.cpp b/src/kernel/tqstylesheet.cpp
index c03cc792e..afa9fa057 100644
--- a/src/kernel/tqstylesheet.cpp
+++ b/src/kernel/tqstylesheet.cpp
@@ -226,7 +226,7 @@ void TQStyleSheetItem::init()
d->fontsizestep = 0;
d->ncolumns = Undefined;
d->col = TQColor(); // !isValid()
- d->anchor = FALSE;
+ d->anchor = false;
d->align = Undefined;
d->valign = VAlignBaseline;
d->margin[0] = Undefined;
@@ -236,7 +236,7 @@ void TQStyleSheetItem::init()
d->margin[4] = Undefined;
d->list = ListStyleUndefined;
d->whitespacemode = WhiteSpaceModeUndefined;
- d->selfnest = TRUE;
+ d->selfnest = true;
d->lineSpacing = Undefined;
}
@@ -356,8 +356,8 @@ void TQStyleSheetItem::setVerticalAlignment( VerticalAlignment valign )
/*!
- Returns TRUE if the style sets an italic font; otherwise returns
- FALSE.
+ Returns true if the style sets an italic font; otherwise returns
+ false.
\sa setFontItalic(), definesFontItalic()
*/
@@ -367,7 +367,7 @@ bool TQStyleSheetItem::fontItalic() const
}
/*!
- If \a italic is TRUE sets italic for the style; otherwise sets
+ If \a italic is true sets italic for the style; otherwise sets
upright.
\sa fontItalic(), definesFontItalic()
@@ -378,8 +378,8 @@ void TQStyleSheetItem::setFontItalic(bool italic)
}
/*!
- Returns TRUE if the style defines a font shape; otherwise returns
- FALSE. A style does not define any shape until setFontItalic() is
+ Returns true if the style defines a font shape; otherwise returns
+ false. A style does not define any shape until setFontItalic() is
called.
\sa setFontItalic(), fontItalic()
@@ -390,8 +390,8 @@ bool TQStyleSheetItem::definesFontItalic() const
}
/*!
- Returns TRUE if the style sets an underlined font; otherwise
- returns FALSE.
+ Returns true if the style sets an underlined font; otherwise
+ returns false.
\sa setFontUnderline(), definesFontUnderline()
*/
@@ -401,7 +401,7 @@ bool TQStyleSheetItem::fontUnderline() const
}
/*!
- If \a underline is TRUE, sets underline for the style; otherwise
+ If \a underline is true, sets underline for the style; otherwise
sets no underline.
\sa fontUnderline(), definesFontUnderline()
@@ -412,8 +412,8 @@ void TQStyleSheetItem::setFontUnderline(bool underline)
}
/*!
- Returns TRUE if the style defines a setting for the underline
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the underline
+ property of the font; otherwise returns false. A style does not
define this until setFontUnderline() is called.
\sa setFontUnderline(), fontUnderline()
@@ -425,8 +425,8 @@ bool TQStyleSheetItem::definesFontUnderline() const
/*!
- Returns TRUE if the style sets a strike out font; otherwise
- returns FALSE.
+ Returns true if the style sets a strike out font; otherwise
+ returns false.
\sa setFontStrikeOut(), definesFontStrikeOut()
*/
@@ -436,7 +436,7 @@ bool TQStyleSheetItem::fontStrikeOut() const
}
/*!
- If \a strikeOut is TRUE, sets strike out for the style; otherwise
+ If \a strikeOut is true, sets strike out for the style; otherwise
sets no strike out.
\sa fontStrikeOut(), definesFontStrikeOut()
@@ -447,8 +447,8 @@ void TQStyleSheetItem::setFontStrikeOut(bool strikeOut)
}
/*!
- Returns TRUE if the style defines a setting for the strikeOut
- property of the font; otherwise returns FALSE. A style does not
+ Returns true if the style defines a setting for the strikeOut
+ property of the font; otherwise returns false. A style does not
define this until setFontStrikeOut() is called.
\sa setFontStrikeOut(), fontStrikeOut()
@@ -633,7 +633,7 @@ bool TQStyleSheetItem::isAnchor() const
}
/*!
- If \a anc is TRUE, sets this style to be an anchor (hypertext
+ If \a anc is true, sets this style to be an anchor (hypertext
link); otherwise sets it to not be an anchor. Elements in this
style link to other documents or anchors.
@@ -781,22 +781,22 @@ void TQStyleSheetItem::setContexts( const TQString& c)
}
/*!
- Returns TRUE if this style can be nested into an element of style
- \a s; otherwise returns FALSE.
+ Returns true if this style can be nested into an element of style
+ \a s; otherwise returns false.
\sa contexts(), setContexts()
*/
bool TQStyleSheetItem::allowedInContext( const TQStyleSheetItem* s) const
{
if ( d->contxt.isEmpty() )
- return TRUE;
+ return true;
return d->contxt.find( TQChar(' ')+s->name()+TQChar(' ')) != -1;
}
/*!
- Returns TRUE if this style has self-nesting enabled; otherwise
- returns FALSE.
+ Returns true if this style has self-nesting enabled; otherwise
+ returns false.
\sa setSelfNesting()
*/
@@ -1112,7 +1112,7 @@ TQStyleSheet::~TQStyleSheet()
*/
void TQStyleSheet::init()
{
- styles.setAutoDelete( TRUE );
+ styles.setAutoDelete( true );
nullstyle = new TQStyleSheetItem( this,
TQString::fromLatin1("") );
@@ -1126,13 +1126,13 @@ void TQStyleSheet::init()
style->setDisplayMode( TQStyleSheetItem::DisplayBlock );
style = new TQStyleSheetItem( this, TQString::fromLatin1("a") );
- style->setAnchor( TRUE );
+ style->setAnchor( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("em") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("i") );
- style->setFontItalic( TRUE );
+ style->setFontItalic( true );
style = new TQStyleSheetItem( this, TQString::fromLatin1("big") );
style->setLogicalFontSizeStep( 1 );
@@ -1185,7 +1185,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("p") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
style-> setMargin(TQStyleSheetItem::MarginVertical, 12);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("center") );
style->setDisplayMode(TQStyleSheetItem::DisplayBlock);
@@ -1213,7 +1213,7 @@ void TQStyleSheet::init()
style = new TQStyleSheetItem( this, TQString::fromLatin1("li") );
style->setDisplayMode(TQStyleSheetItem::DisplayListItem);
- style->setSelfNesting( FALSE );
+ style->setSelfNesting( false );
style = new TQStyleSheetItem( this, TQString::fromLatin1("code") );
style->setFontFamily( TQString::fromLatin1("Courier New,courier") );
@@ -1258,9 +1258,9 @@ void TQStyleSheet::init()
style->setMargin(TQStyleSheetItem::MarginLeft, 30);
style->setContexts(TQString::fromLatin1("dt dl") );
style = new TQStyleSheetItem( this, TQString::fromLatin1("u") );
- style->setFontUnderline( TRUE);
+ style->setFontUnderline( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("s") );
- style->setFontStrikeOut( TRUE);
+ style->setFontStrikeOut( true);
style = new TQStyleSheetItem( this, TQString::fromLatin1("nobr") );
style->setWhiteSpaceMode( TQStyleSheetItem::WhiteSpaceNoWrap );
@@ -1498,7 +1498,7 @@ TQString TQStyleSheet::escape( const TQString& plain)
string using the current TQStyleSheet::defaultSheet().
\value AutoText The text string is interpreted as for \c RichText
- if TQStyleSheet::mightBeRichText() returns TRUE, otherwise as
+ if TQStyleSheet::mightBeRichText() returns true, otherwise as
\c PlainText.
\value LogText A special, limited text format which is only used
@@ -1506,8 +1506,8 @@ TQString TQStyleSheet::escape( const TQString& plain)
*/
/*!
- Returns TRUE if the string \a text is likely to be rich text;
- otherwise returns FALSE.
+ Returns true if the string \a text is likely to be rich text;
+ otherwise returns false.
This function uses a fast and therefore simple heuristic. It
mainly checks whether there is something that looks like a tag
@@ -1517,18 +1517,18 @@ TQString TQStyleSheet::escape( const TQString& plain)
bool TQStyleSheet::mightBeRichText( const TQString& text)
{
if ( text.isEmpty() )
- return FALSE;
+ return false;
int start = 0;
while ( start < int(text.length()) && text[start].isSpace() )
++start;
if ( text.mid( start, 5 ).lower() == "<!doc" )
- return TRUE;
+ return true;
int open = start;
while ( open < int(text.length()) && text[open] != '<'
&& text[open] != '\n' ) {
if ( text[open] == '&' && text.mid(open+1,3) == "lt;" )
- return TRUE; // support desperate attempt of user to see <...>
+ return true; // support desperate attempt of user to see <...>
++open;
}
if ( open < (int)text.length() && text[open] == '<' ) {
@@ -1541,12 +1541,12 @@ bool TQStyleSheet::mightBeRichText( const TQString& text)
else if ( !tag.isEmpty() && text[i].isSpace() )
break;
else if ( !text[i].isSpace() && (!tag.isEmpty() || text[i] != '!' ) )
- return FALSE; // that's not a tag
+ return false; // that's not a tag
}
return defaultSheet()->item( tag.lower() ) != 0;
}
}
- return FALSE;
+ return false;
}
@@ -1586,10 +1586,10 @@ void TQStyleSheet::scaleFont( TQFont& font, int logicalSize ) const
if ( logicalSize > 7 )
logicalSize = 7;
int baseSize = font.pointSize();
- bool pixel = FALSE;
+ bool pixel = false;
if ( baseSize == -1 ) {
baseSize = font.pixelSize();
- pixel = TRUE;
+ pixel = true;
}
int s;
switch ( logicalSize ) {
diff --git a/src/kernel/tqtextengine.cpp b/src/kernel/tqtextengine.cpp
index 067a21740..1cda53f96 100644
--- a/src/kernel/tqtextengine.cpp
+++ b/src/kernel/tqtextengine.cpp
@@ -86,12 +86,12 @@ struct BidiControl {
};
inline BidiControl( bool rtl )
- : cCtx( 0 ), singleLine( FALSE ) {
+ : cCtx( 0 ), singleLine( false ) {
ctx[0].level = (rtl ? 1 : 0);
- ctx[0].override = FALSE;
+ ctx[0].override = false;
}
- inline void embed( int level, bool override = FALSE ) {
+ inline void embed( int level, bool override = false ) {
if ( ctx[cCtx].level < 61 && cCtx < 61 ) {
(void) ++cCtx;
ctx[cCtx].level = level;
@@ -215,12 +215,12 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl
if ( uc == 0xfffcU || uc == 0x2028U ) {
item.analysis.bidiLevel = level % 2 ? level-1 : level;
item.analysis.script = TQFont::Latin;
- item.isObject = TRUE;
+ item.isObject = true;
s = TQFont::NoScript;
} else if ((uc >= 9 && uc <=13) ||
(category >= TQChar::Separator_Space && category <= TQChar::Separator_Paragraph)) {
item.analysis.script = TQFont::Latin;
- item.isSpace = TRUE;
+ item.isSpace = true;
item.isTab = ( uc == '\t' );
item.analysis.bidiLevel = item.isTab ? control.baseLevel() : level;
s = TQFont::NoScript;
@@ -236,7 +236,7 @@ static void appendItems(TQTextEngine *engine, int &start, int &stop, BidiControl
item.position = i;
items.append( item );
script = s;
- item.isSpace = item.isTab = item.isObject = FALSE;
+ item.isSpace = item.isTab = item.isObject = false;
}
}
++stop;
@@ -248,13 +248,13 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode )
{
BidiControl control( rightToLeft );
if ( mode & TQTextEngine::SingleLine )
- control.singleLine = TRUE;
+ control.singleLine = true;
int sor = 0;
int eor = -1;
// ### should get rid of this!
- bool first = TRUE;
+ bool first = true;
int length = engine->string.length();
@@ -652,7 +652,7 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode )
status.last = dirCurrent;
}
- first = FALSE;
+ first = false;
++current;
}
@@ -807,9 +807,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
if (cls >= TQUnicodeTables::LineBreak_CM)
cls = TQUnicodeTables::LineBreak_ID;
- charAttributes[0].softBreak = FALSE;
+ charAttributes[0].softBreak = false;
charAttributes[0].whiteSpace = (cls == TQUnicodeTables::LineBreak_SP);
- charAttributes[0].charStop = TRUE;
+ charAttributes[0].charStop = true;
bool prevIsHighSurrogate = uc[0].isHighSurrogate();
for (int i = 1; i < len; ++i)
@@ -818,9 +818,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
if (prevIsHighSurrogate && uc[i].isLowSurrogate())
{
prevIsHighSurrogate = false;
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = FALSE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = false;
continue;
}
prevIsHighSurrogate = uc[i].isHighSurrogate();
@@ -829,16 +829,16 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
int category = ::category(uc[i]);
if (category == TQChar::Mark_NonSpacing)
{
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = FALSE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = false;
continue;
}
if (ncls == TQUnicodeTables::LineBreak_SP) {
- charAttributes[i].softBreak = FALSE;
- charAttributes[i].whiteSpace = TRUE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].softBreak = false;
+ charAttributes[i].whiteSpace = true;
+ charAttributes[i].charStop = true;
cls = ncls;
continue;
}
@@ -847,9 +847,9 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
{
// two complex chars (thai or lao), thai_attributes might override, but here
// we do a best guess
- charAttributes[i].softBreak = TRUE;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].softBreak = true;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = true;
cls = ncls;
continue;
}
@@ -868,8 +868,8 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
softBreak = (brk == Dbk);
// tqDebug("char = %c %04x, cls=%d, ncls=%d, brk=%d soft=%d", uc[i].cell(), uc[i].unicode(), cls, ncls, brk, charAttributes[i].softBreak);
charAttributes[i].softBreak = softBreak;
- charAttributes[i].whiteSpace = FALSE;
- charAttributes[i].charStop = TRUE;
+ charAttributes[i].whiteSpace = false;
+ charAttributes[i].charStop = true;
cls = ncls;
}
}
@@ -885,7 +885,7 @@ static void calcLineBreaks(const TQString &str, TQCharAttributes *charAttributes
TQTextEngine::TQTextEngine( const TQString &str, TQFontPrivate *f )
- : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( FALSE ), widthOnly( FALSE )
+ : string( str ), fnt( f ), direction( TQChar::DirON ), haveCharAttributes( false ), widthOnly( false )
{
#ifdef TQ_WS_WIN
if ( !resolvedUsp10 )
@@ -996,7 +996,7 @@ const TQCharAttributes *TQTextEngine::attributes()
attributes( script, string, from, len, charAttributes );
}
- haveCharAttributes = TRUE;
+ haveCharAttributes = true;
return charAttributes;
}
@@ -1115,15 +1115,15 @@ void TQTextEngine::itemize( int mode )
direction = basicDirection( string );
bidiItemize( this, direction == TQChar::DirR, mode );
} else {
- BidiControl control( FALSE );
+ BidiControl control( false );
if ( mode & TQTextEngine::SingleLine )
- control.singleLine = TRUE;
+ control.singleLine = true;
int start = 0;
int stop = string.length() - 1;
appendItems(this, start, stop, control, TQChar::DirL);
}
if ( (mode & WidthOnly) == WidthOnly )
- widthOnly = TRUE;
+ widthOnly = true;
}
glyph_metrics_t TQTextEngine::boundingBox( int from, int len ) const
diff --git a/src/kernel/tqtextengine_p.h b/src/kernel/tqtextengine_p.h
index d3e8ea3ee..4ba2ed942 100644
--- a/src/kernel/tqtextengine_p.h
+++ b/src/kernel/tqtextengine_p.h
@@ -197,8 +197,8 @@ class TQFontEngine;
struct TQScriptItem
{
- inline TQScriptItem() : position( 0 ), isSpace( FALSE ), isTab( FALSE ),
- isObject( FALSE ), hasPositioning( FALSE ),
+ inline TQScriptItem() : position( 0 ), isSpace( false ), isTab( false ),
+ isObject( false ), hasPositioning( false ),
descent( -1 ), ascent( -1 ), width( -1 ),
x( 0 ), y( 0 ), num_glyphs( 0 ), glyph_data_offset( 0 ),
fontEngine( 0 ) { }
diff --git a/src/kernel/tqtextengine_unix.cpp b/src/kernel/tqtextengine_unix.cpp
index 0de67f04a..37a786c2e 100644
--- a/src/kernel/tqtextengine_unix.cpp
+++ b/src/kernel/tqtextengine_unix.cpp
@@ -93,7 +93,7 @@ void TQTextEngine::shape( int item ) const
shaper_item.font = si.fontEngine;
shaper_item.num_glyphs = TQMAX(int(num_glyphs - used), shaper_item.length);
shaper_item.flags = si.analysis.bidiLevel % 2 ? RightToLeft : 0;
- shaper_item.has_positioning = FALSE;
+ shaper_item.has_positioning = false;
while (1) {
ensureSpace(shaper_item.num_glyphs);
diff --git a/src/kernel/tqtextlayout.cpp b/src/kernel/tqtextlayout.cpp
index 0d50e4106..5d424f423 100644
--- a/src/kernel/tqtextlayout.cpp
+++ b/src/kernel/tqtextlayout.cpp
@@ -453,7 +453,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment,
if ( breakItem != i )
itemWidth = 0;
if (itemAttrs->softBreak)
- breakany = FALSE;
+ breakany = false;
breakItem = i;
breakPosition = pos;
// tqDebug("found possible break at item %d, position %d (absolute=%d), w=%d, tmpWidth=%d, tmpItemWidth=%d", breakItem, breakPosition, d->items[breakItem].position+breakPosition, w, tmpWidth, tmpItemWidth);
@@ -633,7 +633,7 @@ bool TQTextLayout::validCursorPosition( int pos ) const
{
const TQCharAttributes *attributes = d->attributes();
if ( pos < 0 || pos > (int)d->string.length() )
- return FALSE;
+ return false;
return attributes[pos].charStop;
}
diff --git a/src/kernel/tqthread.cpp b/src/kernel/tqthread.cpp
index 9a1d1f602..ac6aa0ecb 100644
--- a/src/kernel/tqthread.cpp
+++ b/src/kernel/tqthread.cpp
@@ -159,7 +159,7 @@ TQThread::TQThread( unsigned int stackSize )
Note that deleting a TQThread object will not stop the execution of
the thread it represents. Deleting a running TQThread (i.e.
- finished() returns FALSE) will probably result in a program crash.
+ finished() returns false) will probably result in a program crash.
You can wait() on a thread to make sure that it has finished.
*/
TQThread::~TQThread()
@@ -170,7 +170,7 @@ TQThread::~TQThread()
tqWarning("TQThread object destroyed while thread is still running.");
#endif
- d->orphan = TRUE;
+ d->orphan = true;
return;
}
@@ -202,7 +202,7 @@ void TQThread::terminate()
}
/*!
- Returns TRUE if the thread is finished; otherwise returns FALSE.
+ Returns true if the thread is finished; otherwise returns false.
*/
bool TQThread::finished() const
{
@@ -211,7 +211,7 @@ bool TQThread::finished() const
}
/*!
- Returns TRUE if the thread is running; otherwise returns FALSE.
+ Returns true if the thread is running; otherwise returns false.
*/
bool TQThread::running() const
{
@@ -221,10 +221,10 @@ bool TQThread::running() const
/*!
Changes the way cross thread signals are handled
- If disable is FALSE, signals emitted from this thread will be
+ If disable is false, signals emitted from this thread will be
posted to any other connected threads' event loops (default).
- If disable is TRUE, calls to emit from this thread
+ If disable is true, calls to emit from this thread
will immediately execute slots in another thread.
This mode of operation is inherently unsafe and is provided
solely to support thread management by a third party application.
@@ -235,7 +235,7 @@ void TQThread::setThreadPostedEventsDisabled(bool disable)
}
/*!
- Returns TRUE if thread posted events are disabled, FALSE if not
+ Returns true if thread posted events are disabled, false if not
*/
bool TQThread::threadPostedEventsDisabled() const
{
diff --git a/src/kernel/tqthread_unix.cpp b/src/kernel/tqthread_unix.cpp
index 27b8ec7af..4f4ec8d79 100644
--- a/src/kernel/tqthread_unix.cpp
+++ b/src/kernel/tqthread_unix.cpp
@@ -98,10 +98,10 @@ void TQThreadInstance::init(unsigned int stackSize)
stacksize = stackSize;
args[0] = args[1] = 0;
thread_storage = 0;
- finished = FALSE;
- running = FALSE;
- orphan = FALSE;
- disableThreadPostedEvents = FALSE;
+ finished = false;
+ running = false;
+ orphan = false;
+ disableThreadPostedEvents = false;
pthread_cond_init(&thread_done, nullptr);
thread_id = 0;
@@ -132,7 +132,7 @@ void *TQThreadInstance::start( void *_arg )
( (TQThread *) arg[0] )->run();
- pthread_cleanup_pop( TRUE );
+ pthread_cleanup_pop( true );
return 0;
}
@@ -154,8 +154,8 @@ void TQThreadInstance::finish( void * )
TQApplication::threadTerminationHandler((TQThread*)d->args[0]);
TQMutexLocker locker( d->mutex() );
- d->running = FALSE;
- d->finished = TRUE;
+ d->running = false;
+ d->finished = true;
d->args[0] = d->args[1] = 0;
@@ -210,9 +210,9 @@ TQt::HANDLE TQThread::currentThread()
void TQThread::initialize()
{
if ( ! tqt_global_mutexpool )
- tqt_global_mutexpool = new TQMutexPool( TRUE, 73 );
+ tqt_global_mutexpool = new TQMutexPool( true, 73 );
if ( ! qt_thread_mutexpool )
- qt_thread_mutexpool = new TQMutexPool( FALSE, 127 );
+ qt_thread_mutexpool = new TQMutexPool( false, 127 );
}
/*! \internal
@@ -321,8 +321,8 @@ void TQThread::start(Priority priority)
pthread_cond_wait(&d->thread_done, &locker.mutex()->d->handle);
}
- d->running = TRUE;
- d->finished = FALSE;
+ d->running = true;
+ d->finished = false;
int ret;
pthread_attr_t attr;
@@ -401,8 +401,8 @@ void TQThread::start(Priority priority)
// we failed to set the stacksize, and as the documentation states,
// the thread will fail to run...
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
return;
}
}
@@ -423,8 +423,8 @@ void TQThread::start(Priority priority)
tqWarning( "TQThread::start: thread creation error: %s", strerror( ret ) );
#endif // QT_CHECK_STATE
- d->running = FALSE;
- d->finished = FALSE;
+ d->running = false;
+ d->finished = false;
d->args[0] = d->args[1] = 0;
}
}
@@ -441,11 +441,11 @@ void TQThread::start()
\list
\i The thread associated with this TQThread object has finished
execution (i.e. when it returns from \l{run()}). This function
- will return TRUE if the thread has finished. It also returns
- TRUE if the thread has not been started yet.
+ will return true if the thread has finished. It also returns
+ true if the thread has not been started yet.
\i \a time milliseconds has elapsed. If \a time is ULONG_MAX (the
default), then the wait will never timeout (the thread must
- return from \l{run()}). This function will return FALSE if the
+ return from \l{run()}). This function will return false if the
wait timed out.
\endlist
@@ -460,11 +460,11 @@ bool TQThread::wait( unsigned long time )
tqWarning( "TQThread::wait: thread tried to wait on itself" );
#endif // QT_CHECK_STATE
- return FALSE;
+ return false;
}
if ( d->finished || ! d->running ) {
- return TRUE;
+ return true;
}
int ret;
diff --git a/src/kernel/tqtimer.cpp b/src/kernel/tqtimer.cpp
index 84803f1b5..1244a4690 100644
--- a/src/kernel/tqtimer.cpp
+++ b/src/kernel/tqtimer.cpp
@@ -63,7 +63,7 @@
\code
TQTimer *timer = new TQTimer( myObject );
connect( timer, TQ_SIGNAL(timeout()), myObject, TQ_SLOT(timerDone()) );
- timer->start( 2000, TRUE ); // 2 seconds single-shot timer
+ timer->start( 2000, true ); // 2 seconds single-shot timer
\endcode
You can also use the static singleShot() function to create a
@@ -78,7 +78,7 @@
\code
TQTimer *t = new TQTimer( myObject );
connect( t, TQ_SIGNAL(timeout()), TQ_SLOT(processOneThing()) );
- t->start( 0, FALSE );
+ t->start( 0, false );
\endcode
myObject->processOneThing() will be called repeatedly and should
@@ -140,8 +140,8 @@ TQTimer::~TQTimer()
/*!
\fn bool TQTimer::isActive() const
- Returns TRUE if the timer is running (pending); otherwise returns
- FALSE.
+ Returns true if the timer is running (pending); otherwise returns
+ false.
*/
/*!
@@ -156,7 +156,7 @@ TQTimer::~TQTimer()
Starts the timer with a \a msec milliseconds timeout, and returns
the ID of the timer, or zero when starting the timer failed.
- If \a sshot is TRUE, the timer will be activated only once;
+ If \a sshot is true, the timer will be activated only once;
otherwise it will continue until it is stopped.
Any pending timer will be stopped.
@@ -216,11 +216,11 @@ void TQTimer::stop()
bool TQTimer::event( TQEvent *e )
{
if ( e->type() != TQEvent::Timer ) // ignore all other events
- return FALSE;
+ return false;
if ( single ) // stop single shot timer
stop();
emit timeout(); // emit timeout signal
- return TRUE;
+ return true;
}
@@ -235,7 +235,7 @@ static TQObjectList *sst_list = 0; // list of single shot timers
static void sst_cleanup()
{
if ( sst_list ) {
- sst_list->setAutoDelete( TRUE );
+ sst_list->setAutoDelete( true );
delete sst_list;
sst_list = 0;
}
@@ -289,7 +289,7 @@ bool TQSingleShotTimer::event( TQEvent * )
signal.activate(); // emit the signal
signal.disconnect( 0, 0 );
timerId = 0; // mark as inactive
- return TRUE;
+ return true;
}
diff --git a/src/kernel/tqtimer.h b/src/kernel/tqtimer.h
index 40aae8724..461a2e486 100644
--- a/src/kernel/tqtimer.h
+++ b/src/kernel/tqtimer.h
@@ -55,7 +55,7 @@ public:
bool isActive() const;
- int start( int msec, bool sshot = FALSE );
+ int start( int msec, bool sshot = false );
void changeInterval( int msec );
void stop();
diff --git a/src/kernel/tqtranslator.cpp b/src/kernel/tqtranslator.cpp
index b6a11feb3..59444c327 100644
--- a/src/kernel/tqtranslator.cpp
+++ b/src/kernel/tqtranslator.cpp
@@ -377,8 +377,8 @@ extern bool qt_detectRTLLanguage();
/*!
Loads \a filename, which may be an absolute file name or relative
to \a directory. The previous contents of this translator object
- is discarded. Returns TRUE if the file is loaded successfully;
- otherwise returns FALSE.
+ is discarded. Returns true if the file is loaded successfully;
+ otherwise returns false.
If the full file name does not exist, other file names are tried
in the following order:
@@ -467,7 +467,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
if (d->oldPermissionLookup != qt_ntfs_permission_lookup)
qt_ntfs_permission_lookup++;
#endif
- return FALSE;
+ return false;
}
fname.truncate( rightmost );
@@ -493,13 +493,13 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
f = qt_open( TQFile::encodeName(realname), O_RDONLY, 0666 );
if ( f < 0 ) {
// tqDebug( "can't open %s: %s", realname.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
struct stat st;
if ( fstat( f, &st ) ) {
// tqDebug( "can't stat %s: %s", realname.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
char * tmp;
tmp = (char*)mmap( 0, st.st_size, // any address, whole file
@@ -508,7 +508,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
f, 0 ); // from offset 0 of f
if ( !tmp || tmp == (char*)MAP_FAILED ) {
// tqDebug( "can't mmap %s: %s", filename.ascii(), strerror( errno ) );
- return FALSE;
+ return false;
}
::close( f );
@@ -518,10 +518,10 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
#else
TQFile f( realname );
if ( !f.exists() )
- return FALSE;
+ return false;
d->unmapLength = f.size();
d->unmapPointer = new char[d->unmapLength];
- bool ok = FALSE;
+ bool ok = false;
if ( f.open(IO_ReadOnly) ) {
ok = d->unmapLength ==
(uint)f.readBlock( d->unmapPointer, d->unmapLength );
@@ -530,7 +530,7 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
if ( !ok ) {
delete [] d->unmapPointer;
d->unmapPointer = 0;
- return FALSE;
+ return false;
}
#endif
@@ -542,8 +542,8 @@ bool TQTranslator::load( const TQString & filename, const TQString & directory,
\fn bool TQTranslator::load( const uchar *data, int len )
Loads the .qm file data \a data of length \a len into the
- translator. Returns TRUE if the data is loaded successfully;
- otherwise returns FALSE.
+ translator. Returns true if the data is loaded successfully;
+ otherwise returns false.
The data is not copied. The caller must be able to guarantee that \a data
will not be deleted or modified.
@@ -553,13 +553,13 @@ bool TQTranslator::do_load( const uchar *data, int len )
{
if ( len < MagicLength || memcmp( data, magic, MagicLength ) != 0 ) {
clear();
- return FALSE;
+ return false;
}
TQByteArray array;
array.setRawData( (const char *) data, len );
TQDataStream s( array, IO_ReadOnly );
- bool ok = TRUE;
+ bool ok = true;
s.device()->at( MagicLength );
@@ -568,7 +568,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
s >> tag >> blockLen;
while ( tag && blockLen ) {
if ( (TQ_UINT32) s.device()->at() + blockLen > (TQ_UINT32) len ) {
- ok = FALSE;
+ ok = false;
break;
}
@@ -587,7 +587,7 @@ bool TQTranslator::do_load( const uchar *data, int len )
}
if ( !s.device()->at(s.device()->at() + blockLen) ) {
- ok = FALSE;
+ ok = false;
break;
}
tag = 0;
@@ -642,9 +642,9 @@ bool TQTranslator::save( const TQString & filename, SaveMode mode )
s << tag << cas;
s.writeRawBytes( d->contextArray->data(), cas );
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
#endif
@@ -884,8 +884,8 @@ void TQTranslator::unsqueeze()
/*!
- Returns TRUE if this message file contains a message with the key
- (\a context, \a sourceText, \a comment); otherwise returns FALSE.
+ Returns true if this message file contains a message with the key
+ (\a context, \a sourceText, \a comment); otherwise returns false.
This function works with stripped translator files.
@@ -1071,7 +1071,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context,
}
/*!
- Returns TRUE if this translator is empty, otherwise returns FALSE.
+ Returns true if this translator is empty, otherwise returns false.
This function works with stripped and unstripped translation files.
*/
bool TQTranslator::isEmpty() const
@@ -1342,8 +1342,8 @@ TQTranslatorMessage & TQTranslatorMessage::operator=(
/*!
Writes this translator message to the \a stream. If \a strip is
- FALSE (the default), all the information in the message is
- written. If \a strip is TRUE, only the part of the extended key
+ false (the default), all the information in the message is
+ written. If \a strip is true, only the part of the extended key
specified by \a prefix is written with the translation (\c
HashContextSourceTextComment by default).
@@ -1359,7 +1359,7 @@ void TQTranslatorMessage::write( TQDataStream & stream, bool strip,
stream.writeRawBytes( &tag, 1 );
stream << tn;
- bool mustWriteHash = TRUE;
+ bool mustWriteHash = true;
if ( !strip )
prefix = HashContextSourceTextComment;
@@ -1420,8 +1420,8 @@ TQTranslatorMessage::Prefix TQTranslatorMessage::commonPrefix(
/*!
- Returns TRUE if the extended key of this object is equal to that of
- \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is equal to that of
+ \a m; otherwise returns false.
*/
bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const
@@ -1433,15 +1433,15 @@ bool TQTranslatorMessage::operator==( const TQTranslatorMessage& m ) const
/*!
\fn bool TQTranslatorMessage::operator!=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is different from
- that of \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is different from
+ that of \a m; otherwise returns false.
*/
/*!
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically before than that of \a m; otherwise returns
- FALSE.
+ false.
*/
bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const
@@ -1455,24 +1455,24 @@ bool TQTranslatorMessage::operator<( const TQTranslatorMessage& m ) const
/*!
\fn bool TQTranslatorMessage::operator<=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically before that of \a m or if they are equal;
- otherwise returns FALSE.
+ otherwise returns false.
*/
/*!
\fn bool TQTranslatorMessage::operator>( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
- lexicographically after that of \a m; otherwise returns FALSE.
+ Returns true if the extended key of this object is
+ lexicographically after that of \a m; otherwise returns false.
*/
/*!
\fn bool TQTranslatorMessage::operator>=( const TQTranslatorMessage& m ) const
- Returns TRUE if the extended key of this object is
+ Returns true if the extended key of this object is
lexicographically after that of \a m or if they are equal;
- otherwise returns FALSE.
+ otherwise returns false.
*/
#endif // TQT_NO_TRANSLATION
diff --git a/src/kernel/tqtranslator.h b/src/kernel/tqtranslator.h
index 39f9faa36..634b37dd5 100644
--- a/src/kernel/tqtranslator.h
+++ b/src/kernel/tqtranslator.h
@@ -74,7 +74,7 @@ public:
enum Prefix { NoPrefix, Hash, HashContext, HashContextSourceText,
HashContextSourceTextComment };
- void write( TQDataStream & s, bool strip = FALSE,
+ void write( TQDataStream & s, bool strip = false,
Prefix prefix = HashContextSourceTextComment ) const;
Prefix commonPrefix( const TQTranslatorMessage& ) const;
diff --git a/src/kernel/tqucomextra.cpp b/src/kernel/tqucomextra.cpp
index f44355adc..b92552fd7 100644
--- a/src/kernel/tqucomextra.cpp
+++ b/src/kernel/tqucomextra.cpp
@@ -68,13 +68,13 @@ bool TQUType_TQVariant::canConvertFrom( TQUObject *o, TQUType *t )
|| isEqual( o->type, &static_QUType_bool )
|| isEqual( o->type, &static_QUType_double )
|| isEqual( o->type, &static_QUType_charstar ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
bool TQUType_TQVariant::canConvertTo( TQUObject * /*o*/, TQUType * /*t*/ )
{
- return FALSE;
+ return false;
}
bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
@@ -96,12 +96,12 @@ bool TQUType_TQVariant::convertFrom( TQUObject *o, TQUType *t )
o->type->clear( o );
o->payload.ptr = var;
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_TQVariant::convertTo( TQUObject * /*o*/, TQUType * /*t*/ )
{
- return FALSE;
+ return false;
}
void TQUType_TQVariant::clear( TQUObject *o )
@@ -137,7 +137,7 @@ void TQUType_varptr::set( TQUObject *o, const void* v )
bool TQUType_varptr::canConvertFrom( TQUObject *o, TQUType *t )
{
if ( isEqual( t, &static_QUType_ptr ) )
- return TRUE;
+ return true;
return t->canConvertTo( o, this );
}
@@ -154,16 +154,16 @@ bool TQUType_varptr::convertFrom( TQUObject *o, TQUType *t )
return t->convertTo( o, this );
o->type = this;
- return TRUE;
+ return true;
}
bool TQUType_varptr::convertTo( TQUObject *o, TQUType * t)
{
if ( isEqual( t, &static_QUType_ptr ) ) {
o->type = &static_QUType_ptr;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
int TQUType_varptr::serializeTo( TQUObject *, TQUBuffer * )
diff --git a/src/kernel/tqurl.cpp b/src/kernel/tqurl.cpp
index 7d0066f0c..ae5d7c992 100644
--- a/src/kernel/tqurl.cpp
+++ b/src/kernel/tqurl.cpp
@@ -63,12 +63,12 @@ public:
/*!
Replaces backslashes with slashes and removes multiple occurrences
- of slashes or backslashes if \c allowMultiple is FALSE.
+ of slashes or backslashes if \c allowMultiple is false.
*/
-static void slashify( TQString& s, bool allowMultiple = TRUE )
+static void slashify( TQString& s, bool allowMultiple = true )
{
- bool justHadSlash = FALSE;
+ bool justHadSlash = false;
for ( int i = 0; i < (int)s.length(); i++ ) {
if ( !allowMultiple && justHadSlash &&
( s[ i ] == '/' || s[ i ] == '\\' ) ) {
@@ -83,9 +83,9 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
s[ i ] = '/';
#endif
if ( s[ i ] == '/' )
- justHadSlash = TRUE;
+ justHadSlash = true;
else
- justHadSlash = FALSE;
+ justHadSlash = false;
}
}
@@ -170,7 +170,7 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
Use the static functions, encode() and decode() to encode or
decode a URL in a string. (They operate on the string in-place.)
- The isRelativeUrl() static function returns TRUE if the given
+ The isRelativeUrl() static function returns true if the given
string is a relative URL.
If you want to use a URL to work on a hierarchical structure (e.g.
@@ -188,9 +188,9 @@ static void slashify( TQString& s, bool allowMultiple = TRUE )
TQUrl::TQUrl()
{
d = new TQUrlPrivate;
- d->isValid = FALSE;
+ d->isValid = false;
d->port = -1;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -219,7 +219,7 @@ TQUrl::TQUrl( const TQUrl& url )
}
/*!
- Returns TRUE if \a url is relative; otherwise returns FALSE.
+ Returns true if \a url is relative; otherwise returns false.
*/
bool TQUrl::isRelativeUrl( const TQString &url )
@@ -260,7 +260,7 @@ bool TQUrl::isRelativeUrl( const TQString &url )
want the constructor to handle the last part of the path as a file
name if there is no slash at the end, and to let it be replaced by
the file name of \a relUrl (if it contains one), set \a checkSlash
- to TRUE.
+ to true.
*/
TQUrl::TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash )
@@ -303,7 +303,7 @@ TQUrl::TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash )
p += "/";
p += rel;
d->path = p;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
}
} else {
@@ -349,7 +349,7 @@ void TQUrl::setProtocol( const TQString& protocol )
{
d->protocol = protocol;
if ( hasHost() )
- d->isValid = TRUE;
+ d->isValid = true;
}
/*!
@@ -375,8 +375,8 @@ void TQUrl::setUser( const TQString& user )
}
/*!
- Returns TRUE if the URL contains a username; otherwise returns
- FALSE.
+ Returns true if the URL contains a username; otherwise returns
+ false.
\sa setUser() setPassword()
*/
@@ -415,8 +415,8 @@ void TQUrl::setPassword( const TQString& pass )
}
/*!
- Returns TRUE if the URL contains a password; otherwise returns
- FALSE.
+ Returns true if the URL contains a password; otherwise returns
+ false.
\warning Passwords passed in URLs are normally \e insecure; this
is due to the mechanism, not because of TQt.
@@ -450,12 +450,12 @@ void TQUrl::setHost( const TQString& host )
{
d->host = host;
if ( !d->protocol.isNull() && d->protocol != "file" )
- d->isValid = TRUE;
+ d->isValid = true;
}
/*!
- Returns TRUE if the URL contains a hostname; otherwise returns
- FALSE.
+ Returns true if the URL contains a hostname; otherwise returns
+ false.
\sa setHost()
*/
@@ -488,7 +488,7 @@ void TQUrl::setPort( int port )
}
/*!
- Returns TRUE if the URL contains a port; otherwise returns FALSE.
+ Returns true if the URL contains a port; otherwise returns false.
\sa setPort()
*/
@@ -508,12 +508,12 @@ void TQUrl::setPath( const TQString& path )
{
d->path = path;
slashify( d->path );
- d->cleanPathDirty = TRUE;
- d->isValid = TRUE;
+ d->cleanPathDirty = true;
+ d->isValid = true;
}
/*!
- Returns TRUE if the URL contains a path; otherwise returns FALSE.
+ Returns true if the URL contains a path; otherwise returns false.
\sa path() setPath()
*/
@@ -568,7 +568,7 @@ void TQUrl::setRef( const TQString& txt )
}
/*!
- Returns TRUE if the URL has a reference; otherwise returns FALSE.
+ Returns true if the URL has a reference; otherwise returns false.
\sa setRef()
*/
@@ -579,7 +579,7 @@ bool TQUrl::hasRef() const
}
/*!
- Returns TRUE if the URL is valid; otherwise returns FALSE. A URL
+ Returns true if the URL is valid; otherwise returns false. A URL
is invalid if it cannot be parsed, for example.
*/
@@ -602,9 +602,9 @@ void TQUrl::reset()
d->path = "";
d->queryEncoded = "";
d->refEncoded = "";
- d->isValid = TRUE;
+ d->isValid = true;
d->port = -1;
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -617,12 +617,12 @@ bool TQUrl::parse( const TQString& url )
slashify( url_ );
if ( url_.isEmpty() ) {
- d->isValid = FALSE;
- return FALSE;
+ d->isValid = false;
+ return false;
}
- d->cleanPathDirty = TRUE;
- d->isValid = TRUE;
+ d->cleanPathDirty = true;
+ d->isValid = true;
TQString oldProtocol = d->protocol;
d->protocol = TQString::null;
@@ -664,15 +664,15 @@ bool TQUrl::parse( const TQString& url )
{ 0, 0, Port, Path, 0, 0, 0, 0, } // Port
};
- bool relPath = FALSE;
+ bool relPath = false;
- relPath = FALSE;
- bool forceRel = FALSE;
+ relPath = false;
+ bool forceRel = false;
// If ':' is at pos 1, we have only one letter
// before that separator => that's a drive letter!
if ( url_.length() >= 2 && url_[1] == ':' )
- relPath = forceRel = TRUE;
+ relPath = forceRel = true;
int hasNoHost = -1;
int cs = url_.find( ":/" );
@@ -688,7 +688,7 @@ bool TQUrl::parse( const TQString& url )
} else {
table[ 0 ][ 1 ] = Protocol;
}
- relPath = TRUE;
+ relPath = true;
} else { // some checking
table[ 0 ][ 1 ] = Protocol;
@@ -799,8 +799,8 @@ bool TQUrl::parse( const TQString& url )
// error
if ( i < (int)url_.length() - 1 ) {
- d->isValid = FALSE;
- return FALSE;
+ d->isValid = false;
+ return false;
}
@@ -846,7 +846,7 @@ bool TQUrl::parse( const TQString& url )
#endif
decode( d->path );
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
#if 0
tqDebug( "URL: %s", url.latin1() );
@@ -860,7 +860,7 @@ bool TQUrl::parse( const TQString& url )
tqDebug( "port: %d\n\n----------------------------\n\n", d->port );
#endif
- return TRUE;
+ return true;
}
/*!
@@ -891,14 +891,14 @@ TQUrl& TQUrl::operator=( const TQUrl& url )
}
/*!
- Compares this URL with \a url and returns TRUE if they are equal;
- otherwise returns FALSE.
+ Compares this URL with \a url and returns true if they are equal;
+ otherwise returns false.
*/
bool TQUrl::operator==( const TQUrl& url ) const
{
if ( !isValid() || !url.isValid() )
- return FALSE;
+ return false;
if ( d->protocol == url.d->protocol &&
d->user == url.d->user &&
@@ -909,16 +909,16 @@ bool TQUrl::operator==( const TQUrl& url ) const
d->refEncoded == url.d->refEncoded &&
d->isValid == url.d->isValid &&
d->port == url.d->port )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
/*!
\overload
Compares this URL with \a url. \a url is parsed first. Returns
- TRUE if \a url is equal to this url; otherwise returns FALSE.
+ true if \a url is equal to this url; otherwise returns false.
*/
bool TQUrl::operator==( const TQString& url ) const
@@ -996,7 +996,7 @@ TQString TQUrl::encodedPathAndQuery()
void TQUrl::setEncodedPathAndQuery( const TQString& pathAndQuery )
{
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
int pos = pathAndQuery.find( '?' );
if ( pos == -1 ) {
d->path = pathAndQuery;
@@ -1007,13 +1007,13 @@ void TQUrl::setEncodedPathAndQuery( const TQString& pathAndQuery )
}
decode( d->path );
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
extern bool tqt_resolve_symlinks; // defined in tqapplication.cpp
/*!
- Returns the path of the URL. If \a correct is TRUE, the path is
+ Returns the path of the URL. If \a correct is true, the path is
cleaned (deals with too many or too few slashes, cleans things
like "/../..", etc). Otherwise path() returns exactly the path
that was parsed or set.
@@ -1026,7 +1026,7 @@ TQString TQUrl::path( bool correct ) const
return d->path;
if ( d->cleanPathDirty ) {
- bool check = TRUE;
+ bool check = true;
if ( TQDir::isRelativePath( d->path ) ) {
d->cleanPath = d->path;
} else if ( isLocalFile() ) {
@@ -1037,10 +1037,10 @@ TQString TQUrl::path( bool correct ) const
d->cleanPath = d->path;
bool share = (d->cleanPath[0] == '\\' && d->cleanPath[1] == '\\') ||
(d->cleanPath[0] == '/' && d->cleanPath[1] == '/');
- slashify( d->cleanPath, FALSE );
+ slashify( d->cleanPath, false );
d->cleanPath = TQDir::cleanDirPath( d->cleanPath );
if ( share ) {
- check = FALSE;
+ check = false;
while (d->cleanPath.at(0) != '/' || d->cleanPath.at(1) != '/')
d->cleanPath.prepend("/");
}
@@ -1078,15 +1078,15 @@ TQString TQUrl::path( bool correct ) const
}
if ( check )
- slashify( d->cleanPath, FALSE );
- d->cleanPathDirty = FALSE;
+ slashify( d->cleanPath, false );
+ d->cleanPathDirty = false;
}
return d->cleanPath;
}
/*!
- Returns TRUE if the URL is a local file; otherwise returns FALSE.
+ Returns true if the URL is a local file; otherwise returns false.
*/
bool TQUrl::isLocalFile() const
@@ -1140,7 +1140,7 @@ void TQUrl::addPath( const TQString& pa )
else
d->path += p;
}
- d->cleanPathDirty = TRUE;
+ d->cleanPathDirty = true;
}
/*!
@@ -1264,8 +1264,8 @@ void TQUrl::decode( TQString& url )
/*!
Composes a string version of the URL and returns it. If \a
- encodedPath is TRUE the path in the returned string is encoded. If
- \a forcePrependProtocol is TRUE and \a encodedPath looks like a
+ encodedPath is true the path in the returned string is encoded. If
+ \a forcePrependProtocol is true and \a encodedPath looks like a
local filename, the "file:/" protocol is also prepended.
\sa encode() decode()
@@ -1338,8 +1338,8 @@ TQUrl::operator TQString() const
bool TQUrl::cdUp()
{
d->path += "/..";
- d->cleanPathDirty = TRUE;
- return TRUE;
+ d->cleanPathDirty = true;
+ return true;
}
#endif // TQT_NO_URL
diff --git a/src/kernel/tqurl.h b/src/kernel/tqurl.h
index 741719d44..e89d91e58 100644
--- a/src/kernel/tqurl.h
+++ b/src/kernel/tqurl.h
@@ -55,7 +55,7 @@ public:
TQUrl();
TQUrl( const TQString& url );
TQUrl( const TQUrl& url );
- TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash = FALSE );
+ TQUrl( const TQUrl& url, const TQString& relUrl, bool checkSlash = false );
virtual ~TQUrl();
TQString protocol() const;
@@ -77,7 +77,7 @@ public:
virtual void setPort( int port );
bool hasPort() const;
- TQString path( bool correct = TRUE ) const;
+ TQString path( bool correct = true ) const;
virtual void setPath( const TQString& path );
bool hasPath() const;
@@ -110,7 +110,7 @@ public:
static void encode( TQString& url );
operator TQString() const;
- virtual TQString toString( bool encodedPath = FALSE, bool forcePrependProtocol = TRUE ) const;
+ virtual TQString toString( bool encodedPath = false, bool forcePrependProtocol = true ) const;
virtual bool cdUp();
diff --git a/src/kernel/tqurlinfo.cpp b/src/kernel/tqurlinfo.cpp
index 5f1c9e519..4beca83bf 100644
--- a/src/kernel/tqurlinfo.cpp
+++ b/src/kernel/tqurlinfo.cpp
@@ -52,12 +52,12 @@ public:
TQUrlInfoPrivate() :
permissions(0),
size(0),
- isDir(FALSE),
- isFile(TRUE),
- isSymLink(FALSE),
- isWritable(TRUE),
- isReadable(TRUE),
- isExecutable(FALSE)
+ isDir(false),
+ isFile(true),
+ isSymLink(false),
+ isWritable(true),
+ isReadable(true),
+ isExecutable(false)
{}
TQString name;
@@ -134,7 +134,7 @@ TQUrlInfo::TQUrlInfo()
file in the TQUrlOperator \a path.
If the information is not found, this constructor creates an
- invalid TQUrlInfo, i.e. isValid() returns FALSE. You should always
+ invalid TQUrlInfo, i.e. isValid() returns false. You should always
check if the URL info is valid before relying on the return values
of any getter functions.
@@ -260,8 +260,8 @@ void TQUrlInfo::setName( const TQString &name )
/*!
- If \a b is TRUE then the URL is set to be a directory; if \b is
- FALSE then the URL is set not to be a directory (which normally
+ If \a b is true then the URL is set to be a directory; if \b is
+ false then the URL is set not to be a directory (which normally
means it is a file). (Note that a URL can refer to both a file and
a directory even though most file systems do not support this.)
@@ -280,7 +280,7 @@ void TQUrlInfo::setDir( bool b )
/*!
- If \a b is TRUE then the URL is set to be a file; if \b is FALSE
+ If \a b is true then the URL is set to be a file; if \b is false
then the URL is set not to be a file (which normally means it is a
directory). (Note that a URL can refer to both a file and a
directory even though most file systems do not support this.)
@@ -300,8 +300,8 @@ void TQUrlInfo::setFile( bool b )
/*!
- Specifies that the URL refers to a symbolic link if \a b is TRUE
- and that it does not if \a b is FALSE.
+ Specifies that the URL refers to a symbolic link if \a b is true
+ and that it does not if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -318,8 +318,8 @@ void TQUrlInfo::setSymLink( bool b )
/*!
- Specifies that the URL is writable if \a b is TRUE and not
- writable if \a b is FALSE.
+ Specifies that the URL is writable if \a b is true and not
+ writable if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -336,8 +336,8 @@ void TQUrlInfo::setWritable( bool b )
/*!
- Specifies that the URL is readable if \a b is TRUE and not
- readable if \a b is FALSE.
+ Specifies that the URL is readable if \a b is true and not
+ readable if \a b is false.
If you call this function for an invalid URL info, this function
turns it into a valid one.
@@ -562,7 +562,7 @@ TQDateTime TQUrlInfo::lastRead() const
}
/*!
- Returns TRUE if the URL is a directory; otherwise returns FALSE.
+ Returns true if the URL is a directory; otherwise returns false.
\sa isValid()
*/
@@ -570,12 +570,12 @@ TQDateTime TQUrlInfo::lastRead() const
bool TQUrlInfo::isDir() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isDir;
}
/*!
- Returns TRUE if the URL is a file; otherwise returns FALSE.
+ Returns true if the URL is a file; otherwise returns false.
\sa isValid()
*/
@@ -583,12 +583,12 @@ bool TQUrlInfo::isDir() const
bool TQUrlInfo::isFile() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isFile;
}
/*!
- Returns TRUE if the URL is a symbolic link; otherwise returns FALSE.
+ Returns true if the URL is a symbolic link; otherwise returns false.
\sa isValid()
*/
@@ -596,12 +596,12 @@ bool TQUrlInfo::isFile() const
bool TQUrlInfo::isSymLink() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isSymLink;
}
/*!
- Returns TRUE if the URL is writable; otherwise returns FALSE.
+ Returns true if the URL is writable; otherwise returns false.
\sa isValid()
*/
@@ -609,12 +609,12 @@ bool TQUrlInfo::isSymLink() const
bool TQUrlInfo::isWritable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isWritable;
}
/*!
- Returns TRUE if the URL is readable; otherwise returns FALSE.
+ Returns true if the URL is readable; otherwise returns false.
\sa isValid()
*/
@@ -622,12 +622,12 @@ bool TQUrlInfo::isWritable() const
bool TQUrlInfo::isReadable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isReadable;
}
/*!
- Returns TRUE if the URL is executable; otherwise returns FALSE.
+ Returns true if the URL is executable; otherwise returns false.
\sa isValid()
*/
@@ -635,13 +635,13 @@ bool TQUrlInfo::isReadable() const
bool TQUrlInfo::isExecutable() const
{
if ( !d )
- return FALSE;
+ return false;
return d->isExecutable;
}
/*!
- Returns TRUE if \a i1 is greater than \a i2; otherwise returns
- FALSE. The objects are compared by the value, which is specified
+ Returns true if \a i1 is greater than \a i2; otherwise returns
+ false. The objects are compared by the value, which is specified
by \a sortBy. This must be one of TQDir::Name, TQDir::Time or
TQDir::Size.
*/
@@ -657,12 +657,12 @@ bool TQUrlInfo::greaterThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
case TQDir::Size:
return i1.size() > i2.size();
default:
- return FALSE;
+ return false;
}
}
/*!
- Returns TRUE if \a i1 is less than \a i2; otherwise returns FALSE.
+ Returns true if \a i1 is less than \a i2; otherwise returns false.
The objects are compared by the value, which is specified by \a
sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
*/
@@ -674,7 +674,7 @@ bool TQUrlInfo::lessThan( const TQUrlInfo &i1, const TQUrlInfo &i2,
}
/*!
- Returns TRUE if \a i1 equals to \a i2; otherwise returns FALSE.
+ Returns true if \a i1 equals to \a i2; otherwise returns false.
The objects are compared by the value, which is specified by \a
sortBy. This must be one of TQDir::Name, TQDir::Time or TQDir::Size.
*/
@@ -690,13 +690,13 @@ bool TQUrlInfo::equal( const TQUrlInfo &i1, const TQUrlInfo &i2,
case TQDir::Size:
return i1.size() == i2.size();
default:
- return FALSE;
+ return false;
}
}
/*!
- Compares this TQUrlInfo with \a i and returns TRUE if they are
- equal; otherwise returns FALSE.
+ Compares this TQUrlInfo with \a i and returns true if they are
+ equal; otherwise returns false.
*/
bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
@@ -704,7 +704,7 @@ bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
if ( !d )
return i.d == 0;
if ( !i.d )
- return FALSE;
+ return false;
return ( d->name == i.d->name &&
d->permissions == i.d->permissions &&
@@ -722,7 +722,7 @@ bool TQUrlInfo::operator==( const TQUrlInfo &i ) const
}
/*!
- Returns TRUE if the URL info is valid; otherwise returns FALSE.
+ Returns true if the URL info is valid; otherwise returns false.
Valid means that the TQUrlInfo contains real information. For
example, a call to TQUrlOperator::info() might return a an invalid
TQUrlInfo, if no information about the requested entry is
diff --git a/src/kernel/tqurloperator.cpp b/src/kernel/tqurloperator.cpp
index d8567e467..2cb656aa2 100644
--- a/src/kernel/tqurloperator.cpp
+++ b/src/kernel/tqurloperator.cpp
@@ -56,7 +56,7 @@ class TQUrlOperatorPrivate
public:
TQUrlOperatorPrivate()
{
- oldOps.setAutoDelete( FALSE );
+ oldOps.setAutoDelete( false );
networkProtocol = 0;
nameFilter = "*";
currPut = 0;
@@ -539,10 +539,10 @@ const TQNetworkOperation *TQUrlOperator::rename( const TQString &oldname, const
}
/*!
- Copies the file \a from to \a to. If \a move is TRUE, the file is
+ Copies the file \a from to \a to. If \a move is true, the file is
moved (copied and removed). \a from must point to a file and \a to
must point to a directory (into which \a from is copied) unless \a
- toPath is set to FALSE. If \a toPath is set to FALSE then the \a
+ toPath is set to false. If \a toPath is set to false then the \a
to variable is assumed to be the absolute file path (destination
file path + file name). The copying is done using the get() and
put() operations. If you want to be notified about the progress of
@@ -574,7 +574,7 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
#endif
TQPtrList<TQNetworkOperation> ops;
- ops.setAutoDelete( FALSE );
+ ops.setAutoDelete( false );
TQUrlOperator *uFrom = new TQUrlOperator( *this, from );
TQUrlOperator *uTo = new TQUrlOperator( to );
@@ -635,13 +635,13 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
d->getOpPutOpMap.insert( (void*)opGet, opPut );
if ( move && (gProt->supportedOperations()&TQNetworkProtocol::OpRemove) ) {
- gProt->setAutoDelete( FALSE );
+ gProt->setAutoDelete( false );
TQNetworkOperation *opRm = new TQNetworkOperation( TQNetworkProtocol::OpRemove, frm, TQString::null, TQString::null );
ops.append( opRm );
d->getOpRemoveOpMap.insert( (void*)opGet, opRm );
} else {
- gProt->setAutoDelete( TRUE );
+ gProt->setAutoDelete( true );
}
#ifdef TQURLOPERATOR_DEBUG
tqDebug( "TQUrlOperator: copy operation should start now..." );
@@ -674,7 +674,7 @@ TQPtrList<TQNetworkOperation> TQUrlOperator::copy( const TQString &from, const T
/*!
\overload
- Copies the \a files to the directory \a dest. If \a move is TRUE
+ Copies the \a files to the directory \a dest. If \a move is true
the files are moved, not copied. \a dest must point to a
directory.
@@ -695,22 +695,22 @@ void TQUrlOperator::copy( const TQStringList &files, const TQString &dest,
}
/*!
- Returns TRUE if the URL is a directory; otherwise returns FALSE.
+ Returns true if the URL is a directory; otherwise returns false.
This may not always work correctly, if the protocol of the URL is
something other than file (local filesystem). If you pass a bool
- pointer as the \a ok argument, \a *ok is set to TRUE if the result
- of this function is known to be correct, and to FALSE otherwise.
+ pointer as the \a ok argument, \a *ok is set to true if the result
+ of this function is known to be correct, and to false otherwise.
*/
bool TQUrlOperator::isDir( bool *ok )
{
if ( ok )
- *ok = TRUE;
+ *ok = true;
if ( isLocalFile() ) {
if ( TQFileInfo( path() ).isDir() )
- return TRUE;
+ return true;
else
- return FALSE;
+ return false;
}
if ( d->entryMap.contains( "." ) ) {
@@ -718,8 +718,8 @@ bool TQUrlOperator::isDir( bool *ok )
}
// #### can assume that we are a directory?
if ( ok )
- *ok = FALSE;
- return TRUE;
+ *ok = false;
+ return true;
}
/*!
@@ -907,14 +907,14 @@ TQUrlInfo TQUrlOperator::info( const TQString &entry ) const
// return a faked TQUrlInfo
TQUrlInfo inf;
inf.setName( entry );
- inf.setDir( TRUE );
- inf.setFile( FALSE );
- inf.setSymLink( FALSE );
+ inf.setDir( true );
+ inf.setFile( false );
+ inf.setSymLink( false );
inf.setOwner( tr( "(unknown)" ) );
inf.setGroup( tr( "(unknown)" ) );
inf.setSize( 0 );
- inf.setWritable( FALSE );
- inf.setReadable( TRUE );
+ inf.setWritable( false );
+ inf.setReadable( true );
return inf;
}
return TQUrlInfo();
@@ -1005,7 +1005,7 @@ TQUrlOperator& TQUrlOperator::operator=( const TQUrlOperator &url )
*d = *url.d;
- d->oldOps.setAutoDelete( FALSE );
+ d->oldOps.setAutoDelete( false );
d->getOpPutOpMap = getOpPutOpMap;
d->getOpPutProtMap = getOpPutProtMap;
d->getOpGetProtMap = getOpGetProtMap;
@@ -1024,7 +1024,7 @@ TQUrlOperator& TQUrlOperator::operator=( const TQString &url )
{
deleteNetworkProtocol();
TQUrl::operator=( url );
- d->oldOps.setAutoDelete( FALSE );
+ d->oldOps.setAutoDelete( false );
getNetworkProtocol();
return *this;
}
@@ -1050,9 +1050,9 @@ bool TQUrlOperator::checkValid()
// ######
if ( !isValid() ) {
//emit error( ErrValid, tr( "The entered URL is not valid!" ) );
- return FALSE;
+ return false;
} else
- return TRUE;
+ return true;
}
@@ -1102,7 +1102,7 @@ void TQUrlOperator::continueCopy( TQNetworkOperation *op )
d->getOpPutProtMap.take( op );
d->getOpRemoveOpMap.take( op );
if ( pProt )
- pProt->setAutoDelete( TRUE );
+ pProt->setAutoDelete( true );
if ( put && pProt ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
pProt->addOperation( put );
@@ -1112,7 +1112,7 @@ void TQUrlOperator::continueCopy( TQNetworkOperation *op )
}
}
if ( gProt ) {
- gProt->setAutoDelete( TRUE );
+ gProt->setAutoDelete( true );
}
if ( rm && gProt ) {
if ( op->state() != TQNetworkProtocol::StFailed ) {
@@ -1155,8 +1155,8 @@ void TQUrlOperator::stop()
{
d->getOpPutOpMap.clear();
d->getOpRemoveOpMap.clear();
- d->getOpGetProtMap.setAutoDelete( TRUE );
- d->getOpPutProtMap.setAutoDelete( TRUE );
+ d->getOpGetProtMap.setAutoDelete( true );
+ d->getOpPutProtMap.setAutoDelete( true );
TQPtrDictIterator<TQNetworkProtocol> it( d->getOpPutProtMap );
for ( ; it.current(); ++it )
it.current()->stop();
diff --git a/src/kernel/tqurloperator.h b/src/kernel/tqurloperator.h
index bad14db39..0099885fb 100644
--- a/src/kernel/tqurloperator.h
+++ b/src/kernel/tqurloperator.h
@@ -64,7 +64,7 @@ public:
TQUrlOperator();
TQUrlOperator( const TQString &urL );
TQUrlOperator( const TQUrlOperator& url );
- TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl, bool checkSlash = FALSE );
+ TQUrlOperator( const TQUrlOperator& url, const TQString& relUrl, bool checkSlash = false );
virtual ~TQUrlOperator();
virtual void setPath( const TQString& path );
@@ -76,8 +76,8 @@ public:
virtual const TQNetworkOperation *rename( const TQString &oldname, const TQString &newname );
virtual const TQNetworkOperation *get( const TQString &location = TQString::null );
virtual const TQNetworkOperation *put( const TQByteArray &data, const TQString &location = TQString::null );
- virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = FALSE, bool toPath = TRUE );
- virtual void copy( const TQStringList &files, const TQString &dest, bool move = FALSE );
+ virtual TQPtrList<TQNetworkOperation> copy( const TQString &from, const TQString &to, bool move = false, bool toPath = true );
+ virtual void copy( const TQStringList &files, const TQString &dest, bool move = false );
virtual bool isDir( bool *ok = 0 );
virtual void setNameFilter( const TQString &nameFilter );
diff --git a/src/kernel/tqvariant.cpp b/src/kernel/tqvariant.cpp
index 71175edac..af0e3183b 100644
--- a/src/kernel/tqvariant.cpp
+++ b/src/kernel/tqvariant.cpp
@@ -93,7 +93,7 @@ TQVariant::Private::Private()
qv_count++;
#endif
typ = TQVariant::Invalid;
- is_null = TRUE;
+ is_null = true;
}
TQVariant::Private::Private( Private* d )
@@ -350,7 +350,7 @@ void TQVariant::Private::clear()
}
typ = TQVariant::Invalid;
- is_null = TRUE;
+ is_null = true;
}
/*!
@@ -426,7 +426,7 @@ void TQVariant::Private::clear()
\code
TQVariant x, y( TQString() ), z( TQString("") );
x.asInt();
- // x.isNull() == TRUE, y.isNull() == TRUE, z.isNull() == FALSE
+ // x.isNull() == true, y.isNull() == true, z.isNull() == false
\endcode
See the \link collection.html Collection Classes\endlink.
@@ -571,7 +571,7 @@ TQVariant::TQVariant( const TQStringList& val )
d = new Private;
d->typ = StringList;
d->value.ptr = new TQStringList( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif // TQT_NO_STRINGLIST
@@ -584,7 +584,7 @@ TQVariant::TQVariant( const TQMap<TQString,TQVariant>& val )
d = new Private;
d->typ = Map;
d->value.ptr = new TQMap<TQString,TQVariant>( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
/*!
@@ -595,7 +595,7 @@ TQVariant::TQVariant( const TQFont& val )
d = new Private;
d->typ = Font;
d->value.ptr = new TQFont( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -631,7 +631,7 @@ TQVariant::TQVariant( const TQBrush& val )
d = new Private;
d->typ = Brush;
d->value.ptr = new TQBrush( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -672,7 +672,7 @@ TQVariant::TQVariant( const TQColor& val )
d = new Private;
d->typ = Color;
d->value.ptr = new TQColor( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#ifndef TQT_NO_PALETTE
@@ -684,7 +684,7 @@ TQVariant::TQVariant( const TQPalette& val )
d = new Private;
d->typ = Palette;
d->value.ptr = new TQPalette( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -695,7 +695,7 @@ TQVariant::TQVariant( const TQColorGroup& val )
d = new Private;
d->typ = ColorGroup;
d->value.ptr = new TQColorGroup( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif //TQT_NO_PALETTE
#ifndef TQT_NO_ICONSET
@@ -739,7 +739,7 @@ TQVariant::TQVariant( const TQCursor& val )
d = new Private;
d->typ = Cursor;
d->value.ptr = new TQCursor( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -816,7 +816,7 @@ TQVariant::TQVariant( const TQKeySequence& val )
d = new Private;
d->typ = KeySequence;
d->value.ptr = new TQKeySequence( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
@@ -839,7 +839,7 @@ TQVariant::TQVariant( int val )
d = new Private;
d->typ = Int;
d->value.i = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -850,7 +850,7 @@ TQVariant::TQVariant( uint val )
d = new Private;
d->typ = UInt;
d->value.u = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -861,7 +861,7 @@ TQVariant::TQVariant( TQ_LLONG val )
d = new Private;
d->typ = LongLong;
d->value.ll = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -873,7 +873,7 @@ TQVariant::TQVariant( TQ_ULLONG val )
d = new Private;
d->typ = ULongLong;
d->value.ull = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -884,7 +884,7 @@ TQVariant::TQVariant( bool val )
d = new Private;
d->typ = Bool;
d->value.b = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
@@ -896,7 +896,7 @@ TQVariant::TQVariant( double val )
d = new Private;
d->typ = Double;
d->value.d = val;
- d->is_null = FALSE;
+ d->is_null = false;
}
#ifndef TQT_NO_TEMPLATE_VARIANT
@@ -908,7 +908,7 @@ TQVariant::TQVariant( const TQValueList<TQVariant>& val )
d = new Private;
d->typ = List;
d->value.ptr = new TQValueList<TQVariant>( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
#endif
@@ -920,7 +920,7 @@ TQVariant::TQVariant( TQSizePolicy val )
d = new Private;
d->typ = SizePolicy;
d->value.ptr = new TQSizePolicy( val );
- d->is_null = FALSE;
+ d->is_null = false;
}
/*!
@@ -1079,7 +1079,7 @@ void TQVariant::load( TQDataStream& s )
TQString x;
s >> x;
d->typ = t;
- d->is_null = TRUE;
+ d->is_null = true;
}
break;
#ifndef TQT_NO_TEMPLATE_VARIANT
@@ -1088,7 +1088,7 @@ void TQVariant::load( TQDataStream& s )
TQMap<TQString,TQVariant>* x = new TQMap<TQString,TQVariant>;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case List:
@@ -1096,7 +1096,7 @@ void TQVariant::load( TQDataStream& s )
TQValueList<TQVariant>* x = new TQValueList<TQVariant>;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif
@@ -1106,7 +1106,7 @@ void TQVariant::load( TQDataStream& s )
TQCursor* x = new TQCursor;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
#endif
}
break;
@@ -1153,7 +1153,7 @@ void TQVariant::load( TQDataStream& s )
TQStringList* x = new TQStringList;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif // TQT_NO_STRINGLIST
@@ -1162,7 +1162,7 @@ void TQVariant::load( TQDataStream& s )
TQFont* x = new TQFont;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Pixmap:
@@ -1188,7 +1188,7 @@ void TQVariant::load( TQDataStream& s )
TQBrush* x = new TQBrush;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Rect:
@@ -1217,7 +1217,7 @@ void TQVariant::load( TQDataStream& s )
TQColor* x = new TQColor;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#ifndef TQT_NO_PALETTE
@@ -1226,7 +1226,7 @@ void TQVariant::load( TQDataStream& s )
TQPalette* x = new TQPalette;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case ColorGroup:
@@ -1234,7 +1234,7 @@ void TQVariant::load( TQDataStream& s )
TQColorGroup* x = new TQColorGroup;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif
@@ -1252,7 +1252,7 @@ void TQVariant::load( TQDataStream& s )
int x;
s >> x;
d->value.i = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case UInt:
@@ -1260,7 +1260,7 @@ void TQVariant::load( TQDataStream& s )
uint x;
s >> x;
d->value.u = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case LongLong:
@@ -1282,7 +1282,7 @@ void TQVariant::load( TQDataStream& s )
TQ_INT8 x;
s >> x;
d->value.b = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Double:
@@ -1290,7 +1290,7 @@ void TQVariant::load( TQDataStream& s )
double x;
s >> x;
d->value.d = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case SizePolicy:
@@ -1301,7 +1301,7 @@ void TQVariant::load( TQDataStream& s )
d->value.ptr = new TQSizePolicy( (TQSizePolicy::SizeType)h,
(TQSizePolicy::SizeType)v,
(bool) hfw);
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
case Date:
@@ -1345,7 +1345,7 @@ void TQVariant::load( TQDataStream& s )
TQKeySequence* x = new TQKeySequence;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
#endif // TQT_NO_ACCEL
@@ -1354,7 +1354,7 @@ void TQVariant::load( TQDataStream& s )
TQPen* x = new TQPen;
s >> *x;
d->value.ptr = x;
- d->is_null = FALSE;
+ d->is_null = false;
}
break;
}
@@ -1560,8 +1560,8 @@ TQDataStream& operator<< ( TQDataStream& s, const TQVariant::Type p )
/*!
\fn bool TQVariant::isValid() const
- Returns TRUE if the storage type of this variant is not
- TQVariant::Invalid; otherwise returns FALSE.
+ Returns true if the storage type of this variant is not
+ TQVariant::Invalid; otherwise returns false.
*/
/*!
@@ -2162,8 +2162,8 @@ const TQPen TQVariant::toPen() const
Returns the variant as an int if the variant can be cast to Int;
otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asInt(), canCast()
*/
@@ -2203,8 +2203,8 @@ int TQVariant::toInt( bool * ok ) const
Returns the variant as an unsigned int if the variant can be cast
to UInt; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an unsigned int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an unsigned int; otherwise \a *ok is set to false.
\sa asUInt(), canCast()
*/
@@ -2240,8 +2240,8 @@ uint TQVariant::toUInt( bool * ok ) const
Returns the variant as a long long int if the variant can be cast
to LongLong; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asLongLong(), canCast()
*/
@@ -2277,8 +2277,8 @@ TQ_LLONG TQVariant::toLongLong( bool * ok ) const
Returns the variant as as an unsigned long long int if the variant
can be cast to ULongLong; otherwise returns 0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to an int; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to an int; otherwise \a *ok is set to false.
\sa asULongLong(), canCast()
*/
@@ -2312,12 +2312,12 @@ TQ_ULLONG TQVariant::toULongLong( bool * ok ) const
/*!
Returns the variant as a bool if the variant can be cast to Bool;
- otherWise returns FALSE.
+ otherWise returns false.
- Returns TRUE if the variant has a numeric type and its value is
+ Returns true if the variant has a numeric type and its value is
non-zero, or if the variant has type String, ByteArray or CString
and its lower-case content is not empty, "0" or "false"; otherwise
- returns FALSE.
+ returns false.
\sa asBool(), canCast()
*/
@@ -2344,7 +2344,7 @@ bool TQVariant::toBool() const
return !(str == "0" || str == "false" || str.isEmpty() );
}
default:
- return FALSE;
+ return false;
}
}
@@ -2352,8 +2352,8 @@ bool TQVariant::toBool() const
Returns the variant as a double if the variant can be cast to
Double; otherwise returns 0.0.
- If \a ok is non-null: \a *ok is set to TRUE if the value could be
- converted to a double; otherwise \a *ok is set to FALSE.
+ If \a ok is non-null: \a *ok is set to true if the value could be
+ converted to a double; otherwise \a *ok is set to false.
\sa asDouble(), canCast()
*/
@@ -2935,7 +2935,7 @@ TQMap<TQString, TQVariant>& TQVariant::asMap()
#endif
/*!
- Returns TRUE if the variant's type can be cast to the requested
+ Returns true if the variant's type can be cast to the requested
type, \a t. Such casting is done automatically when calling the
toInt(), toBool(), ... or asInt(), asBool(), ... methods.
@@ -2966,7 +2966,7 @@ TQMap<TQString, TQVariant>& TQVariant::asMap()
bool TQVariant::canCast( Type t ) const
{
if ( Type( d->typ ) == t )
- return TRUE;
+ return true;
switch ( t ) {
case Bool:
@@ -2988,7 +2988,7 @@ bool TQVariant::canCast( Type t ) const
case String:
case UInt:
case ULongLong:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3012,7 +3012,7 @@ bool TQVariant::canCast( Type t ) const
case Time:
case UInt:
case ULongLong:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3028,7 +3028,7 @@ bool TQVariant::canCast( Type t ) const
case Date:
case DateTime:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3043,7 +3043,7 @@ bool TQVariant::canCast( Type t ) const
case ULongLong:
case Double:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3054,7 +3054,7 @@ bool TQVariant::canCast( Type t ) const
case ByteArray:
case CString:
case String:
- return TRUE;
+ return true;
default: break;
}
break;
@@ -3070,9 +3070,9 @@ bool TQVariant::canCast( Type t ) const
TQValueList<TQVariant>::ConstIterator end = listEnd();
for( ; it != end; ++it ) {
if ( !(*it).canCast( String ) )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
#endif
case Invalid:
@@ -3095,7 +3095,7 @@ bool TQVariant::canCast( Type t ) const
case Pen:
break;
}
- return FALSE;
+ return false;
}
/*!
@@ -3103,8 +3103,8 @@ bool TQVariant::canCast( Type t ) const
done, the variant is set to the default value of the requested
type (e.g. an empty string if the requested type \a t is
TQVariant::String, an empty point array if the requested type \a t
- is TQVariant::PointArray, etc). Returns TRUE if the current type of
- the variant was successfully cast; otherwise returns FALSE.
+ is TQVariant::PointArray, etc). Returns true if the current type of
+ the variant was successfully cast; otherwise returns false.
\sa canCast()
*/
@@ -3232,8 +3232,8 @@ bool TQVariant::cast( Type t )
}
/*!
- Compares this TQVariant with \a v and returns TRUE if they are
- equal; otherwise returns FALSE.
+ Compares this TQVariant with \a v and returns true if they are
+ equal; otherwise returns false.
*/
bool TQVariant::operator==( const TQVariant &v ) const
@@ -3273,12 +3273,12 @@ bool TQVariant::operator==( const TQVariant &v ) const
}
default:
- Q_ASSERT(FALSE);
+ Q_ASSERT(false);
}
}
if (!v.canCast(d->typ)) {
- return FALSE;
+ return false;
}
switch( d->typ ) {
@@ -3297,16 +3297,16 @@ bool TQVariant::operator==( const TQVariant &v ) const
return v.toList() == toList();
case Map: {
if ( v.toMap().count() != toMap().count() )
- return FALSE;
+ return false;
TQMap<TQString, TQVariant>::ConstIterator it = v.toMap().begin();
TQMap<TQString, TQVariant>::ConstIterator it2 = toMap().begin();
while ( it != v.toMap().end() ) {
if ( *it != *it2 )
- return FALSE;
+ return false;
++it;
++it2;
}
- return TRUE;
+ return true;
}
#endif
case String:
@@ -3377,12 +3377,12 @@ bool TQVariant::operator==( const TQVariant &v ) const
case Invalid:
break;
}
- return FALSE;
+ return false;
}
/*!
- Compares this TQVariant with \a v and returns TRUE if they are not
- equal; otherwise returns FALSE.
+ Compares this TQVariant with \a v and returns true if they are not
+ equal; otherwise returns false.
*/
bool TQVariant::operator!=( const TQVariant &v ) const
@@ -3401,7 +3401,7 @@ void* TQVariant::rawAccess( void* ptr, Type typ, bool deepCopy )
clear();
d->typ = typ;
d->value.ptr = ptr;
- d->is_null = FALSE;
+ d->is_null = false;
if ( deepCopy ) {
TQVariant::Private* p = new Private( d );
d->typ = Invalid;
@@ -3420,7 +3420,7 @@ void* TQVariant::rawAccess( void* ptr, Type typ, bool deepCopy )
}
/*!
- Returns TRUE if this is a NULL variant, FALSE otherwise.
+ Returns true if this is a NULL variant, false otherwise.
*/
bool TQVariant::isNull() const
{
diff --git a/src/kernel/tqvariant.h b/src/kernel/tqvariant.h
index 2a6eeec19..ad753a8c8 100644
--- a/src/kernel/tqvariant.h
+++ b/src/kernel/tqvariant.h
@@ -320,7 +320,7 @@ private:
Private* d;
public:
- void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = FALSE );
+ void* rawAccess( void* ptr = 0, Type typ = Invalid, bool deepCopy = false );
};
inline TQVariant::Type TQVariant::type() const
diff --git a/src/kernel/tqwidget.cpp b/src/kernel/tqwidget.cpp
index ac56e302a..a4b4ca218 100644
--- a/src/kernel/tqwidget.cpp
+++ b/src/kernel/tqwidget.cpp
@@ -377,7 +377,7 @@
\i mouseMoveEvent() - called whenever the mouse moves while a
button is held down. This is useful for, for example, dragging. If
- you call setMouseTracking(TRUE), you get mouse move events even
+ you call setMouseTracking(true), you get mouse move events even
when no buttons are held down. (Note that applications which make
use of mouse tracking are often not very useful on low-bandwidth X
connections.) (See also the \link dnd.html drag and drop\endlink
@@ -894,7 +894,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
fstrut_dirty = 1;
- isWidget = TRUE; // is a widget
+ isWidget = true; // is a widget
winid = 0; // default attributes
widget_state = 0;
widget_flags = f;
@@ -904,7 +904,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
own_palette = 0;
sizehint_forced = 0;
is_closing = 0;
- im_enabled = FALSE;
+ im_enabled = false;
#ifndef TQT_NO_LAYOUT
lay_out = 0;
#endif
@@ -931,7 +931,7 @@ TQWidget::TQWidget( TQWidget *parent, const char *name, WFlags f, NFlags n )
crect.size()) );
if ( isTopLevel() ) {
setWState( WState_ForceHide | WState_CreatedHidden );
- TQFocusData *fd = focusData( TRUE );
+ TQFocusData *fd = focusData( true );
if ( fd->focusWidgets.findRef(this) < 0 )
fd->focusWidgets.append( this );
} else {
@@ -961,7 +961,7 @@ TQWidget::~TQWidget()
#endif
// Remove myself and all children from the can-take-focus list
- TQFocusData *f = focusData( FALSE );
+ TQFocusData *f = focusData( false );
if ( f ) {
TQPtrListIterator<TQWidget> it(f->focusWidgets);
TQWidget *w;
@@ -1045,7 +1045,7 @@ void TQWidget::destroyMapper()
while ( (w=it.current()) ) { // remove parents widgets
++it;
if ( !w->parentObj ) // widget is a parent
- w->destroy( TRUE, TRUE );
+ w->destroy( true, true );
}
delete myMapper;
}
@@ -1075,7 +1075,7 @@ static TQWidgetList *wListInternal( TQWidgetMapper *mapper, bool onlyTopLevel )
TQWidgetList *TQWidget::wList()
{
- return wListInternal( mapper, FALSE );
+ return wListInternal( mapper, false );
}
/*!
@@ -1086,7 +1086,7 @@ TQWidgetList *TQWidget::wList()
TQWidgetList *TQWidget::tlwList()
{
- return wListInternal( mapper, TRUE );
+ return wListInternal( mapper, true );
}
@@ -1545,7 +1545,7 @@ uint TQWidget::windowState() const
combination of TQt::WindowState: \c WindowMinimized, \c
WindowMaximized, \c WindowFullScreen and \c WindowActive.
- If the window is not visible (i.e. isVisible() returns FALSE), the
+ If the window is not visible (i.e. isVisible() returns false), the
window state will take effect when show() is called. For visible
windows, the change is immediate. For example, to toggle between
full-screen and mormal mode, use the following code:
@@ -1659,8 +1659,8 @@ void TQWidget::showNormal()
}
/*!
- Returns TRUE if this widget would become enabled if \a ancestor is
- enabled; otherwise returns FALSE.
+ Returns true if this widget would become enabled if \a ancestor is
+ enabled; otherwise returns false.
This is the case if neither the widget itself nor every parent up
to but excluding \a ancestor has been explicitly disabled.
@@ -1731,7 +1731,7 @@ void TQWidget::setEnabled( bool enable )
++it;
if ( w->isWidgetType() &&
!w->testWState( WState_ForceDisabled ) )
- w->setEnabled( TRUE );
+ w->setEnabled( true );
}
}
}
@@ -1739,7 +1739,7 @@ void TQWidget::setEnabled( bool enable )
if ( !testWState(WState_Disabled) ) {
if (focusWidget() == this) {
bool parentIsEnabled = (!parentWidget() || parentWidget()->isEnabled());
- if (!parentIsEnabled || !focusNextPrevChild(TRUE))
+ if (!parentIsEnabled || !focusNextPrevChild(true))
clearFocus();
}
setWState( WState_Disabled );
@@ -1751,7 +1751,7 @@ void TQWidget::setEnabled( bool enable )
while( (w = (TQWidget *)it.current()) != 0 ) {
++it;
if ( w->isWidgetType() && w->isEnabled() ) {
- w->setEnabled( FALSE );
+ w->setEnabled( false );
w->clearWState( WState_ForceDisabled );
}
}
@@ -1773,7 +1773,7 @@ void TQWidget::setEnabled( bool enable )
}
/*!
- Disables widget input events if \a disable is TRUE; otherwise
+ Disables widget input events if \a disable is true; otherwise
enables input events.
See the \l enabled documentation for more information.
@@ -2906,7 +2906,7 @@ const TQColorGroup &TQWidget::colorGroup() const
#ifndef TQT_NO_PALETTE
void TQWidget::setPalette( const TQPalette &palette )
{
- own_palette = TRUE;
+ own_palette = true;
if ( pal == palette )
return;
TQPalette old = pal;
@@ -2932,7 +2932,7 @@ void TQWidget::unsetPalette()
{
// reset the palette
setPalette( qt_naturalWidgetPalette( this ) );
- own_palette = FALSE;
+ own_palette = false;
}
/*!
@@ -2985,7 +2985,7 @@ void TQWidget::paletteChange( const TQPalette & )
*/
void TQWidget::setFont( const TQFont &font )
{
- own_font = TRUE;
+ own_font = true;
if ( fnt == font && fnt.d->mask == font.d->mask )
return;
TQFont old = fnt;
@@ -3013,7 +3013,7 @@ void TQWidget::unsetFont()
{
// reset the font
setFont( qt_naturalWidgetFont( this ) );
- own_font = FALSE;
+ own_font = false;
}
/*!
@@ -3286,7 +3286,7 @@ void TQWidget::setFocus()
return;
}
- TQFocusData * f = focusData( TRUE );
+ TQFocusData * f = focusData( true );
if ( f->it.current() == this && tqApp->focusWidget() == this
#if defined(TQ_WS_WIN)
&& GetFocus() == winId()
@@ -3409,11 +3409,11 @@ void TQWidget::clearFocus()
/*!
Finds a new widget to give the keyboard focus to, as appropriate
- for Tab and Shift+Tab, and returns TRUE if is can find a new
- widget and FALSE if it can't,
+ for Tab and Shift+Tab, and returns true if is can find a new
+ widget and false if it can't,
- If \a next is TRUE, this function searches "forwards", if \a next
- is FALSE, it searches "backwards".
+ If \a next is true, this function searches "forwards", if \a next
+ is false, it searches "backwards".
Sometimes, you will want to reimplement this function. For
example, a web browser might reimplement it to move its "current
@@ -3441,7 +3441,7 @@ bool TQWidget::focusNextPrevChild( bool next )
if ( !isTopLevel() && p )
return p->focusNextPrevChild(next);
- TQFocusData *f = focusData( TRUE );
+ TQFocusData *f = focusData( true );
TQWidget *startingPoint = f->it.current();
TQWidget *candidate = 0;
@@ -3457,10 +3457,10 @@ bool TQWidget::focusNextPrevChild( bool next )
} while( w && !(candidate && w==startingPoint) );
if ( !candidate )
- return FALSE;
+ return false;
candidate->setFocus();
- return TRUE;
+ return true;
}
/*!
@@ -3472,7 +3472,7 @@ bool TQWidget::focusNextPrevChild( bool next )
TQWidget *TQWidget::focusWidget() const
{
TQWidget *that = (TQWidget *)this; // mutable
- TQFocusData *f = that->focusData( FALSE );
+ TQFocusData *f = that->focusData( false );
if ( f && f->focusWidgets.count() && f->it.current() == 0 )
f->it.toFirst();
return ( f && f->it.current() ) ? f->it.current() : 0;
@@ -3492,14 +3492,14 @@ TQWidget *TQWidget::focusWidget() const
*/
TQFocusData * TQWidget::focusData()
{
- return focusData( TRUE );
+ return focusData( true );
}
/*!
\internal
Internal function which lets us ask for the focus data, creating
- it if it doesn't exist and \a create is TRUE.
+ it if it doesn't exist and \a create is true.
*/
TQFocusData * TQWidget::focusData( bool create )
{
@@ -3524,7 +3524,7 @@ TQFocusData * TQWidget::focusData( bool create )
Most Widgets (as eg. buttons) that do not handle text input should have
the input method disabled if they have focus. This is the default.
- If a widget handles text input it should set this property to TRUE.
+ If a widget handles text input it should set this property to true.
*/
void TQWidget::setInputMethodEnabled( bool b )
@@ -3537,8 +3537,8 @@ void TQWidget::setInputMethodEnabled( bool b )
/*!
- Enables key event compression, if \a compress is TRUE, and
- disables it if \a compress is FALSE.
+ Enables key event compression, if \a compress is true, and
+ disables it if \a compress is false.
Key compression is off by default (except for TQLineEdit and
TQTextEdit), so widgets receive one key press event for each key
@@ -3581,7 +3581,7 @@ void TQWidget::setKeyCompression(bool compress)
The active window is the window that contains the widget
that has keyboard focus.
- When popup windows are visible, this property is TRUE for both the
+ When popup windows are visible, this property is true for both the
active window \e and for the popup.
\sa setActiveWindow(), TQApplication::activeWindow()
@@ -3592,7 +3592,7 @@ bool TQWidget::isActiveWindow() const
if(testWFlags(WSubWindow) && parentWidget())
tlw = parentWidget()->topLevelWidget();
if(tlw == tqApp->activeWindow() || ( isVisible() && tlw->isPopup() ))
- return TRUE;
+ return true;
#ifndef TQT_NO_STYLE
const_cast<TQWidget*>(this)->createExtra();
if (!extra->m_ceData) {
@@ -3606,16 +3606,16 @@ bool TQWidget::isActiveWindow() const
if((tlw->isDialog() || (tlw->testWFlags(TQt::WStyle_Tool) && !tlw->isPopup())) &&
!tlw->testWFlags(TQt::WShowModal) &&
(!tlw->parentWidget() || tlw->parentWidget()->isActiveWindow()))
- return TRUE;
+ return true;
TQWidget *w = tqApp->activeWindow();
if( !testWFlags(WSubWindow) && w && w->testWFlags(WSubWindow) &&
w->parentWidget()->topLevelWidget() == tlw)
- return TRUE;
+ return true;
while(w && (tlw->isDialog() || tlw->testWFlags(TQt::WStyle_Tool)) &&
!w->testWFlags(TQt::WShowModal) && w->parentWidget()) {
w = w->parentWidget()->topLevelWidget();
if( w == tlw )
- return TRUE;
+ return true;
}
}
#endif
@@ -3625,11 +3625,11 @@ bool TQWidget::isActiveWindow() const
while ( parent ) {
parent = ::GetParent( parent );
if ( parent && parent == topparent )
- return TRUE;
+ return true;
}
#endif
- return FALSE;
+ return false;
}
/*!
@@ -3690,7 +3690,7 @@ void TQWidget::setTabOrder( TQWidget* first, TQWidget *second )
while ( second->focusProxy() )
second = second->focusProxy();
- TQFocusData *f = first->focusData( TRUE );
+ TQFocusData *f = first->focusData( true );
bool focusThere = (f->it.current() == second );
f->focusWidgets.removeRef( second );
if ( f->focusWidgets.findRef( first ) >= 0 )
@@ -3818,7 +3818,7 @@ void TQWidget::move( int x, int y )
TQPoint oldp(pos());
internalSetGeometry( x + geometry().x() - TQWidget::x(),
y + geometry().y() - TQWidget::y(),
- width(), height(), TRUE );
+ width(), height(), true );
if ( isVisible() && oldp != pos() )
qt_update_bg_recursive( this );
}
@@ -3830,7 +3830,7 @@ void TQWidget::move( int x, int y )
*/
void TQWidget::resize( int w, int h )
{
- internalSetGeometry( geometry().x(), geometry().y(), w, h, FALSE );
+ internalSetGeometry( geometry().x(), geometry().y(), w, h, false );
setWState( WState_Resized );
}
@@ -3842,7 +3842,7 @@ void TQWidget::resize( int w, int h )
void TQWidget::setGeometry( int x, int y, int w, int h )
{
TQPoint oldp( pos( ));
- internalSetGeometry( x, y, w, h, TRUE );
+ internalSetGeometry( x, y, w, h, true );
setWState( WState_Resized );
if ( isVisible() && oldp != pos() )
qt_update_bg_recursive( this );
@@ -3906,7 +3906,7 @@ void TQWidget::setFocusPolicy( FocusPolicy policy )
if ( focusProxy() )
focusProxy()->setFocusPolicy( policy );
if ( policy != NoFocus ) {
- TQFocusData * f = focusData( TRUE );
+ TQFocusData * f = focusData( true );
if ( f->focusWidgets.findRef( this ) < 0 )
f->focusWidgets.append( this );
}
@@ -3927,9 +3927,9 @@ void TQWidget::setFocusPolicy( FocusPolicy policy )
Example:
\code
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
bigVisualChanges();
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
repaint();
\endcode
@@ -4032,7 +4032,7 @@ void TQWidget::show()
if ( !testWState(WState_Polished) )
polish();
- showChildren( FALSE );
+ showChildren( false );
if ( postLayoutHint )
TQApplication::postEvent( parentWidget(),
@@ -4118,10 +4118,10 @@ void TQWidget::hide()
// next bit tries to move the focus if the focus widget is now
// hidden.
if ( tqApp && tqApp->focusWidget() == this )
- focusNextPrevChild( TRUE );
+ focusNextPrevChild( true );
TQHideEvent hideEvent;
TQApplication::sendEvent( this, &hideEvent );
- hideChildren( FALSE );
+ hideChildren( false );
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::ObjectHide );
@@ -4286,10 +4286,10 @@ void TQWidget::polish()
/*!
\overload
- Closes this widget. Returns TRUE if the widget was closed;
- otherwise returns FALSE.
+ Closes this widget. Returns true if the widget was closed;
+ otherwise returns false.
- If \a alsoDelete is TRUE or the widget has the \c
+ If \a alsoDelete is true or the widget has the \c
WDestructiveClose widget flag, the widget is also deleted. The
widget can prevent itself from being closed by rejecting the
\l TQCloseEvent it gets. A close events is delivered to the widget
@@ -4308,18 +4308,18 @@ void TQWidget::polish()
bool TQWidget::close( bool alsoDelete )
{
if ( is_closing )
- return TRUE;
+ return true;
is_closing = 1;
WId id = winId();
bool isMain = tqApp->mainWidget() == this;
bool checkLastWindowClosed = isTopLevel() && !isPopup();
- bool deleted = FALSE;
+ bool deleted = false;
TQCloseEvent e;
TQApplication::sendEvent( this, &e );
deleted = !TQWidget::find(id);
if ( !deleted && !e.isAccepted() ) {
is_closing = 0;
- return FALSE;
+ return false;
}
if ( !deleted && !isHidden() )
hide();
@@ -4345,7 +4345,7 @@ bool TQWidget::close( bool alsoDelete )
if ( isMain )
tqApp->quit();
if ( deleted )
- return TRUE;
+ return true;
is_closing = 0;
if ( alsoDelete )
delete this;
@@ -4353,15 +4353,15 @@ bool TQWidget::close( bool alsoDelete )
clearWFlags(WDestructiveClose);
deleteLater();
}
- return TRUE;
+ return true;
}
/*!
\fn bool TQWidget::close()
- Closes this widget. Returns TRUE if the widget was closed;
- otherwise returns FALSE.
+ Closes this widget. Returns true if the widget was closed;
+ otherwise returns false.
First it sends the widget a TQCloseEvent. The widget is \link
hide() hidden\endlink if it \link TQCloseEvent::accept()
@@ -4407,13 +4407,13 @@ bool TQWidget::close( bool alsoDelete )
/*!
- Returns TRUE if this widget would become visible if \a ancestor is
- shown; otherwise returns FALSE.
+ Returns true if this widget would become visible if \a ancestor is
+ shown; otherwise returns false.
- The TRUE case occurs if neither the widget itself nor any parent
+ The true case occurs if neither the widget itself nor any parent
up to but excluding \a ancestor has been explicitly hidden.
- This function will still return TRUE if the widget is obscured by
+ This function will still return true if the widget is obscured by
other windows on the screen, but could be physically visible if it
or they were to be moved.
@@ -4448,7 +4448,7 @@ bool TQWidget::isVisibleTo(TQWidget* ancestor) const
\property TQWidget::hidden
\brief whether the widget is explicitly hidden
- If FALSE, the widget is visible or would become visible if all its
+ If false, the widget is visible or would become visible if all its
ancestors became visible.
\sa hide(), show(), isVisible(), isVisibleTo(), shown
@@ -4458,7 +4458,7 @@ bool TQWidget::isVisibleTo(TQWidget* ancestor) const
\property TQWidget::shown
\brief whether the widget is shown
- If TRUE, the widget is visible or would become visible if all its
+ If true, the widget is visible or would become visible if all its
ancestors became visible.
\sa hide(), show(), isVisible(), isVisibleTo(), hidden
@@ -4616,7 +4616,7 @@ TQSize TQWidget::minimumSizeHint() const
\fn TQWidget *TQWidget::parentWidget( bool sameWindow ) const
Returns the parent of this widget, or 0 if it does not have any
- parent widget. If \a sameWindow is TRUE and the widget is top
+ parent widget. If \a sameWindow is true and the widget is top
level returns 0; otherwise returns the widget's parent.
*/
@@ -4693,8 +4693,8 @@ TQSize TQWidget::minimumSizeHint() const
(or the key press is not Tab or Shift+Tab), event() calls
keyPressEvent().
- This function returns TRUE if it is able to pass the event over to
- someone (i.e. someone wanted the event); otherwise returns FALSE.
+ This function returns true if it is able to pass the event over to
+ someone (i.e. someone wanted the event); otherwise returns false.
\sa closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(),
keyPressEvent(), keyReleaseEvent(), leaveEvent(),
@@ -4706,13 +4706,13 @@ TQSize TQWidget::minimumSizeHint() const
bool TQWidget::event( TQEvent *e )
{
if ( TQObject::event( e ) )
- return TRUE;
+ return true;
switch ( e->type() ) {
case TQEvent::MouseMove:
mouseMoveEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonPress:
@@ -4725,25 +4725,25 @@ bool TQWidget::event( TQEvent *e )
#endif
mousePressEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonRelease:
mouseReleaseEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::MouseButtonDblClick:
mouseDoubleClickEvent( (TQMouseEvent*)e );
if ( ! ((TQMouseEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
#ifndef TQT_NO_WHEELEVENT
case TQEvent::Wheel:
wheelEvent( (TQWheelEvent*)e );
if ( ! ((TQWheelEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
#endif
case TQEvent::TabletMove:
@@ -4751,25 +4751,25 @@ bool TQWidget::event( TQEvent *e )
case TQEvent::TabletRelease:
tabletEvent( (TQTabletEvent*)e );
if ( ! ((TQTabletEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::Accel:
((TQKeyEvent*)e)->ignore();
- return FALSE;
+ return false;
case TQEvent::KeyPress: {
TQKeyEvent *k = (TQKeyEvent *)e;
- bool res = FALSE;
+ bool res = false;
if ( !(k->state() & ControlButton || k->state() & AltButton) ) {
if ( k->key() == Key_Backtab ||
(k->key() == Key_Tab &&
(k->state() & ShiftButton)) ) {
TQFocusEvent::setReason( TQFocusEvent::Backtab );
- res = focusNextPrevChild( FALSE );
+ res = focusNextPrevChild( false );
TQFocusEvent::resetReason();
} else if ( k->key() == Key_Tab ) {
TQFocusEvent::setReason( TQFocusEvent::Tab );
- res = focusNextPrevChild( TRUE );
+ res = focusNextPrevChild( true );
TQFocusEvent::resetReason();
}
if ( res )
@@ -4777,21 +4777,21 @@ bool TQWidget::event( TQEvent *e )
}
keyPressEvent( k );
if ( !k->isAccepted() )
- return FALSE;
+ return false;
}
break;
case TQEvent::KeyRelease:
keyReleaseEvent( (TQKeyEvent*)e );
if ( ! ((TQKeyEvent*)e)->isAccepted() )
- return FALSE;
+ return false;
break;
case TQEvent::IMStart: {
TQIMEvent *i = (TQIMEvent *) e;
imStartEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4799,7 +4799,7 @@ bool TQWidget::event( TQEvent *e )
TQIMEvent *i = (TQIMEvent *) e;
imComposeEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4807,7 +4807,7 @@ bool TQWidget::event( TQEvent *e )
TQIMEvent *i = (TQIMEvent *) e;
imEndEvent(i);
if (! i->isAccepted())
- return FALSE;
+ return false;
}
break;
@@ -4847,7 +4847,7 @@ bool TQWidget::event( TQEvent *e )
TQCloseEvent *c = (TQCloseEvent *)e;
closeEvent( c );
if ( !c->isAccepted() )
- return FALSE;
+ return false;
}
break;
@@ -4855,7 +4855,7 @@ bool TQWidget::event( TQEvent *e )
TQContextMenuEvent *c = (TQContextMenuEvent *)e;
contextMenuEvent( c );
if ( !c->isAccepted() )
- return FALSE;
+ return false;
}
break;
@@ -4939,7 +4939,7 @@ bool TQWidget::event( TQEvent *e )
}
}
if ( e->type() == TQEvent::LanguageChange ) {
- int index = metaObject()->findSlot( "languageChange()", TRUE );
+ int index = metaObject()->findSlot( "languageChange()", true );
if ( index >= 0 )
tqt_invoke( index, 0 );
}
@@ -4950,7 +4950,7 @@ bool TQWidget::event( TQEvent *e )
if ( layout() ) {
layout()->activate();
} else {
- TQObjectList* llist = queryList( "TQLayout", 0, TRUE, TRUE );
+ TQObjectList* llist = queryList( "TQLayout", 0, true, true );
TQObjectListIt lit( *llist );
TQLayout *lay;
while ( ( lay = (TQLayout*)lit.current() ) != 0 ) {
@@ -4994,9 +4994,9 @@ bool TQWidget::event( TQEvent *e )
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/*!
@@ -5208,7 +5208,7 @@ void TQWidget::focusInEvent( TQFocusEvent * )
update();
if ( testWState(WState_AutoMask) )
updateMask();
- setMicroFocusHint(width()/2, 0, 1, height(), FALSE);
+ setMicroFocusHint(width()/2, 0, 1, height(), false);
}
}
@@ -5538,7 +5538,7 @@ void TQWidget::hideEvent( TQHideEvent * )
receive native X11 events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5555,7 +5555,7 @@ void TQWidget::hideEvent( TQHideEvent * )
receive native Macintosh events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5566,7 +5566,7 @@ void TQWidget::hideEvent( TQHideEvent * )
bool TQWidget::macEvent( MSG * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5577,7 +5577,7 @@ bool TQWidget::macEvent( MSG * )
receive native Windows events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5587,7 +5587,7 @@ bool TQWidget::macEvent( MSG * )
*/
bool TQWidget::winEvent( MSG * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5598,7 +5598,7 @@ bool TQWidget::winEvent( MSG * )
receive native X11 events.
In your reimplementation of this function, if you want to stop the
- event being handled by TQt, return TRUE. If you return FALSE, this
+ event being handled by TQt, return true. If you return false, this
native event is passed back to TQt, which translates the event into
a TQt event and sends it to the widget.
@@ -5608,7 +5608,7 @@ bool TQWidget::winEvent( MSG * )
*/
bool TQWidget::x11Event( XEvent * )
{
- return FALSE;
+ return false;
}
#endif
@@ -5619,7 +5619,7 @@ bool TQWidget::x11Event( XEvent * )
Transparent widgets use a mask to define their visible region.
TQWidget has some built-in support to make the task of
- recalculating the mask easier. When setting auto mask to TRUE,
+ recalculating the mask easier. When setting auto mask to true,
updateMask() will be called whenever the widget is resized or
changes its focus state. Note that you must reimplement
updateMask() (which should include a call to setMask()) or nothing
@@ -5742,13 +5742,13 @@ TQPoint TQWidget::backgroundOffset() const
{
const TQWidget *topl = this;
while(topl && !topl->isTopLevel() && !topl->testWFlags(TQt::WSubWindow))
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
return mapTo((TQWidget *)topl, TQPoint(0, 0) );
}
case AncestorOrigin:
{
const TQWidget *topl = this;
- bool ancestorIsWindowOrigin = FALSE;
+ bool ancestorIsWindowOrigin = false;
while(topl && !topl->isTopLevel() && !topl->testWFlags(TQt::WSubWindow))
{
if (!ancestorIsWindowOrigin) {
@@ -5756,13 +5756,13 @@ TQPoint TQWidget::backgroundOffset() const
break;
if (topl->backgroundOrigin() == TQWidget::ParentOrigin)
{
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
break;
}
if (topl->backgroundOrigin() == TQWidget::WindowOrigin)
- ancestorIsWindowOrigin = TRUE;
+ ancestorIsWindowOrigin = true;
}
- topl = topl->parentWidget(TRUE);
+ topl = topl->parentWidget(true);
}
return mapTo((TQWidget *) topl, TQPoint(0,0) );
@@ -5868,7 +5868,7 @@ int TQWidget::heightForWidth( int w ) const
\property TQWidget::customWhatsThis
\brief whether the widget wants to handle What's This help manually
- The default implementation of customWhatsThis() returns FALSE,
+ The default implementation of customWhatsThis() returns false,
which means the widget will not receive any events in Whats This
mode.
@@ -5884,14 +5884,14 @@ int TQWidget::heightForWidth( int w ) const
*/
bool TQWidget::customWhatsThis() const
{
- return FALSE;
+ return false;
}
/*!
Returns the visible child widget at pixel position \a (x, y) in
the widget's own coordinate system.
- If \a includeThis is TRUE, and there is no child visible at \a (x,
+ If \a includeThis is true, and there is no child visible at \a (x,
y), the widget itself is returned.
*/
TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
@@ -5905,7 +5905,7 @@ TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
while( (w=(TQWidget *)it.current()) != 0 ) {
--it;
if ( w->isWidgetType() && !w->isTopLevel() && !w->isHidden() ) {
- if ( ( t = w->childAt( x - w->x(), y - w->y(), TRUE ) ) )
+ if ( ( t = w->childAt( x - w->x(), y - w->y(), true ) ) )
return t;
}
}
@@ -5921,7 +5921,7 @@ TQWidget *TQWidget::childAt( int x, int y, bool includeThis ) const
Returns the visible child widget at point \a p in the widget's own
coordinate system.
- If \a includeThis is TRUE, and there is no child visible at \a p,
+ If \a includeThis is true, and there is no child visible at \a p,
the widget itself is returned.
*/
@@ -5954,7 +5954,7 @@ void TQWidget::updateGeometry()
flags (\a f, but as usual, use 0) at a new position in its new
parent (\a p).
- If \a showIt is TRUE, show() is called once the widget has been
+ If \a showIt is true, show() is called once the widget has been
reparented.
If the new parent widget is in a different top-level widget, the
@@ -6011,7 +6011,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownCursor
\brief whether the widget uses its own cursor
- If FALSE, the widget uses its parent widget's cursor.
+ If false, the widget uses its parent widget's cursor.
\sa cursor
*/
@@ -6020,7 +6020,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownFont
\brief whether the widget uses its own font
- If FALSE, the widget uses its parent widget's font.
+ If false, the widget uses its parent widget's font.
\sa font
*/
@@ -6029,7 +6029,7 @@ void TQWidget::reparent( TQWidget *parent, const TQPoint & p,
\property TQWidget::ownPalette
\brief whether the widget uses its own palette
- If FALSE, the widget uses its parent widget's palette.
+ If false, the widget uses its parent widget's palette.
\sa palette
*/
diff --git a/src/kernel/tqwidget.h b/src/kernel/tqwidget.h
index cf0325f3c..ce26e00cb 100644
--- a/src/kernel/tqwidget.h
+++ b/src/kernel/tqwidget.h
@@ -342,9 +342,9 @@ public slots:
void update( const TQRect& );
void repaint();
void repaint( bool erase );
- void repaint( int x, int y, int w, int h, bool erase=TRUE );
- void repaint( const TQRect &, bool erase = TRUE );
- void repaint( const TQRegion &, bool erase = TRUE );
+ void repaint( int x, int y, int w, int h, bool erase=true );
+ void repaint( const TQRect &, bool erase = true );
+ void repaint( const TQRegion &, bool erase = true );
// Widget management functions
@@ -392,7 +392,7 @@ public:
virtual TQSize minimumSizeHint() const;
virtual TQSizePolicy sizePolicy() const;
virtual void setSizePolicy( TQSizePolicy );
- void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = FALSE );
+ void setSizePolicy( TQSizePolicy::SizeType hor, TQSizePolicy::SizeType ver, bool hfw = false );
virtual int heightForWidth(int) const;
TQRegion clipRegion() const;
@@ -407,12 +407,12 @@ public:
#endif
void updateGeometry();
virtual void reparent( TQWidget *parent, WFlags, const TQPoint &,
- bool showIt=FALSE );
+ bool showIt=false );
void reparent( TQWidget *parent, const TQPoint &,
- bool showIt=FALSE );
+ bool showIt=false );
#ifndef TQT_NO_COMPAT
void recreate( TQWidget *parent, WFlags f, const TQPoint & p,
- bool showIt=FALSE ) { reparent(parent,f,p,showIt); }
+ bool showIt=false ) { reparent(parent,f,p,showIt); }
#endif
void erase();
@@ -449,7 +449,7 @@ public:
// whats this help
virtual bool customWhatsThis() const;
- TQWidget * parentWidget( bool sameWindow = FALSE ) const;
+ TQWidget * parentWidget( bool sameWindow = false ) const;
WState testWState( WState s ) const;
WFlags testWFlags( WFlags f ) const;
NFlags testNFlags( NFlags f ) const;
@@ -459,14 +459,14 @@ public:
static TQWidget * find( WId );
static TQWidgetMapper *wmapper();
- TQWidget *childAt( int x, int y, bool includeThis = FALSE ) const;
- TQWidget *childAt( const TQPoint &, bool includeThis = FALSE ) const;
+ TQWidget *childAt( int x, int y, bool includeThis = false ) const;
+ TQWidget *childAt( const TQPoint &, bool includeThis = false ) const;
#if defined(TQ_WS_MAC)
- TQRegion clippedRegion(bool do_children=TRUE);
- uint clippedSerial(bool do_children=TRUE);
+ TQRegion clippedRegion(bool do_children=true);
+ uint clippedSerial(bool do_children=true);
#ifndef TQMAC_NO_QUARTZ
- CGContextRef macCGContext(bool clipped=TRUE) const;
+ CGContextRef macCGContext(bool clipped=true) const;
#endif
#endif
#if defined(TQ_WS_X11)
@@ -561,10 +561,10 @@ protected:
#endif
void resetInputContext();
- virtual void create( WId = 0, bool initializeWindow = TRUE,
- bool destroyOldWindow = TRUE );
- virtual void destroy( bool destroyWindow = TRUE,
- bool destroySubWindows = TRUE );
+ virtual void create( WId = 0, bool initializeWindow = true,
+ bool destroyOldWindow = true );
+ virtual void destroy( bool destroyWindow = true,
+ bool destroySubWindows = true );
virtual void setWState( uint );
void clearWState( uint n );
virtual void setWFlags( WFlags );
@@ -579,7 +579,7 @@ protected:
TQFocusData *focusData();
virtual void setKeyCompression(bool);
- virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=TRUE, TQFont *f = 0);
+ virtual void setMicroFocusHint(int x, int y, int w, int h, bool text=true, TQFont *f = 0);
#if defined(TQ_WS_MAC)
void dirtyClippedRegion(bool);
@@ -613,7 +613,7 @@ private:
uint own_id : 1, macDropEnabled : 1;
EventHandlerRef window_event;
//mac event functions
- void propagateUpdates(bool update_rgn=TRUE);
+ void propagateUpdates(bool update_rgn=true);
void update( const TQRegion& );
//friends, way too many - fix this immediately!
friend void qt_clean_root_win();
@@ -824,7 +824,7 @@ inline void TQWidget::update( const TQRect &r )
{ update( r.x(), r.y(), r.width(), r.height() ); }
inline void TQWidget::repaint()
-{ repaint( TRUE ); }
+{ repaint( true ); }
inline void TQWidget::repaint( const TQRect &r, bool erase )
{ repaint( r.x(), r.y(), r.width(), r.height(), erase ); }
@@ -836,7 +836,7 @@ inline void TQWidget::erase( const TQRect &r )
{ erase( r.x(), r.y(), r.width(), r.height() ); }
inline bool TQWidget::close()
-{ return close( FALSE ); }
+{ return close( false ); }
inline bool TQWidget::isVisible() const
{ return testWState(WState_Visible); }
diff --git a/src/kernel/tqwidget_x11.cpp b/src/kernel/tqwidget_x11.cpp
index c8492c6e6..808d2ef4c 100644
--- a/src/kernel/tqwidget_x11.cpp
+++ b/src/kernel/tqwidget_x11.cpp
@@ -304,15 +304,15 @@ static void qt_net_change_wm_state(const TQWidget* w, bool set, Atom one, Atom t
widget's window to \a window.
Initializes the window (sets the geometry etc.) if \a
- initializeWindow is TRUE. If \a initializeWindow is FALSE, no
+ initializeWindow is true. If \a initializeWindow is false, no
initialization is performed. This parameter only makes sense if \a
window is a valid window.
- Destroys the old window if \a destroyOldWindow is TRUE. If \a
- destroyOldWindow is FALSE, you are responsible for destroying the
+ Destroys the old window if \a destroyOldWindow is true. If \a
+ destroyOldWindow is false, you are responsible for destroying the
window yourself (using platform native code).
- The TQWidget constructor calls create(0,TRUE,TRUE) to create a
+ The TQWidget constructor calls create(0,true,true) to create a
window for this widget.
*/
@@ -346,13 +346,13 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
// always initialize
if ( !window )
- initializeWindow = TRUE;
+ initializeWindow = true;
if ( desktop &&
qt_x11_create_desktop_on_screen >= 0 &&
qt_x11_create_desktop_on_screen != x11Screen() ) {
// desktop on a certain screen other than the default requested
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = qt_x11_create_desktop_on_screen;
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -363,7 +363,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
setX11Data( xd );
} else if ( parentWidget() && parentWidget()->x11Screen() != x11Screen() ) {
// if we have a parent widget, move to its screen if necessary
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
xd->x_screen = parentWidget()->x11Screen();
xd->x_depth = TQPaintDevice::x11AppDepth( xd->x_screen );
xd->x_cells = TQPaintDevice::x11AppCells( xd->x_screen );
@@ -383,7 +383,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
int sh = DisplayHeight(dpy,scr);
if ( desktop ) { // desktop widget
- dialog = popup = FALSE; // force these flags off
+ dialog = popup = false; // force these flags off
crect.setRect( 0, 0, sw, sh );
} else if ( topLevel ) { // calc pos/size from screen
crect.setRect( sw/4, 3*sh/10, sw/2, 4*sh/10 );
@@ -409,7 +409,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
else
setWState( WState_Visible );
- TQPaintDeviceX11Data* xd = getX11Data( TRUE );
+ TQPaintDeviceX11Data* xd = getX11Data( true );
// find which screen the window is on...
xd->x_screen = TQPaintDevice::x11AppScreen(); // by default, use the default :)
@@ -757,7 +757,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
}
setWState( WState_MouseTracking );
- setMouseTracking( FALSE ); // also sets event mask
+ setMouseTracking( false ); // also sets event mask
if ( desktop ) {
setWState( WState_Visible );
} else if ( topLevel ) { // set X cursor
@@ -777,7 +777,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
/*!
Frees up window system resources. Destroys the widget window if \a
- destroyWindow is TRUE.
+ destroyWindow is true.
destroy() calls itself recursively for all the child widgets,
passing \a destroySubWindows for the \a destroyWindow parameter.
@@ -825,7 +825,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
if ( testWFlags(WType_Desktop) ) {
if ( acceptDrops() )
- qt_dnd_enable( this, FALSE );
+ qt_dnd_enable( this, false );
} else {
if ( destroyWindow )
qt_XDestroyWindow( this, x11Display(), winid );
@@ -867,7 +867,7 @@ void TQWidget::reparentSys( TQWidget *parent, WFlags f, const TQPoint &p, bool s
// dnd unregister (we will register again below)
bool accept_drops = acceptDrops();
- setAcceptDrops( FALSE );
+ setAcceptDrops( false );
// clear mouse tracking, re-enabled below
bool mouse_tracking = hasMouseTracking();
@@ -987,7 +987,7 @@ void TQWidget::reparentSys( TQWidget *parent, WFlags f, const TQPoint &p, bool s
oldparent->checkChildrenDnd();
if ( accept_drops )
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
else {
checkChildrenDnd();
topData()->dnd = 0;
@@ -1099,15 +1099,15 @@ TQPoint TQWidget::mapFromGlobal( const TQPoint &pos ) const
height. This has no \e visual effect, it just provides hints to
any system-specific input handling tools.
- The \a text argument should be TRUE if this is a position for text
+ The \a text argument should be true if this is a position for text
input.
In the Windows version of TQt, this method sets the system caret,
which is used for user Accessibility focus handling. If \a text
- is TRUE, it also sets the IME composition window in Far East Asian
+ is true, it also sets the IME composition window in Far East Asian
language input systems.
- In the X11 version of TQt, if \a text is TRUE, this method sets the
+ In the X11 version of TQt, if \a text is true, this method sets the
input method focus point in the preedit (XIM "spot" point) for
complex language input handling.
@@ -1241,13 +1241,13 @@ static XTextProperty*
tqstring_to_xtp( const TQString& s )
{
static XTextProperty tp = { 0, 0, 0, 0 };
- static bool free_prop = TRUE; // we can't free tp.value in case it references
+ static bool free_prop = true; // we can't free tp.value in case it references
// the data of the static TQCString below.
if ( tp.value ) {
if ( free_prop )
XFree( tp.value );
tp.value = 0;
- free_prop = TRUE;
+ free_prop = true;
}
static const TQTextCodec* mapper = TQTextCodec::codecForLocale();
@@ -1271,7 +1271,7 @@ tqstring_to_xtp( const TQString& s )
tp.encoding = XA_STRING;
tp.format = 8;
tp.nitems = qcs.length();
- free_prop = FALSE;
+ free_prop = false;
}
// ### If we knew WM could understand unicode, we could use
@@ -1436,7 +1436,7 @@ void TQWidget::setMouseTracking( bool enable )
button is released.
Note that only visible widgets can grab mouse input. If
- isVisible() returns FALSE for a widget, that widget cannot call
+ isVisible() returns false for a widget, that widget cannot call
grabMouse().
\sa releaseMouse() grabKeyboard() releaseKeyboard() grabKeyboard()
@@ -1736,7 +1736,7 @@ void TQWidget::update( int x, int y, int w, int h )
Repaints the widget directly by calling paintEvent() immediately,
unless updates are disabled or the widget is hidden.
- If \a erase is TRUE, TQt erases the area \a (x, y, w, h) before the
+ If \a erase is true, TQt erases the area \a (x, y, w, h) before the
paintEvent() call.
If \a w is negative, it is replaced with \c{width() - x}, and if
@@ -1786,7 +1786,7 @@ void TQWidget::repaint( int x, int y, int w, int h, bool erase )
Repaints the widget directly by calling paintEvent() directly,
unless updates are disabled or the widget is hidden.
- Erases the widget region \a reg if \a erase is TRUE.
+ Erases the widget region \a reg if \a erase is true.
Only use repaint if your widget needs to be repainted immediately,
for example when doing some animation. In all other cases, use
@@ -1818,12 +1818,12 @@ void TQWidget::repaint( const TQRegion& reg, bool erase )
Repaints the widget directly by calling paintEvent() directly,
unless updates are disabled or the widget is hidden.
- Erases the widget region \a r if \a erase is TRUE.
+ Erases the widget region \a r if \a erase is true.
*/
void TQWidget::setWindowState(uint newstate)
{
- bool needShow = FALSE;
+ bool needShow = false;
uint oldstate = windowState();
if (isTopLevel()) {
TQTLWExtra *top = topData();
@@ -1920,7 +1920,7 @@ void TQWidget::setWindowState(uint newstate)
}
}
- needShow = FALSE;
+ needShow = false;
}
}
@@ -2031,7 +2031,7 @@ void TQWidget::hideWindow()
// zero the frame strut and mark it dirty
top->fleft = top->fright = top->ftop = top->fbottom = 0;
- fstrut_dirty = TRUE;
+ fstrut_dirty = true;
XFlush( x11Display() );
} else {
@@ -2472,7 +2472,7 @@ void TQWidget::scroll( int dx, int dy, const TQRect& r )
return;
Display *dpy = x11Display();
- GC gc = tqt_xget_readonly_gc( x11Screen(), FALSE );
+ GC gc = tqt_xget_readonly_gc( x11Screen(), false );
// Want expose events
if ( w > 0 && h > 0 && !just_update ) {
XSetGraphicsExposures( dpy, gc, True );
@@ -2604,8 +2604,8 @@ int TQWidget::metric( int m ) const
void TQWidget::createSysExtra()
{
extra->xDndProxy = 0;
- extra->children_use_dnd = FALSE;
- extra->compress_events = TRUE;
+ extra->children_use_dnd = false;
+ extra->compress_events = true;
}
void TQWidget::deleteSysExtra()
@@ -2646,7 +2646,7 @@ void TQWidget::checkChildrenDnd()
while (widget && ! widget->isDesktop()) {
// note: this isn't done for the desktop widget
- bool children_use_dnd = FALSE;
+ bool children_use_dnd = false;
children = widget->children();
if ( children ) {
TQObjectListIt it(*children);
@@ -2718,7 +2718,7 @@ void TQWidget::handleSyncRequest( void* ev )
\property TQWidget::acceptDrops
\brief whether drop events are enabled for this widget
- Setting this property to TRUE announces to the system that this
+ Setting this property to true announces to the system that this
widget \e may be able to accept drop events.
If the widget is the desktop (TQWidget::isDesktop()), this may
@@ -2992,7 +2992,7 @@ void TQWidget::changeInputContext( const TQString& identifierName )
according to a configuration for default input method
When TQT_NO_IM_EXTENSIONS is not set, input context is
- generated only when isInputMethodEnabled() returns TRUE.
+ generated only when isInputMethodEnabled() returns true.
*/
void TQWidget::createInputContext()
{
diff --git a/src/kernel/tqwmatrix.cpp b/src/kernel/tqwmatrix.cpp
index eb5ce5087..0c5fddc67 100644
--- a/src/kernel/tqwmatrix.cpp
+++ b/src/kernel/tqwmatrix.cpp
@@ -157,7 +157,7 @@ double qsincos( double, bool calcCos ); // defined in tqpainter_x11.cpp
\sa TQPainter::setWorldMatrix(), TQPixmap::xForm()
*/
-bool qt_old_transformations = TRUE;
+bool qt_old_transformations = true;
/*!
\enum TQWMatrix::TransformationMode
@@ -216,9 +216,9 @@ bool qt_old_transformations = TRUE;
void TQWMatrix::setTransformationMode( TQWMatrix::TransformationMode m )
{
if ( m == TQWMatrix::Points )
- qt_old_transformations = TRUE;
+ qt_old_transformations = true;
else
- qt_old_transformations = FALSE;
+ qt_old_transformations = false;
}
@@ -772,7 +772,7 @@ void TQWMatrix::reset()
}
/*!
- Returns TRUE if the matrix is the identity matrix; otherwise returns FALSE.
+ Returns true if the matrix is the identity matrix; otherwise returns false.
\sa reset()
*/
@@ -852,8 +852,8 @@ TQWMatrix &TQWMatrix::rotate( double a )
{
double b = deg2rad*a; // convert to radians
#if defined(TQ_WS_X11)
- double sina = qsincos(b,FALSE); // fast and convenient
- double cosa = qsincos(b,TRUE);
+ double sina = qsincos(b,false); // fast and convenient
+ double cosa = qsincos(b,true);
#else
double sina = sin(b);
double cosa = cos(b);
@@ -870,7 +870,7 @@ TQWMatrix &TQWMatrix::rotate( double a )
/*!
\fn bool TQWMatrix::isInvertible() const
- Returns TRUE if the matrix is invertible; otherwise returns FALSE.
+ Returns true if the matrix is invertible; otherwise returns false.
\sa invert()
*/
@@ -889,8 +889,8 @@ TQWMatrix &TQWMatrix::rotate( double a )
returned.
If \a invertible is not 0: the value of \a *invertible is set
- to TRUE if the matrix is invertible; otherwise \a *invertible is
- set to FALSE.
+ to true if the matrix is invertible; otherwise \a *invertible is
+ set to false.
\sa isInvertible()
*/
@@ -900,13 +900,13 @@ TQWMatrix TQWMatrix::invert( bool *invertible ) const
double determinant = det();
if ( determinant == 0.0 ) {
if ( invertible )
- *invertible = FALSE; // singular matrix
+ *invertible = false; // singular matrix
TQWMatrix defaultMatrix;
return defaultMatrix;
}
else { // invertible matrix
if ( invertible )
- *invertible = TRUE;
+ *invertible = true;
double dinv = 1.0/determinant;
TQWMatrix imatrix( (_m22*dinv), (-_m12*dinv),
(-_m21*dinv), ( _m11*dinv),
@@ -918,7 +918,7 @@ TQWMatrix TQWMatrix::invert( bool *invertible ) const
/*!
- Returns TRUE if this matrix is equal to \a m; otherwise returns FALSE.
+ Returns true if this matrix is equal to \a m; otherwise returns false.
*/
bool TQWMatrix::operator==( const TQWMatrix &m ) const
@@ -932,7 +932,7 @@ bool TQWMatrix::operator==( const TQWMatrix &m ) const
}
/*!
- Returns TRUE if this matrix is not equal to \a m; otherwise returns FALSE.
+ Returns true if this matrix is not equal to \a m; otherwise returns false.
*/
bool TQWMatrix::operator!=( const TQWMatrix &m ) const
diff --git a/src/network/tqdns.cpp b/src/network/tqdns.cpp
index b44f43433..4e5038657 100644
--- a/src/network/tqdns.cpp
+++ b/src/network/tqdns.cpp
@@ -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 ||
rr->t == TQDns::None ||
rr->deleteTime <= thisSweep ||
rr->expireTime <= thisSweep )
diff --git a/src/widgets/tqlistbox.cpp b/src/widgets/tqlistbox.cpp
index e209240e6..c5032d1d4 100644
--- a/src/widgets/tqlistbox.cpp
+++ b/src/widgets/tqlistbox.cpp
@@ -4573,7 +4573,7 @@ void TQListBox::handleItemChange( TQListBoxItem *old, bool shift, bool control )
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->current, FALSE, TRUE, (d->selectAnchor && !control) ? TRUE : FALSE );
+ d->current, FALSE, TRUE, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
blockSignals( TRUE );
diff --git a/src/widgets/tqlistview.cpp b/src/widgets/tqlistview.cpp
index 6d8f3771f..6d8cc3b37 100644
--- a/src/widgets/tqlistview.cpp
+++ b/src/widgets/tqlistview.cpp
@@ -5745,7 +5745,7 @@ TQt::SortOrder TQListView::sortOrder() const
*/
void TQListView::setSortOrder( SortOrder order )
{
- setSorting( d->sortcolumn, order == Ascending ? TRUE : FALSE );
+ setSorting( d->sortcolumn, order == Ascending );
}
/*!
@@ -7901,7 +7901,7 @@ void TQListView::handleItemChange( TQListViewItem *old, bool shift, bool control
} else if ( d->selectionMode == Extended ) {
if ( shift ) {
selectRange( d->selectAnchor ? d->selectAnchor : old,
- d->focusItem, FALSE, TRUE, (d->selectAnchor && !control) ? TRUE : FALSE );
+ d->focusItem, FALSE, TRUE, d->selectAnchor && !control );
} else if ( !control ) {
bool block = signalsBlocked();
blockSignals( TRUE );