--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp Fri Apr 16 15:50:13 2010 +0300
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp Mon May 03 13:17:34 2010 +0300
@@ -50,6 +50,13 @@
QT_BEGIN_NAMESPACE
+#ifdef SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS
+// when the system UI is Qt based, priority drop is not needed as CPU starved processes will not be killed.
+#undef QT_SYMBIAN_PRIORITY_DROP
+#else
+#define QT_SYMBIAN_PRIORITY_DROP
+#endif
+
#define WAKE_UP_PRIORITY CActive::EPriorityStandard
#define TIMER_PRIORITY CActive::EPriorityHigh
#define NULLTIMER_PRIORITY CActive::EPriorityLow
@@ -697,6 +704,7 @@
bool handledSymbianEvent = false;
m_interrupt = false;
+#ifdef QT_SYMBIAN_PRIORITY_DROP
/*
* This QTime variable is used to measure the time it takes to finish
* the event loop. If we take too long in the loop, other processes
@@ -714,6 +722,7 @@
} timeState = FirstRun;
TProcessPriority priority;
+#endif
while (1) {
if (block) {
@@ -727,13 +736,15 @@
CActiveScheduler::Current()->WaitForAnyRequest();
}
+#ifdef QT_SYMBIAN_PRIORITY_DROP
if (timeState == SubsequentRun) {
time.start();
timeState = TimeStarted;
}
+#endif
TInt error;
- handledSymbianEvent = CActiveScheduler::RunIfReady(error, CActive::EPriorityIdle);
+ handledSymbianEvent = CActiveScheduler::RunIfReady(error, KMinTInt);
if (error) {
qWarning("CActiveScheduler::RunIfReady() returned error: %i\n", error);
CActiveScheduler::Current()->Error(error);
@@ -747,6 +758,7 @@
break;
}
block = false;
+#ifdef QT_SYMBIAN_PRIORITY_DROP
if (timeState == TimeStarted && time.elapsed() > 100) {
priority = m_processHandle.Priority();
m_processHandle.SetPriority(EPriorityBackground);
@@ -759,6 +771,7 @@
}
if (timeState == FirstRun)
timeState = SubsequentRun;
+#endif
};
emit awake();