| Summary: | QEventLoop goes to sleep even if events are in the queue | ||
|---|---|---|---|
| Product: | [Unmaintained] Necessitas | Reporter: | cd |
| Component: | Android Qt4 | Assignee: | BogDan Vatra <bogdan> |
| Status: | RESOLVED FIXED | ||
| Severity: | major | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | http://commits.kde.org/android-qt/717ab0d3bc52758ed5238e6f2170a7144e37587a | Version Fixed/Implemented In: | alpha4 |
| Sentry Crash Report: | |||
| Attachments: | Fix (HACK) for QEventDispatcherUNIX on Android | ||
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 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 |
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.