From a433614bece5ddaed74b9e9e514bf13b7362fc1a Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 4 Apr 2017 10:12:10 -0700 Subject: [PATCH] QCocoaEventDispatcher: Remove Carbon dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QCoreApplication::hasPendingEvents() is deprecated, and so is the event dispatchers' eponymous function. (A subsequent patch will remove all of the event dispatchers' function, and add a warning in QCoreApplication.) The replacing logic is based upon QEventDispatcherCoreFoundation. Change-Id: If2c1920148dc6d910e77c1dc8ac5b4459c149e2b Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index d2f985ec87..cc63213904 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -86,7 +86,6 @@ #include #include -#include QT_BEGIN_NAMESPACE @@ -285,7 +284,7 @@ bool QCocoaEventDispatcher::hasPendingEvents() { extern uint qGlobalPostedEventsCount(); extern bool qt_is_gui_used; //qapplication.cpp - return qGlobalPostedEventsCount() || (qt_is_gui_used && GetNumEventsInQueue(GetMainEventQueue())); + return qGlobalPostedEventsCount() || (qt_is_gui_used && !CFRunLoopIsWaiting(CFRunLoopGetMain())); } static bool IsMouseOrKeyEvent( NSEvent* event )