Changeset 846 for trunk/src/gui/kernel/qeventdispatcher_s60.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qeventdispatcher_s60.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 45 45 46 46 QT_BEGIN_NAMESPACE 47 48 QtEikonEnv::QtEikonEnv() 49 : m_lastIterationCount(0) 50 , m_savedStatusCode(KRequestPending) 51 , m_hasAlreadyRun(false) 52 { 53 } 54 55 QtEikonEnv::~QtEikonEnv() 56 { 57 } 58 59 void QtEikonEnv::RunL() 60 { 61 QEventDispatcherS60 *dispatcher = qobject_cast<QEventDispatcherS60 *>(QAbstractEventDispatcher::instance()); 62 if (!dispatcher) { 63 CEikonEnv::RunL(); 64 return; 65 } 66 67 if (m_lastIterationCount != dispatcher->iterationCount()) { 68 m_hasAlreadyRun = false; 69 m_lastIterationCount = dispatcher->iterationCount(); 70 } 71 72 if (m_hasAlreadyRun) { 73 // Fool the active scheduler into believing we are still waiting for events. 74 // The window server thinks we are not, however. 75 m_savedStatusCode = iStatus.Int(); 76 iStatus = KRequestPending; 77 SetActive(); 78 dispatcher->queueDeferredActiveObjectsCompletion(); 79 } else { 80 m_hasAlreadyRun = true; 81 CEikonEnv::RunL(); 82 } 83 } 84 85 void QtEikonEnv::DoCancel() 86 { 87 complete(); 88 89 CEikonEnv::DoCancel(); 90 } 91 92 void QtEikonEnv::complete() 93 { 94 if (m_hasAlreadyRun) { 95 if (m_savedStatusCode != KRequestPending) { 96 TRequestStatus *status = &iStatus; 97 QEventDispatcherSymbian::RequestComplete(status, m_savedStatusCode); 98 m_savedStatusCode = KRequestPending; 99 } 100 m_hasAlreadyRun = false; 101 } 102 } 47 103 48 104 QEventDispatcherS60::QEventDispatcherS60(QObject *parent) … … 128 184 } 129 185 186 // reimpl 187 void QEventDispatcherS60::reactivateDeferredActiveObjects() 188 { 189 if (S60->qtOwnsS60Environment) { 190 static_cast<QtEikonEnv *>(CCoeEnv::Static())->complete(); 191 } 192 193 QEventDispatcherSymbian::reactivateDeferredActiveObjects(); 194 } 195 130 196 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.