@ -203,9 +203,10 @@ void TQObject::moveToThread(TQThread *targetThread)
}
}
TQThread * objectThread = contextThreadObject ( ) ;
TQThread * objectThread = contextThreadObject ( ) ;
// NOTE currentThread could be NULL if the current thread was not started using the TQThread API
TQThread * currentThread = TQThread : : currentThreadObject ( ) ;
TQThread * currentThread = TQThread : : currentThreadObject ( ) ;
if ( objectThread ! = currentThread ) {
if ( currentThread & & objectThread ! = currentThread ) {
# if defined(QT_DEBUG)
# if defined(QT_DEBUG)
tqWarning ( " TQObject::moveToThread: Current thread is not the object's thread " ) ;
tqWarning ( " TQObject::moveToThread: Current thread is not the object's thread " ) ;
# endif
# endif
@ -2760,6 +2761,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
}
}
# endif
# endif
// NOTE currentThread could be NULL if the current thread was not started using the TQThread API
const TQThread * currentThread = TQThread : : currentThreadObject ( ) ;
const TQThread * currentThread = TQThread : : currentThreadObject ( ) ;
TQObject * object ;
TQObject * object ;
@ -2779,7 +2781,10 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol - > currentSender = this ;
sol - > currentSender = this ;
}
}
if ( c - > memberType ( ) = = TQSIGNAL_CODE ) {
if ( c - > memberType ( ) = = TQSIGNAL_CODE ) {
if ( ( d - > disableThreadPostedEvents ) | | ( object - > d - > disableThreadPostedEvents ) | | ( currentThread - > threadPostedEventsDisabled ( ) ) | | ( object - > d - > ownThread = = currentThread ) ) {
if ( ( d - > disableThreadPostedEvents ) | |
( object - > d - > disableThreadPostedEvents ) | |
( currentThread & & currentThread - > threadPostedEventsDisabled ( ) ) | |
( currentThread & & object - > d - > ownThread = = currentThread ) ) {
# ifdef QT_THREAD_SUPPORT
# ifdef QT_THREAD_SUPPORT
sol - > listMutex - > unlock ( ) ;
sol - > listMutex - > unlock ( ) ;
# endif // QT_THREAD_SUPPORT
# endif // QT_THREAD_SUPPORT
@ -2798,7 +2803,10 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
}
}
}
}
else {
else {
if ( ( d - > disableThreadPostedEvents ) | | ( object - > d - > disableThreadPostedEvents ) | | ( currentThread - > threadPostedEventsDisabled ( ) ) | | ( object - > d - > ownThread = = currentThread ) ) {
if ( ( d - > disableThreadPostedEvents ) | |
( object - > d - > disableThreadPostedEvents ) | |
( currentThread & & currentThread - > threadPostedEventsDisabled ( ) ) | |
( currentThread & & object - > d - > ownThread = = currentThread ) ) {
# ifdef QT_THREAD_SUPPORT
# ifdef QT_THREAD_SUPPORT
sol - > listMutex - > unlock ( ) ;
sol - > listMutex - > unlock ( ) ;
# endif // QT_THREAD_SUPPORT
# endif // QT_THREAD_SUPPORT
@ -2846,7 +2854,10 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol - > currentSender = this ;
sol - > currentSender = this ;
}
}
if ( c - > memberType ( ) = = TQSIGNAL_CODE ) {
if ( c - > memberType ( ) = = TQSIGNAL_CODE ) {
if ( ( d - > disableThreadPostedEvents ) | | ( object - > d - > disableThreadPostedEvents ) | | ( currentThread - > threadPostedEventsDisabled ( ) ) | | ( object - > d - > ownThread = = currentThread ) ) {
if ( ( d - > disableThreadPostedEvents ) | |
( object - > d - > disableThreadPostedEvents ) | |
( currentThread & & currentThread - > threadPostedEventsDisabled ( ) ) | |
( currentThread & & object - > d - > ownThread = = currentThread ) ) {
# ifdef QT_THREAD_SUPPORT
# ifdef QT_THREAD_SUPPORT
sol - > listMutex - > unlock ( ) ;
sol - > listMutex - > unlock ( ) ;
# endif // QT_THREAD_SUPPORT
# endif // QT_THREAD_SUPPORT
@ -2865,7 +2876,10 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
}
}
}
}
else {
else {
if ( ( d - > disableThreadPostedEvents ) | | ( object - > d - > disableThreadPostedEvents ) | | ( currentThread - > threadPostedEventsDisabled ( ) ) | | ( object - > d - > ownThread = = currentThread ) ) {
if ( ( d - > disableThreadPostedEvents ) | |
( object - > d - > disableThreadPostedEvents ) | |
( currentThread & & currentThread - > threadPostedEventsDisabled ( ) ) | |
( currentThread & & object - > d - > ownThread = = currentThread ) ) {
# ifdef QT_THREAD_SUPPORT
# ifdef QT_THREAD_SUPPORT
sol - > listMutex - > unlock ( ) ;
sol - > listMutex - > unlock ( ) ;
# endif // QT_THREAD_SUPPORT
# endif // QT_THREAD_SUPPORT