summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@theqtcompany.com>2015-06-30 13:18:57 +0200
committerJake Petroules <jake.petroules@theqtcompany.com>2015-10-13 22:57:12 +0000
commitb63c3d4d9a8917a84cf24439a0f75a17df0aafee (patch)
tree51503e1d3fa91bf9772f3ddea12bf26702f0fbe4 /src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
parent967e4f258cd39991fd2d0ac3753544900d51fbc2 (diff)
Make the CoreFoundation event dispatcher depend on QtCore only
In anticipation of moving it to QtCore. The call to QWindowSystemInterface::sendWindowSystemEvents() has been moved to QIOSEventDispatcher by making processPostedEvents() virtual. Change-Id: I9e03be4153a9f5f34e9a0ac942cdff572a44c318 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm')
-rw-r--r--src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm b/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
index 13b7dc4358..0273fe5ed4 100644
--- a/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
+++ b/src/platformsupport/eventdispatchers/qeventdispatcher_cf.mm
@@ -41,8 +41,6 @@
#include <QtCore/private/qcore_mac_p.h>
#include <QtCore/private/qthread_p.h>
-#include <qpa/qwindowsysteminterface.h>
-
#include <limits>
#include <UIKit/UIApplication.h>
@@ -169,6 +167,7 @@ static const CFTimeInterval kCFTimeIntervalDistantFuture = std::numeric_limits<C
QEventDispatcherCoreFoundation::QEventDispatcherCoreFoundation(QObject *parent)
: QAbstractEventDispatcher(parent)
+ , m_processEvents(QEventLoop::EventLoopExec)
, m_postedEventsRunLoopSource(this, &QEventDispatcherCoreFoundation::processPostedEvents)
, m_runLoopActivityObserver(this, &QEventDispatcherCoreFoundation::handleRunLoopActivity,
#if DEBUG_EVENT_DISPATCHER
@@ -181,7 +180,6 @@ QEventDispatcherCoreFoundation::QEventDispatcherCoreFoundation(QObject *parent)
, m_runLoopTimer(0)
, m_blockedRunLoopTimer(0)
, m_overdueTimerScheduled(false)
- , m_processEvents(QEventLoop::EventLoopExec)
{
m_cfSocketNotifier.setHostEventDispatcher(this);
@@ -371,11 +369,11 @@ bool QEventDispatcherCoreFoundation::processEvents(QEventLoop::ProcessEventsFlag
return eventsProcessed;
}
-void QEventDispatcherCoreFoundation::processPostedEvents()
+bool QEventDispatcherCoreFoundation::processPostedEvents()
{
if (m_processEvents.processedPostedEvents && !(m_processEvents.flags & QEventLoop::EventLoopExec)) {
qEventDispatcherDebug() << "Already processed events this pass";
- return;
+ return false;
}
m_processEvents.processedPostedEvents = true;
@@ -384,9 +382,7 @@ void QEventDispatcherCoreFoundation::processPostedEvents()
QCoreApplication::sendPostedEvents();
qUnIndent();
- qEventDispatcherDebug() << "Sending window system events for " << m_processEvents.flags; qIndent();
- QWindowSystemInterface::sendWindowSystemEvents(m_processEvents.flags);
- qUnIndent();
+ return true;
}
void QEventDispatcherCoreFoundation::processTimers(CFRunLoopTimerRef timer)