summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/tqobject.cpp')
-rw-r--r--src/kernel/tqobject.cpp314
1 files changed, 157 insertions, 157 deletions
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 );