diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-01-24 16:38:43 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-03-15 23:01:03 +0000 |
commit | f816f2e3c9dc7735eff35175c05a50446d389935 (patch) | |
tree | c0acf73447fc6b3df5d235b9c98c5255c4af143f /src/corelib/kernel/qeventdispatcher_cf.mm | |
parent | 8264e495fa9220c101a8a913701a0b8834a6d58b (diff) |
Allow log messages to be grouped by activity on Apple OSes
Useful for making sense of the event dispatcher, especially when running
tests.
Change-Id: Iea84bcfb40d4954439c2e31ffc0197c64907e800
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_cf.mm')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_cf.mm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm index 35b2390c6d..d670e297c0 100644 --- a/src/corelib/kernel/qeventdispatcher_cf.mm +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -238,6 +238,7 @@ QEventLoop *QEventDispatcherCoreFoundation::currentEventLoop() const */ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlags flags) { + QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processEvents"); bool eventsProcessed = false; if (flags & (QEventLoop::ExcludeUserInputEvents | QEventLoop::ExcludeSocketNotifiers)) @@ -390,6 +391,8 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag bool QEventDispatcherCoreFoundation::processPostedEvents() { + QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processPostedEvents"); + if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { qCDebug(lcEventDispatcher) << "Already processed events this pass"; return false; @@ -405,6 +408,8 @@ bool QEventDispatcherCoreFoundation::processPostedEvents() void QEventDispatcherCoreFoundation::processTimers(CFRunLoopTimerRef timer) { + QT_APPLE_SCOPED_LOG_ACTIVITY(lcEventDispatcher().isDebugEnabled(), "processTimers"); + if (m_processEvents.processedTimers && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { qCDebug(lcEventDispatcher) << "Already processed timers this pass"; m_processEvents.deferredUpdateTimers = true; |