|
|
@ -769,6 +769,9 @@ TQObject::~TQObject()
|
|
|
|
while( (c=cit.current()) ) { // for each connected slot...
|
|
|
|
while( (c=cit.current()) ) { // for each connected slot...
|
|
|
|
++cit;
|
|
|
|
++cit;
|
|
|
|
if ( (obj=c->object()) ) {
|
|
|
|
if ( (obj=c->object()) ) {
|
|
|
|
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
TQMutexLocker locker( obj->senderObjects->listMutex );
|
|
|
|
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
removeObjFromList( obj->senderObjects, this );
|
|
|
|
removeObjFromList( obj->senderObjects, this );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2494,25 +2497,23 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
|
|
|
|
c = clist->first();
|
|
|
|
c = clist->first();
|
|
|
|
while ( c ) { // for all receivers...
|
|
|
|
while ( c ) { // for all receivers...
|
|
|
|
if ( r == 0 ) { // remove all receivers
|
|
|
|
if ( r == 0 ) { // remove all receivers
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) {
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
|
|
|
|
TQMutexLocker locker(c->object()->senderObjects->listMutex);
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s );
|
|
|
|
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
|
|
|
|
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s );
|
|
|
|
|
|
|
|
}
|
|
|
|
success = TRUE;
|
|
|
|
success = TRUE;
|
|
|
|
c = clist->next();
|
|
|
|
c = clist->next();
|
|
|
|
} else if ( r == c->object() &&
|
|
|
|
} else if ( r == c->object() &&
|
|
|
|
( (member_index == -1) ||
|
|
|
|
( (member_index == -1) ||
|
|
|
|
((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
|
|
|
|
((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) {
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
|
|
|
|
TQMutexLocker locker(c->object()->senderObjects->listMutex);
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
|
|
|
|
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
}
|
|
|
|
success = TRUE;
|
|
|
|
success = TRUE;
|
|
|
|
clist->remove();
|
|
|
|
clist->remove();
|
|
|
|
c = clist->current();
|
|
|
|
c = clist->current();
|
|
|
@ -2531,25 +2532,23 @@ bool TQObject::disconnectInternal( const TQObject *sender, int signal_index,
|
|
|
|
c = clist->first();
|
|
|
|
c = clist->first();
|
|
|
|
while ( c ) { // for all receivers...
|
|
|
|
while ( c ) { // for all receivers...
|
|
|
|
if ( r == 0 ) { // remove all receivers
|
|
|
|
if ( r == 0 ) { // remove all receivers
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) {
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
|
|
|
|
TQMutexLocker locker(c->object()->senderObjects->listMutex);
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
|
|
|
|
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
}
|
|
|
|
success = TRUE;
|
|
|
|
success = TRUE;
|
|
|
|
c = clist->next();
|
|
|
|
c = clist->next();
|
|
|
|
} else if ( r == c->object() &&
|
|
|
|
} else if ( r == c->object() &&
|
|
|
|
( (member_index == -1) ||
|
|
|
|
( (member_index == -1) ||
|
|
|
|
((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
|
|
|
|
((member_index == c->member()) && (c->memberType() == membcode)) ) ) {
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) {
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->lock();
|
|
|
|
TQMutexLocker locker(c->object()->senderObjects->listMutex);
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
#ifdef TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
if (c->object()->senderObjects) c->object()->senderObjects->listMutex->unlock();
|
|
|
|
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
#endif // TQT_THREAD_SUPPORT
|
|
|
|
|
|
|
|
removeObjFromList( c->object()->senderObjects, s, TRUE );
|
|
|
|
|
|
|
|
}
|
|
|
|
success = TRUE;
|
|
|
|
success = TRUE;
|
|
|
|
clist->remove();
|
|
|
|
clist->remove();
|
|
|
|
c = clist->current();
|
|
|
|
c = clist->current();
|
|
|
|