Bug 295278 - QEventLoop goes to sleep even if events are in the queue
Summary: QEventLoop goes to sleep even if events are in the queue
Status: RESOLVED FIXED
Alias: None
Product: Necessitas
Classification: Unmaintained
Component: Android Qt4 (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: BogDan Vatra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-03 22:19 UTC by cd
Modified: 2012-05-26 17:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: alpha4
Sentry Crash Report:


Attachments
Fix (HACK) for QEventDispatcherUNIX on Android (1.20 KB, patch)
2012-03-03 22:19 UTC, cd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cd 2012-03-03 22:19:15 UTC
Created attachment 69262 [details]
Fix (HACK) for QEventDispatcherUNIX on Android

QEventDispatcherUNIX only sends wakeup-tokens to the pipe if the atomic wakeUps-variable is not set to 1. Somehow the atomic access seems to fail sometimes which results in "stuck" events. These are delivered only together with the next event - most probably a mouse touch event.

The test cases in android-qt/tests/auto/qatomicint seem to work, however the tests in  android-qt/tests/auto/qeventloop fail horribly.

The attached patch fixes the problem (and the tests), but increases battery usage because of unnecessary wakeups.
Comment 1 BogDan Vatra 2012-05-26 17:21:57 UTC
Git commit 717ab0d3bc52758ed5238e6f2170a7144e37587a by BogDan Vatra.
Committed on 26/05/2012 at 19:21.
Pushed by vatra into branch 'alpha4'.

Prevent QEventLoop to go to sleep if events are in the queue

Fix qeventloop test.
FIXED-IN: alpha4

M  +5    -11   src/corelib/kernel/qeventdispatcher_unix.cpp
M  +0    -1    src/corelib/kernel/qeventdispatcher_unix_p.h
M  +1    -1    tests/auto/qeventloop/tst_qeventloop.cpp

http://commits.kde.org/android-qt/717ab0d3bc52758ed5238e6f2170a7144e37587a
Comment 2 BogDan Vatra 2012-05-26 17:21:57 UTC
Git commit 717ab0d3bc52758ed5238e6f2170a7144e37587a by BogDan Vatra.
Committed on 26/05/2012 at 19:21.
Pushed by vatra into branch 'alpha4'.

Prevent QEventLoop to go to sleep if events are in the queue

Fix qeventloop test.
FIXED-IN: alpha4

M  +5    -11   src/corelib/kernel/qeventdispatcher_unix.cpp
M  +0    -1    src/corelib/kernel/qeventdispatcher_unix_p.h
M  +1    -1    tests/auto/qeventloop/tst_qeventloop.cpp

http://commits.kde.org/android-qt/717ab0d3bc52758ed5238e6f2170a7144e37587a