diff options
author | Lars Knoll <lars.knoll@qt.io> | 2020-08-31 13:39:48 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2020-09-06 00:17:12 +0200 |
commit | 75d1d2a91376c3338510cf1e5fa10feaf8df5785 (patch) | |
tree | d75b6d14ea3f9bb72b10c71c64b21fdb00f9fc13 /src/corelib/kernel/qeventdispatcher_cf.mm | |
parent | 2caa2faf01d66904b912fe1b1b443b5932d928d0 (diff) |
Get rid of hasPendingEvents() and flush()
They are unused.
Change-Id: I77383f2be45551401ed9c2f88285511134cc8b0d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_cf.mm')
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_cf.mm | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_cf.mm b/src/corelib/kernel/qeventdispatcher_cf.mm index b482269df2..3525de4029 100644 --- a/src/corelib/kernel/qeventdispatcher_cf.mm +++ b/src/corelib/kernel/qeventdispatcher_cf.mm @@ -259,8 +259,7 @@ QEventLoop *QEventDispatcherCoreFoundation::currentEventLoop() const function should wait only if there were no events ready, and _then_ process all newly queued/available events. - These notes apply to other function in this class as well, such as - hasPendingEvents(). + These notes apply to other function in this class as well. */ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlags flags) { @@ -499,21 +498,6 @@ void QEventDispatcherCoreFoundation::handleRunLoopActivity(CFRunLoopActivity act } } -bool QEventDispatcherCoreFoundation::hasPendingEvents() -{ - // There doesn't seem to be any API on iOS to peek into the other sources - // to figure out if there are pending non-Qt events. As a workaround, we - // assume that if the run-loop is currently blocking and waiting for a - // source to signal then there are no system-events pending. If this - // function is called from the main thread then the second clause - // of the condition will always be true, as the run loop is - // never waiting in that case. The function would be more aptly named - // 'maybeHasPendingEvents' in our case. - - extern uint qGlobalPostedEventsCount(); - return qGlobalPostedEventsCount() || !CFRunLoopIsWaiting(m_runLoop); -} - void QEventDispatcherCoreFoundation::wakeUp() { if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) { @@ -544,11 +528,6 @@ void QEventDispatcherCoreFoundation::interrupt() CFRunLoopStop(m_runLoop); } -void QEventDispatcherCoreFoundation::flush() -{ - // X11 only. -} - #pragma mark - Socket notifiers void QEventDispatcherCoreFoundation::registerSocketNotifier(QSocketNotifier *notifier) |