diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2012-01-02 09:23:49 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-03 22:02:20 +0100 |
commit | 7a597e6c43295c629f389203059d51f869ec02e0 (patch) | |
tree | a56da15e9f4148ceed2e73495684b777c83a54f9 /src/plugins/platforms/cocoa | |
parent | 9ea608cb54569f1e4a68c787fe2f5013a57c9722 (diff) |
Make QCocoaEventDispatcher inherit from QAbstractEventDispatcher
... instead of QEventDispatcherUNIX. The Cocoa dispatcher does not use
any of the facilities of the UNIX dispatcher, and it reimplements every
virtual method already (with the exception of flush(), which just needs
an empty implementation).
Change-Id: I24aefd169888946afac7800192a0f96770787718
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.h | 8 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 688cd75e29..a83bde03ea 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h @@ -87,10 +87,11 @@ // We mean it. // +#include <QtCore/qabstracteventdispatcher.h> #include <QtCore/qhash.h> #include <QtCore/qstack.h> #include <QtGui/qwindowdefs.h> -#include <QtCore/private/qeventdispatcher_unix_p.h> +#include <QtCore/private/qabstracteventdispatcher_p.h> #include <CoreFoundation/CoreFoundation.h> @@ -104,7 +105,7 @@ typedef struct _QCocoaModalSessionInfo { } QCocoaModalSessionInfo; class QCocoaEventDispatcherPrivate; -class QCocoaEventDispatcher : public QEventDispatcherUNIX +class QCocoaEventDispatcher : public QAbstractEventDispatcher { Q_OBJECT Q_DECLARE_PRIVATE(QCocoaEventDispatcher) @@ -128,6 +129,7 @@ public: void wakeUp(); void interrupt(); + void flush(); private: //friend void qt_mac_select_timer_callbk(__EventLoopTimer*, void*); @@ -157,7 +159,7 @@ struct MacSocketInfo { }; typedef QHash<int, MacSocketInfo *> MacSocketHash; -class QCocoaEventDispatcherPrivate : public QEventDispatcherUNIXPrivate +class QCocoaEventDispatcherPrivate : public QAbstractEventDispatcherPrivate { Q_DECLARE_PUBLIC(QCocoaEventDispatcher) diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index d55b28ffcc..1095d4b29a 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -904,7 +904,7 @@ QCocoaEventDispatcherPrivate::QCocoaEventDispatcherPrivate() } QCocoaEventDispatcher::QCocoaEventDispatcher(QObject *parent) - : QEventDispatcherUNIX(*new QCocoaEventDispatcherPrivate, parent) + : QAbstractEventDispatcher(*new QCocoaEventDispatcherPrivate, parent) { Q_D(QCocoaEventDispatcher); CFRunLoopSourceContext context; @@ -1051,6 +1051,9 @@ void QCocoaEventDispatcher::interrupt() d->cancelWaitForMoreEvents(); } +void QCocoaEventDispatcher::flush() +{ } + QCocoaEventDispatcher::~QCocoaEventDispatcher() { Q_D(QCocoaEventDispatcher); |