summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@nokia.com>2012-02-07 15:49:18 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-07 00:42:22 +0100
commitfdd137812ad7870c2d3430ff64969bcc552eb498 (patch)
tree6e6517195069b9ea387ae90a925d744e7b464a75
parent547b43c7422559410f9dd8e410105ee97773f353 (diff)
downloadqt4-tools-fdd137812ad7870c2d3430ff64969bcc552eb498.tar.gz
qpa: Don't force event handling every second
No need to wake up the CPU if we know that nothing happened. Change-Id: I95a26fa4869d9f694729d71c1bc6947f477cc283 Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
-rw-r--r--src/gui/kernel/qeventdispatcher_qpa.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qeventdispatcher_qpa.cpp b/src/gui/kernel/qeventdispatcher_qpa.cpp
index 28aab6aadc..e21fd248cf 100644
--- a/src/gui/kernel/qeventdispatcher_qpa.cpp
+++ b/src/gui/kernel/qeventdispatcher_qpa.cpp
@@ -54,6 +54,7 @@
#include <QtCore/QDebug>
#include <errno.h>
+#include <limits.h>
QT_BEGIN_NAMESPACE
@@ -283,7 +284,7 @@ int QEventDispatcherQPA::select(int nfds, fd_set *readfds, fd_set *writefds, fd_
Q_D(QEventDispatcherQPA);
int retVal = 0;
if (d->hasIntegration()) {
- qint64 timeoutmsec = 1000; // wait a second if we don't have timers
+ qint64 timeoutmsec = LONG_MAX; // wait if we don't have timers
if (timeout)
timeoutmsec = timeout->tv_sec * 1000 + (timeout->tv_usec/1000);
d->selectReturnMutex->lock();