diff options
author | Timothy Pearson <[email protected]> | 2012-12-06 16:47:27 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-12-06 16:47:27 -0600 |
commit | 78125ea2f051107b84fdc0354acdedb7885308ee (patch) | |
tree | c162d7f55467f81a01e2e669ce297acce06b3947 /src/kernel/qeventloop_unix_glib.cpp | |
parent | 7aa5ac7f0e76c5b87e4ca837b75b3edd522a3372 (diff) | |
download | qt3-78125ea2f051107b84fdc0354acdedb7885308ee.tar.gz qt3-78125ea2f051107b84fdc0354acdedb7885308ee.zip |
Add real threading support, including per-thread event loops, to QThread
Diffstat (limited to 'src/kernel/qeventloop_unix_glib.cpp')
-rw-r--r-- | src/kernel/qeventloop_unix_glib.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/kernel/qeventloop_unix_glib.cpp b/src/kernel/qeventloop_unix_glib.cpp index e607447..9d3ce27 100644 --- a/src/kernel/qeventloop_unix_glib.cpp +++ b/src/kernel/qeventloop_unix_glib.cpp @@ -44,6 +44,7 @@ #include "qeventloop.h" #include "qapplication.h" #include "qbitarray.h" +#include "qmutex.h" #include <stdlib.h> #include <sys/types.h> @@ -578,17 +579,14 @@ int QEventLoop::activateSocketNotifiers() while ( (sn=it.current()) ) { ++it; d->sn_pending_list.removeRef( sn ); - if ( sn->pending ) { - - #ifdef DEBUG_QT_GLIBMAINLOOP - printf("activate sn : send event fd=%d\n", sn->gPollFD.fd ); - #endif - - - sn->pending = FALSE; - QApplication::sendEvent( sn->obj, &event ); - n_act++; - } + if ( sn->pending ) { +#ifdef DEBUG_QT_GLIBMAINLOOP + printf("activate sn : send event fd=%d\n", sn->gPollFD.fd ); +#endif + sn->pending = FALSE; + QApplication::sendEvent( sn->obj, &event ); + n_act++; + } } return n_act; |