summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-09-23 13:38:04 +0200
committeraxis <qt-info@nokia.com>2010-09-23 14:37:30 +0200
commit8d8d147f1dd5d2922a4c61c43d378c8784224f13 (patch)
tree5a9570108c9af3b8e3697848eb05b7fb17390282 /tests
parent5c29d5be5197b265f16c4895776e9be97db845d6 (diff)
Fixed event starvation on Symbian if timers were constantly recreated
If a timer event occurred, and inside its handler a new timer was created that would also immediately occur, the events would execute over and over and starve other events. This happened because the code in Symbian that is supposed to detect when the same event happens more than once does not work if it is always a new timer which executes. The bug was fixed by introducing a state variable which signals whether we are currently inside the handler of a timer event, and then pretending that newly created timers inside this handler have already been executed once, thereby delaying their execution until the next iteration. Because we reset the state variable in processEvents, the behavior will be slightly different if run directly under CActiveScheduler::Start(). There, we have no way of resetting the state on the next iteration, so all timers inside such a handler (even if it recurses into a new CActiveScheduler::Start()) will be delayed by one event iteration. However, this is considered acceptable, since there is no real "iteration count" in the active scheduler; the event will simply be run after the deferred queue is reactivated (which will be immediately if there are no other events). This is the same as what would have happened for a real timer that executed once and then recursed into CActiveScheduler::Start() (it would also be delayed by one iteration). Task: QTBUG-13773 RevBy: mread AutoTest: Passed
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index 73179fdf14..102308e768 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -719,10 +719,6 @@ void DontBlockEvents::paintEvent()
void tst_QTimer::QTBUG13633_dontBlockEvents()
{
-#ifdef Q_OS_SYMBIAN
- QEXPECT_FAIL("", "Expect failure because of QTBUG-13773", Abort);
- QVERIFY2(false, "This test hangs on Symbian");
-#endif
DontBlockEvents t;
QTest::qWait(60);
QVERIFY(t.total > 2);