diff options
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 4649c151f7..396d2f740a 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -184,28 +184,6 @@ Q_CORE_EXPORT void __cdecl qWinMain(HINSTANCE instance, HINSTANCE prevInstance, #ifndef QT_NO_QOBJECT -void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId) -{ - QThreadData *data = object->d_func()->threadData; - - QMutexLocker locker(&data->postEventList.mutex); - if (data->postEventList.size() == 0) - return; - for (int i = 0; i < data->postEventList.size(); ++i) { - const QPostEvent & pe = data->postEventList.at(i); - if (pe.receiver == object - && pe.event - && (pe.event->type() == QEvent::Timer || pe.event->type() == QEvent::ZeroTimerEvent) - && static_cast<QTimerEvent *>(pe.event)->timerId() == timerId) { - --pe.receiver->d_func()->postedEvents; - pe.event->posted = false; - delete pe.event; - const_cast<QPostEvent &>(pe).event = 0; - return; - } - } -} - #if defined(Q_OS_WIN) && !defined(QT_NO_DEBUG_STREAM) /***************************************************************************** Convenience functions for convert WM_* messages into human readable strings, @@ -1050,4 +1028,28 @@ QDebug operator<<(QDebug dbg, const MSG &msg) #endif // !defined(Q_OS_WINRT) +#ifndef QT_NO_QOBJECT +void QCoreApplicationPrivate::removePostedTimerEvent(QObject *object, int timerId) +{ + QThreadData *data = object->d_func()->threadData; + + QMutexLocker locker(&data->postEventList.mutex); + if (data->postEventList.size() == 0) + return; + for (int i = 0; i < data->postEventList.size(); ++i) { + const QPostEvent &pe = data->postEventList.at(i); + if (pe.receiver == object + && pe.event + && (pe.event->type() == QEvent::Timer || pe.event->type() == QEvent::ZeroTimerEvent) + && static_cast<QTimerEvent *>(pe.event)->timerId() == timerId) { + --pe.receiver->d_func()->postedEvents; + pe.event->posted = false; + delete pe.event; + const_cast<QPostEvent &>(pe).event = 0; + return; + } + } +} +#endif // QT_NO_QOBJECT + QT_END_NAMESPACE |