bool QSingleShotTimer::event( QEvent * ) { qKillTimer( timerId ); // no more timeouts signal.activate(); // emit the signal signal.disconnect( 0, 0 ); timerId = 0; // mark as inactive return TRUE; }
bool QSingleShotTimer::event( QEvent * ) { qKillTimer( timerId ); // no more timeouts signal.activate(); // emit the signal signal.disconnect( 0, 0 ); sst_list->insert( 0, this ); // store in free list return TRUE; }
bool QSingleShotTimer::start( int msec, QObject *r, const char *m ) { timerId = 0; if ( signal.connect(r, m) ) timerId = qStartTimer( msec, (QObject *)this ); return timerId != 0; }
void Dispatcher::reparseConfiguration( const QCString & instanceName ) { kdDebug( 701 ) << k_funcinfo << instanceName << endl; // check if the instanceName is valid: if( ! m_instanceInfo.contains( instanceName ) ) return; // first we reparse the config of the instance so that the KConfig object // will be up to date m_instanceInfo[ instanceName ].instance->config()->reparseConfiguration(); QSignal * sig = m_instanceInfo[ instanceName ].signal; if( sig ) { kdDebug( 701 ) << "emit signal to instance" << endl; sig->activate(); } }
void Dispatcher::registerInstance( KInstance * instance, QObject * recv, const char * slot ) { assert( instance != 0 ); // keep the KInstance around and call // instance->config()->reparseConfiguration when the app should reparse QCString instanceName = instance->instanceName(); kdDebug( 701 ) << k_funcinfo << instanceName << endl; m_instanceName[ recv ] = instanceName; QSignal * sig; if( m_instanceInfo.contains( instanceName ) ) { sig = m_instanceInfo[ instanceName ].signal; } else { sig = new QSignal( this, "signal dispatcher" ); m_instanceInfo[ instanceName ].signal = sig; m_instanceInfo[ instanceName ].instance = instance; } sig->connect( recv, slot ); ++m_instanceInfo[ instanceName ].count; connect( recv, SIGNAL( destroyed( QObject * ) ), this, SLOT( unregisterInstance( QObject * ) ) ); }