Changeset 615
- Timestamp:
- Feb 27, 2010, 1:33:23 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/kernel/qcoreapplication_pm.cpp
r564 r615 42 42 ****************************************************************************/ 43 43 44 45 46 44 47 #include "qcoreapplication.h" 45 48 #include "qcoreapplication_p.h" 46 49 #include "qstringlist.h" 47 #include "qt_os2.h"48 50 #include "qvector.h" 49 51 #include "qmutex.h" … … 106 108 } 107 109 108 // @todo check if we really need this when doing timers in QEventDispatcherPM 109 #if 0 110 void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId)110 static ULONG savedDosErrorState = 0xff; 111 112 ) 111 113 { 112 QThreadData *data = object->d_func()->threadData; 114 // 27 - Get process DosError setting 115 DosSysCtl(27, &savedDosErrorState); 116 // disable hardware error popups to make the user's life less annoying 117 DosError(savedDosErrorState & ~FERR_ENABLEHARDERR); 118 return 0; 119 } 113 120 114 QMutexLocker locker(&data->postEventList.mutex); 115 if (data->postEventList.size() == 0) 116 return; 117 for (int i = 0; i < data->postEventList.size(); ++i) { 118 const QPostEvent & pe = data->postEventList.at(i); 119 if (pe.receiver == object 120 && pe.event 121 && (pe.event->type() == QEvent::Timer || pe.event->type() == QEvent::ZeroTimerEvent) 122 && static_cast<QTimerEvent *>(pe.event)->timerId() == timerId) { 123 --pe.receiver->d_func()->postedEvents; 124 pe.event->posted = false; 125 delete pe.event; 126 const_cast<QPostEvent &>(pe).event = 0; 127 return; 128 } 129 } 121 static int globalDone() 122 { 123 // restore error popups 124 DosError(savedDosErrorState); 125 return 0; 130 126 } 131 #endif 127 128 Q_CONSTRUCTOR_FUNCTION(globalInit) 129 Q_DESTRUCTOR_FUNCTION(globalDone) 132 130 133 131 QT_END_NAMESPACE
Note:
See TracChangeset
for help on using the changeset viewer.