summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-09-16 10:11:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-09-16 10:11:46 (GMT)
commitb6e8943592ec6b2cbc619c35ca90feded0e1e87b (patch)
treebb971d036401ac7eeb1cda928ae764408b48f141 /src/corelib
parent554eedb76ecceca5123992147ed1aa48aabc6662 (diff)
parent82575a9f6123eed3e8581b6e73833924fe47cace (diff)
downloadQt-b6e8943592ec6b2cbc619c35ca90feded0e1e87b.zip
Qt-b6e8943592ec6b2cbc619c35ca90feded0e1e87b.tar.gz
Qt-b6e8943592ec6b2cbc619c35ca90feded0e1e87b.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed regression in QPixmap::size() for null pixmaps. Make test less sensitive to platform specifics Doc: Further QML improvements. Doc: Minor improvements to QML-related documentation. The test livelock of QTimer is now expected to work Make sure mapSelectionFromSource does not return a selection with invalid ranges. QEventDispatcherUnix: do not process too many timer if other events need to be processed first Doc: Continued work on the QML documentation. Doc: More work on the QML documentation. Doc: More work on the declarative API documentation. Doc: Some editing and tidying up. Doc: Added a missing file. Doc: Fixed text in license headers.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp
index 9dadd82..f50994c 100644
--- a/src/corelib/kernel/qeventdispatcher_unix.cpp
+++ b/src/corelib/kernel/qeventdispatcher_unix.cpp
@@ -549,18 +549,22 @@ int QTimerInfoList::activateTimers()
if (qt_disable_lowpriority_timers || isEmpty())
return 0; // nothing to do
- bool firstTime = true;
- timeval currentTime;
- int n_act = 0, maxCount = count();
+ int n_act = 0, maxCount = 0;
firstTimerInfo = 0;
- while (maxCount--) {
- currentTime = updateCurrentTime();
- if (firstTime) {
- repairTimersIfNeeded();
- firstTime = false;
- }
+ timeval currentTime = updateCurrentTime();
+ repairTimersIfNeeded();
+
+ // Find out how many timer have expired
+ for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) {
+ if (currentTime < (*it)->timeout)
+ break;
+ maxCount++;
+ }
+
+ //fire the timers.
+ while (maxCount--) {
if (isEmpty())
break;