diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qelapsedtimer.cpp | 27 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_win.cpp | 2 |
4 files changed, 10 insertions, 25 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index ca2864df83..2a2dcc72ca 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2052,6 +2052,8 @@ void QCoreApplication::quit() The function returns \c true on success and false on failure. + \note QCoreApplication does \e not take ownership of \a translationFile. + \sa removeTranslator(), translate(), QTranslator::load(), {Dynamic Translation} */ diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index e3326f00d7..b497532008 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -421,6 +421,8 @@ struct QBasicAtomicBitField { QBasicAtomicInteger<uint> next; QBasicAtomicInteger<uint> data[NumInts]; + constexpr QBasicAtomicBitField() = default; + bool allocateSpecific(int which) noexcept { QBasicAtomicInteger<uint> &entry = data[which / BitsPerInt]; @@ -461,7 +463,7 @@ struct QBasicAtomicBitField { typedef QBasicAtomicBitField<QEvent::MaxUser - QEvent::User + 1> UserEventTypeRegistry; -static UserEventTypeRegistry userEventTypeRegistry; +static UserEventTypeRegistry userEventTypeRegistry {}; static inline int registerEventTypeZeroBased(int id) noexcept { diff --git a/src/corelib/kernel/qelapsedtimer.cpp b/src/corelib/kernel/qelapsedtimer.cpp index 57825583dd..3bfb1f15ec 100644 --- a/src/corelib/kernel/qelapsedtimer.cpp +++ b/src/corelib/kernel/qelapsedtimer.cpp @@ -139,9 +139,9 @@ QT_BEGIN_NAMESPACE \value SystemTime The human-readable system time. This clock is not monotonic. \value MonotonicClock The system's monotonic clock, usually found in Unix systems. This clock is monotonic and does not overflow. - \value TickCounter The system's tick counter, used on Windows systems. This clock may overflow. + \value TickCounter Not used anymore. \value MachAbsoluteTime The Mach kernel's absolute time (\macos and iOS). This clock is monotonic and does not overflow. - \value PerformanceCounter The high-resolution performance counter provided by Windows. This clock is monotonic and does not overflow. + \value PerformanceCounter The performance counter provided by Windows. This clock is monotonic and does not overflow. \section2 SystemTime @@ -161,24 +161,6 @@ QT_BEGIN_NAMESPACE This clock does not overflow. - \section2 TickCounter - - The tick counter clock type is based on the system's or the processor's - tick counter, multiplied by the duration of a tick. This clock type is - used on Windows platforms. If the high-precision performance - counter is available on Windows, the \tt{PerformanceCounter} clock type - is used instead. - - The TickCounter clock type is the only clock type that may overflow. - Windows Vista and Windows Server 2008 support the extended 64-bit tick - counter, which allows avoiding the overflow. - - On Windows systems, the clock overflows after 2^32 milliseconds, which - corresponds to roughly 49.7 days. This means two processes' reckoning of - the time since the reference may be different by multiples of 2^32 - milliseconds. When comparing such values, it's recommended that the high - 32 bits of the millisecond count be masked off. - \section2 MachAbsoluteTime This clock type is based on the absolute time presented by Mach kernels, @@ -192,10 +174,7 @@ QT_BEGIN_NAMESPACE \section2 PerformanceCounter This clock uses the Windows functions \tt{QueryPerformanceCounter} and - \tt{QueryPerformanceFrequency} to access the system's high-precision - performance counter. Since this counter may not be available on all - systems, QElapsedTimer will fall back to the \tt{TickCounter} clock - automatically, if this clock cannot be used. + \tt{QueryPerformanceFrequency} to access the system's performance counter. This clock is monotonic and does not overflow. diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index b249d37adf..c9d0f03619 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -275,6 +275,8 @@ LRESULT QT_WIN_CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPA void QEventDispatcherWin32Private::startPostedEventsTimer() { + // we received WM_QT_SENDPOSTEDEVENTS, so allow posting it again + wakeUps.storeRelaxed(0); if (sendPostedEventsTimerId == 0) { // Start a timer to deliver posted events when the message queue is emptied. sendPostedEventsTimerId = SetTimer(internalHwnd, SendPostedEventsTimerId, |