summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_unix.cpp
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-09-23 13:51:17 +0200
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-09-25 12:19:45 +0200
commitd0d0fdb8e46351b4ab8492de31e5363ef6662b57 (patch)
tree3bad5b22c2ca844d72690637ec243fb171a4060e /src/corelib/kernel/qeventdispatcher_unix.cpp
parent783ca8d44fd87f842323ad1f9e2fef4a5d0b37ad (diff)
Fix regressions in qeventloop, qtimer, and qsocketnotifier autotests
Commit ed375675d4a4f6fd63edeb242e23c87b3de4be6f triggers a behavior in Glib's mainloop implementation where some event sources are not "serviced" every iteration of the mainloop context. This breaks an invariant that many tests relied on, so we need to solve the problem. The invariant is that a newly added timer that would normally fire on the next pass of the event loop (liker a zero timer) SHOULD actually fire. We do this by registering 2 timer event sources with Glib's mainloop: one normal priority source and one idle priority source. The idle priority source is the one that will send events most of the time, with the normal priority one taking over only when processEvents() is called manually. Task-number: QT-877 Reviewed-by: jbache Reviewed-by: thiago Reviewed-by: denis
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_unix.cpp')
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index a912971e90..5a0afb8c57 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -446,10 +446,10 @@ bool QTimerInfoList::timerWait(timeval &tm)
// Find first waiting timer not already active
QTimerInfo *t = 0;
for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
- if (!(*it)->inTimerEvent) {
- t = *it;
- break;
- }
+ if (!(*it)->inTimerEvent) {
+ t = *it;
+ break;
+ }
}
if (!t)