From b63c3d4d9a8917a84cf24439a0f75a17df0aafee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 30 Jun 2015 13:18:57 +0200 Subject: Make the CoreFoundation event dispatcher depend on QtCore only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- .../eventdispatchers/qeventdispatcher_cf.mm | 12 +++------ .../eventdispatchers/qeventdispatcher_cf_p.h | 30 ++++++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) (limited to 'src/platformsupport/eventdispatchers') 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 #include -#include - #include #include @@ -169,6 +167,7 @@ static const CFTimeInterval kCFTimeIntervalDistantFuture = std::numeric_limits class RunLoopSource { public: - typedef void (T::*CallbackFunction) (); + typedef bool (T::*CallbackFunction)(); enum { kHighestPriority = 0 } RunLoopSourcePriority; @@ -221,18 +221,8 @@ public: void interrupt(); void flush(); -private: - RunLoopSource<> m_postedEventsRunLoopSource; - RunLoopObserver<> m_runLoopActivityObserver; - - RunLoopModeTracker *m_runLoopModeTracker; - - QTimerInfoList m_timerInfoList; - CFRunLoopTimerRef m_runLoopTimer; - CFRunLoopTimerRef m_blockedRunLoopTimer; - bool m_overdueTimerScheduled; - - QCFSocketNotifier m_cfSocketNotifier; +protected: + virtual bool processPostedEvents(); struct ProcessEventsState { @@ -251,7 +241,19 @@ private: ProcessEventsState m_processEvents; - void processPostedEvents(); +private: + RunLoopSource<> m_postedEventsRunLoopSource; + RunLoopObserver<> m_runLoopActivityObserver; + + RunLoopModeTracker *m_runLoopModeTracker; + + QTimerInfoList m_timerInfoList; + CFRunLoopTimerRef m_runLoopTimer; + CFRunLoopTimerRef m_blockedRunLoopTimer; + bool m_overdueTimerScheduled; + + QCFSocketNotifier m_cfSocketNotifier; + void processTimers(CFRunLoopTimerRef); void handleRunLoopActivity(CFRunLoopActivity activity); -- cgit v1.2.3