diff options
author | axis <qt-info@nokia.com> | 2010-09-21 09:39:32 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2010-09-23 12:36:11 (GMT) |
commit | 1dcef0480901ec736af70edc80d4b821e0c8ebe5 (patch) | |
tree | 800a38f5974a7719e458c37dd697687fda921bf6 /src | |
parent | 7f11c900e9184565321c09533b468abb047129b8 (diff) | |
download | Qt-1dcef0480901ec736af70edc80d4b821e0c8ebe5.zip Qt-1dcef0480901ec736af70edc80d4b821e0c8ebe5.tar.gz Qt-1dcef0480901ec736af70edc80d4b821e0c8ebe5.tar.bz2 |
Made posted events part of the round robin queue.
That means that posted events will only be sent once per event queue
iteration, just like timers. This helps prevent event starvation.
RevBy: mread
AutoTest: Included
Task: QTBUG-13743
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian_p.h | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 5cc6ae3..4ac500f 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -178,8 +178,7 @@ void QActiveObject::reactivateAndComplete() } QWakeUpActiveObject::QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher) - : CActive(WAKE_UP_PRIORITY), - m_dispatcher(dispatcher) + : QActiveObject(WAKE_UP_PRIORITY, dispatcher) { CActiveScheduler::Add(this); iStatus = KRequestPending; @@ -201,6 +200,9 @@ void QWakeUpActiveObject::DoCancel() void QWakeUpActiveObject::RunL() { + if (!okToRun()) + return; + iStatus = KRequestPending; SetActive(); QT_TRYCATCH_LEAVING(m_dispatcher->wakeUpWasCalled()); diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h index bc42753..53afebe 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian_p.h +++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h @@ -95,7 +95,7 @@ private: int m_iterationCount; }; -class QWakeUpActiveObject : public CActive +class QWakeUpActiveObject : public QActiveObject { public: QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher); @@ -106,9 +106,6 @@ public: protected: void DoCancel(); void RunL(); - -private: - QEventDispatcherSymbian *m_dispatcher; }; struct SymbianTimerInfo : public QSharedData |