summaryrefslogtreecommitdiffstats
path: root/src/kernel/qeventloop_unix_glib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/qeventloop_unix_glib.cpp')
-rw-r--r--src/kernel/qeventloop_unix_glib.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp
index 6924fcd..feff675 100644
--- a/src/kernel/qeventloop_unix_glib.cpp
+++ b/src/kernel/qeventloop_unix_glib.cpp
@@ -688,7 +688,7 @@ int QEventLoop::activateTimers()
QTimerEvent e( t->id );
#if defined(QT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
- if ((!t->obj) || (t->obj && (t->obj->contextThreadObject() == QThread::currentThreadObject()))) {
+ if ((!t->obj) || (QThread::currentThreadObject()->threadPostedEventsDisabled()) || (t->obj && (t->obj->contextThreadObject() == QThread::currentThreadObject()))) {
QApplication::sendEvent( t->obj, &e ); // send event
}
else {
@@ -731,7 +731,7 @@ int QEventLoop::activateSocketNotifiers()
sn->pending = FALSE;
#if defined(QT_THREAD_SUPPORT)
// Be careful...the current thread may not be the target object's thread!
- if ((!sn->obj) || (sn->obj && (sn->obj->contextThreadObject() == QThread::currentThreadObject()))) {
+ if ((!sn->obj) || (QThread::currentThreadObject()->threadPostedEventsDisabled()) || (sn->obj && (sn->obj->contextThreadObject() == QThread::currentThreadObject()))) {
QApplication::sendEvent( sn->obj, &event ); // send event
}
else {