summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qeventdispatcher_s60.cpp
diff options
context:
space:
mode:
authormread <qt-info@nokia.com>2011-05-26 14:11:18 +0100
committermread <qt-info@nokia.com>2011-06-01 13:04:33 +0100
commite31bcd340a24a8698ee4dc85dd2ccb2bd6ab10e7 (patch)
tree972623fe792c3e48a0bf4d62d06b1e7302ba0f9a /src/gui/kernel/qeventdispatcher_s60.cpp
parent8c3a4568dcbb75c36ea3c22ced4d10d4b3522d9f (diff)
Schedule Symbian active objects with a round robin scheduler
Each call to QEventDispatcherSymbian::processEvents allows pre-existing active objects with priority >= CActive::EPriorityStandard to run once. Active objects with lower priorities can only run if no higher priority active object has run. Task-number: QTBUG-15019 Reviewed-by: Tom Sutcliffe Reviewed-by: axis
Diffstat (limited to 'src/gui/kernel/qeventdispatcher_s60.cpp')
-rw-r--r--src/gui/kernel/qeventdispatcher_s60.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/src/gui/kernel/qeventdispatcher_s60.cpp b/src/gui/kernel/qeventdispatcher_s60.cpp
index 3f20c08084..fd2280ea6e 100644
--- a/src/gui/kernel/qeventdispatcher_s60.cpp
+++ b/src/gui/kernel/qeventdispatcher_s60.cpp
@@ -58,47 +58,17 @@ QtEikonEnv::~QtEikonEnv()
void QtEikonEnv::RunL()
{
- QEventDispatcherS60 *dispatcher = qobject_cast<QEventDispatcherS60 *>(QAbstractEventDispatcher::instance());
- if (!dispatcher) {
- CEikonEnv::RunL();
- return;
- }
-
- if (m_lastIterationCount != dispatcher->iterationCount()) {
- m_hasAlreadyRun = false;
- m_lastIterationCount = dispatcher->iterationCount();
- }
-
- if (m_hasAlreadyRun) {
- // Fool the active scheduler into believing we are still waiting for events.
- // The window server thinks we are not, however.
- m_savedStatusCode = iStatus.Int();
- iStatus = KRequestPending;
- SetActive();
- dispatcher->queueDeferredActiveObjectsCompletion();
- } else {
- m_hasAlreadyRun = true;
- CEikonEnv::RunL();
- }
+ CEikonEnv::RunL();
+ return;
}
void QtEikonEnv::DoCancel()
{
- complete();
-
CEikonEnv::DoCancel();
}
void QtEikonEnv::complete()
{
- if (m_hasAlreadyRun) {
- if (m_savedStatusCode != KRequestPending) {
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, m_savedStatusCode);
- m_savedStatusCode = KRequestPending;
- }
- m_hasAlreadyRun = false;
- }
}
QEventDispatcherS60::QEventDispatcherS60(QObject *parent)