From 8d210f61fc399ab91c0dee097a47185cf9e008fd Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 3 Nov 2013 01:01:37 -0500 Subject: Automated update from Qt3 --- src/kernel/qobject.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/kernel/qobject.cpp') diff --git a/src/kernel/qobject.cpp b/src/kernel/qobject.cpp index d8b2047a0..4442023a5 100644 --- a/src/kernel/qobject.cpp +++ b/src/kernel/qobject.cpp @@ -2727,7 +2727,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) sol->currentSender = this; } if ( c->memberType() == TQSIGNAL_CODE ) { - if ((d->disableThreadPostedEvents) || (object->d->ownThread == currentThread)) { + if ((d->disableThreadPostedEvents) || (object->d->disableThreadPostedEvents) || (currentThread->threadPostedEventsDisabled()) || (object->d->ownThread == currentThread)) { #ifdef QT_THREAD_SUPPORT sol->listMutex->unlock(); #endif // QT_THREAD_SUPPORT @@ -2738,12 +2738,15 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) } else { if (object->d->ownThread && !object->d->ownThread->finished()) { +#ifdef QT_DEBUG + tqDebug("TQObject::activate_signal: Emitting cross-thread signal from object %p (member %d receiver %p) (1)\n\r", this, c->member(), object); +#endif // QT_DEBUG TQApplication::postEvent(object, new TQMetaCallEvent(c->member(), this, deepCopyTQUObjectArray(o), TQMetaCallEvent::MetaCallEmit)); } } } else { - if ((d->disableThreadPostedEvents) || (object->d->ownThread == currentThread)) { + if ((d->disableThreadPostedEvents) || (object->d->disableThreadPostedEvents) || (currentThread->threadPostedEventsDisabled()) || (object->d->ownThread == currentThread)) { #ifdef QT_THREAD_SUPPORT sol->listMutex->unlock(); #endif // QT_THREAD_SUPPORT @@ -2754,6 +2757,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) } else { if (object->d->ownThread && !object->d->ownThread->finished()) { +#ifdef QT_DEBUG + tqDebug("TQObject::activate_signal: Invoking cross-thread method from object %p (member %d receiver %p) (1)\n\r", this, c->member(), object); +#endif // QT_DEBUG TQApplication::postEvent(object, new TQMetaCallEvent(c->member(), this, deepCopyTQUObjectArray(o), TQMetaCallEvent::MetaCallInvoke)); } } @@ -2788,7 +2794,7 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) sol->currentSender = this; } if ( c->memberType() == TQSIGNAL_CODE ) { - if ((d->disableThreadPostedEvents) || (object->d->ownThread == currentThread)) { + if ((d->disableThreadPostedEvents) || (object->d->disableThreadPostedEvents) || (currentThread->threadPostedEventsDisabled()) || (object->d->ownThread == currentThread)) { #ifdef QT_THREAD_SUPPORT sol->listMutex->unlock(); #endif // QT_THREAD_SUPPORT @@ -2799,12 +2805,15 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) } else { if (object->d->ownThread && !object->d->ownThread->finished()) { +#ifdef QT_DEBUG + tqDebug("TQObject::activate_signal: Emitting cross-thread signal from object %p (member %d receiver %p) (2)\n\r", this, c->member(), object); +#endif // QT_DEBUG TQApplication::postEvent(object, new TQMetaCallEvent(c->member(), this, deepCopyTQUObjectArray(o), TQMetaCallEvent::MetaCallEmit)); } } } else { - if ((d->disableThreadPostedEvents) || (object->d->ownThread == currentThread)) { + if ((d->disableThreadPostedEvents) || (object->d->disableThreadPostedEvents) || (currentThread->threadPostedEventsDisabled()) || (object->d->ownThread == currentThread)) { #ifdef QT_THREAD_SUPPORT sol->listMutex->unlock(); #endif // QT_THREAD_SUPPORT @@ -2815,6 +2824,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o ) } else { if (object->d->ownThread && !object->d->ownThread->finished()) { +#ifdef QT_DEBUG + tqDebug("TQObject::activate_signal: Invoking cross-thread method from object %p (member %d receiver %p) (2)\n\r", this, c->member(), object); +#endif // QT_DEBUG TQApplication::postEvent(object, new TQMetaCallEvent(c->member(), this, deepCopyTQUObjectArray(o), TQMetaCallEvent::MetaCallInvoke)); } } -- cgit v1.2.1