@ -22,8 +22,8 @@
# include "qiomanager.h"
# include "qiomanager_p.h"
# include < t qsocketnotifier.h>
# include < t qapplication.h>
# include < qsocketnotifier.h>
# include < qapplication.h>
# include "debug.h"
# include "dispatcher.h"
# include "thread.h"
@ -66,11 +66,11 @@ static bool qioBlocking;
* QIOWatch :
*/
QIOWatch : : QIOWatch ( int fd , int type , IONotify * notify ,
T QSocketNotifier: : Type qtype , bool reentrant )
QSocketNotifier: : Type qtype , bool reentrant )
: _fd ( fd ) , _type ( type ) , _client ( notify ) , _reentrant ( reentrant )
{
qsocketnotify = new T QSocketNotifier( fd , qtype , this ) ;
connect ( qsocketnotify , TQT_ SIGNAL( activated ( int ) ) , this , TQT_ SLOT( notify ( int ) ) ) ;
qsocketnotify = new QSocketNotifier( fd , qtype , this ) ;
connect ( qsocketnotify , SIGNAL( activated ( int ) ) , this , SLOT( notify ( int ) ) ) ;
}
void QIOWatch : : notify ( int socket )
@ -80,17 +80,17 @@ void QIOWatch::notify(int socket)
}
/*
* T QTimeWatch:
* QTimeWatch:
*/
T QTimeWatch: : T QTimeWatch( int milliseconds , TimeNotify * notify )
QTimeWatch: : QTimeWatch( int milliseconds , TimeNotify * notify )
{
timer = new T QTimer( this ) ;
connect ( timer , TQT_ SIGNAL( timeout ( ) ) , this , TQT_ SLOT( notify ( ) ) ) ;
timer = new QTimer( this ) ;
connect ( timer , SIGNAL( timeout ( ) ) , this , SLOT( notify ( ) ) ) ;
timer - > start ( milliseconds ) ;
_client = notify ;
}
void T QTimeWatch: : notify ( )
void QTimeWatch: : notify ( )
{
qioManager - > dispatch ( this ) ;
}
@ -179,19 +179,19 @@ void QIOManager::watchFD(int fd, int types, IONotify *notify)
if ( types & IOType : : read )
{
fdList . push_back (
new QIOWatch ( fd , IOType : : read , notify , T QSocketNotifier: : Read , r )
new QIOWatch ( fd , IOType : : read , notify , QSocketNotifier: : Read , r )
) ;
}
if ( types & IOType : : write )
{
fdList . push_back (
new QIOWatch ( fd , IOType : : write , notify , T QSocketNotifier: : Write , r )
new QIOWatch ( fd , IOType : : write , notify , QSocketNotifier: : Write , r )
) ;
}
if ( types & IOType : : except )
{
fdList . push_back (
new QIOWatch ( fd , IOType : : except , notify , T QSocketNotifier: : Exception ,
new QIOWatch ( fd , IOType : : except , notify , QSocketNotifier: : Exception ,
r )
) ;
}
@ -228,17 +228,17 @@ void QIOManager::addTimer(int milliseconds, TimeNotify *notify)
notify = new HandleNotifications ( ) ;
milliseconds = 0 ;
}
timeList . push_back ( new T QTimeWatch( milliseconds , notify ) ) ;
timeList . push_back ( new QTimeWatch( milliseconds , notify ) ) ;
}
void QIOManager : : removeTimer ( TimeNotify * notify )
{
list < T QTimeWatch * > : : iterator i ;
list < QTimeWatch * > : : iterator i ;
i = timeList . begin ( ) ;
while ( i ! = timeList . end ( ) )
{
T QTimeWatch * w = * i ;
QTimeWatch * w = * i ;
if ( w - > client ( ) = = notify )
{
@ -271,7 +271,7 @@ void QIOManager::dispatch(QIOWatch *ioWatch)
qioLevel - - ;
}
void QIOManager : : dispatch ( T QTimeWatch * timeWatch )
void QIOManager : : dispatch ( QTimeWatch * timeWatch )
{
qioLevel + + ;
if ( qioLevel = = 1 )