diff options
author | Morten Sorvig <morten.sorvig@nokia.com> | 2011-06-23 09:05:34 +0200 |
---|---|---|
committer | Morten Sorvig <morten.sorvig@nokia.com> | 2011-06-23 11:04:21 +0200 |
commit | 58d10c0bd7cff2009edf6183c660b2e149eb9a82 (patch) | |
tree | 85ef2a3b398932fdc1c5db5ebbb4b5312742a201 /src/plugins/platforms/cocoa | |
parent | c359cf0017e83b9cbfdf88c1fef16f84865ca0a8 (diff) |
Refactor window system event dispatching.
Add QWindowSystemInterface::sendWindowSystemEvents,
which contains the canonical "empty and send queued
window system events" implementation.
Make the Cocoa, QPA, and GLIB dispatchers use the
new implementation. Cocoa now no longer inherits
from QPA.
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.h | 6 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h index 2567700ce2..2085a437ac 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h @@ -90,7 +90,7 @@ #include <QtCore/qhash.h> #include <QtCore/qstack.h> #include <QtGui/qwindowdefs.h> -#include <QtPlatformSupport/private/qeventdispatcher_qpa_p.h> +#include <QtCore/private/qeventdispatcher_unix_p.h> #include <CoreFoundation/CoreFoundation.h> @@ -115,7 +115,7 @@ public: }; class QCocoaEventDispatcherPrivate; -class QCocoaEventDispatcher : public QEventDispatcherQPA +class QCocoaEventDispatcher : public QEventDispatcherUNIX { Q_OBJECT Q_DECLARE_PRIVATE(QCocoaEventDispatcher) @@ -167,7 +167,7 @@ struct MacSocketInfo { }; typedef QHash<int, MacSocketInfo *> MacSocketHash; -class QCocoaEventDispatcherPrivate : public QEventDispatcherQPAPrivate +class QCocoaEventDispatcherPrivate : public QEventDispatcherUNIXPrivate { Q_DECLARE_PUBLIC(QCocoaEventDispatcher) diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm index b5cbc83029..cfb6995f57 100644 --- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm +++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm @@ -910,7 +910,7 @@ QCocoaEventDispatcherPrivate::QCocoaEventDispatcherPrivate() } QCocoaEventDispatcher::QCocoaEventDispatcher(QObject *parent) - : QEventDispatcherQPA(*new QCocoaEventDispatcherPrivate, parent) + : QEventDispatcherUNIX(*new QCocoaEventDispatcherPrivate, parent) { Q_D(QCocoaEventDispatcher); CFRunLoopSourceContext context; @@ -992,9 +992,7 @@ void processPostedEvents(QCocoaEventDispatcherPrivate *const d, const bool block if (!d->threadData->canWait || (d->serialNumber != d->lastSerial)) { d->lastSerial = d->serialNumber; - // Call down to the base class event handler, which will send - // the window system events. - d->q_func()->QEventDispatcherQPA::processEvents(QEventLoop::AllEvents); + QWindowSystemInterface::sendWindowSystemEvents(d->q_func(), QEventLoop::AllEvents); } } |