summaryrefslogtreecommitdiffstats
path: root/src/kernel/qeventloop_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-14 17:51:59 +0900
commit3a477fb70884668d163f6631a73c8ab894928bcc (patch)
tree0ac0327df978cf22b7a1f495f0649591bb39ed2a /src/kernel/qeventloop_unix_glib.cpp
parente4085a83c143eb366d0364596297b322476cc652 (diff)
downloadtqt-r14.1.x.tar.gz
tqt-r14.1.x.zip
Replace TRUE/FALSE with boolean values true/false - part 8r14.1.x
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 7d612f7c91d55501276a385a30dbadb121e7bd9f)
Diffstat (limited to 'src/kernel/qeventloop_unix_glib.cpp')
-rw-r--r--src/kernel/qeventloop_unix_glib.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp
index d86ba14fc..65bf39b09 100644
--- a/src/kernel/qeventloop_unix_glib.cpp
+++ b/src/kernel/qeventloop_unix_glib.cpp
@@ -83,14 +83,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
*****************************************************************************/
//
@@ -266,7 +266,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 );
@@ -274,7 +274,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
@@ -320,7 +320,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 );
}
@@ -379,7 +379,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
@@ -398,7 +398,7 @@ bool qKillTimer( int id )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return FALSE;
+ return false;
}
}
@@ -412,7 +412,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
@@ -428,7 +428,7 @@ bool qKillTimer( TQObject *obj )
#if defined(TQT_THREAD_SUPPORT)
if (tqt_timerListMutex) tqt_timerListMutex->unlock();
#endif
- return TRUE;
+ return true;
}
@@ -440,7 +440,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;
@@ -454,9 +454,9 @@ TQEventLoopPrivate::~TQEventLoopPrivate() {
void TQEventLoopPrivate::reset() {
looplevel = 0;
quitcode = 0;
- quitnow = FALSE;
- exitloop = FALSE;
- shortcut = FALSE;
+ quitnow = false;
+ exitloop = false;
+ shortcut = false;
}
@@ -490,7 +490,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;
}
*/
@@ -514,7 +514,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 );
@@ -593,7 +593,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!
}
}
@@ -643,7 +643,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;
@@ -658,7 +658,7 @@ int TQEventLoop::activateTimers()
if ( currentTime < watchtime ) { // clock was turned back
repairTimer( currentTime );
}
- first = FALSE;
+ first = false;
watchtime = currentTime;
}
t = timerList->first();
@@ -732,7 +732,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) ||