summaryrefslogtreecommitdiffstats
path: root/src/kernel/tqeventloop_unix_glib.cpp
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 /src/kernel/tqeventloop_unix_glib.cpp
parent5a863a8932d14b99c5f838c4efa1618070d71b29 (diff)
downloadtqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.tar.gz
tqt-7d612f7c91d55501276a385a30dbadb121e7bd9f.zip
Replace TRUE/FALSE with boolean values true/false - part 8HEADmaster
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel/tqeventloop_unix_glib.cpp')
-rw-r--r--src/kernel/tqeventloop_unix_glib.cpp38
1 files changed, 19 insertions, 19 deletions
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) ||