diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-04-04 10:12:10 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-04-04 18:06:42 +0000 |
commit | a433614bece5ddaed74b9e9e514bf13b7362fc1a (patch) | |
tree | c837b0fc5e64cdb60ac51e5c1ab292f07f2a911e /src/plugins/platforms/cocoa | |
parent | aeb3f9d168580efb8ab2df4003c53cbe8045ed80 (diff) |
QCocoaEventDispatcher: Remove Carbon dependency
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ø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 3 |
1 files changed, 1 insertions, 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 <qdebug.h> #include <AppKit/AppKit.h> -#include <Carbon/Carbon.h> 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 ) |