summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_symbian.cpp
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-08-25 13:41:32 (GMT)
committeraxis <qt-info@nokia.com>2010-09-01 12:58:10 (GMT)
commit51f8b65b585a198a62daa4403374441b667966ce (patch)
tree31f42be2bf445caef2e58805566647c178d884cf /src/corelib/kernel/qeventdispatcher_symbian.cpp
parentb237c17156a1626fada7fad50dc0892f790d6295 (diff)
downloadQt-51f8b65b585a198a62daa4403374441b667966ce.zip
Qt-51f8b65b585a198a62daa4403374441b667966ce.tar.gz
Qt-51f8b65b585a198a62daa4403374441b667966ce.tar.bz2
Added catching of errors in timers.
According to the bug report this may happen in SMP systems and systems with certain schedulers. This patch does not actually fix the bug which causes the timer error, but avoids the timer firing if it happens, and gives a chance to handle the error. Task: QT-3591 RevBy: mread
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_symbian.cpp')
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 1bad8ed..5cc6ae3 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -232,8 +232,12 @@ void QTimerActiveObject::DoCancel()
void QTimerActiveObject::RunL()
{
- int error;
- QT_TRYCATCH_ERROR(error, Run());
+ int error = KErrNone;
+ if (iStatus == KErrNone) {
+ QT_TRYCATCH_ERROR(error, Run());
+ } else {
+ error = iStatus.Int();
+ }
// All Symbian error codes are negative.
if (error < 0) {
CActiveScheduler::Current()->Error(error); // stop and report here, as this timer will be deleted on scope exit