path: root/src/corelib/kernel/qabstracteventdispatcher_p.h
diff options
authorDavid Faure <>2012-06-23 21:48:53 +0200
committerQt by Nokia <>2012-07-20 18:34:08 +0200
commit1603ba23656c8c31dc05fe9b3f1e12b22e29989a (patch)
tree5e507db7a34023b9236c982257923a2242c1693a /src/corelib/kernel/qabstracteventdispatcher_p.h
parent981ea7a1aa602cebfdd43b7dc6efd3abf5a1cba3 (diff)
Provide public API for native event filtering, moved up from QPA.
The previous API was hard to use (global function, no type safety, manual chaining), and confusing (app vs dispatcher split only made sense on Windows). Installing and removing out of order would have the risk of setting back a dangling pointer (crash). Meanwhile QPA added type safety, and this new API models the QObject::installEventFilter API for ease of use. The virtual method is in a new interface, QAbstractNativeEventFilter. QPA was even calling the dispatcher event filter with QPA-private event classes, which made no sense (refactoring leftover from when the code was in the dispatcher). Now the QPA plugins trigger the qcoreapp event filters with the actual native events directly. Change-Id: Ie35e47c59c862383bcaf857b28d54f7c72547882 Reviewed-by: Marius Storm-Olsen <>
Diffstat (limited to 'src/corelib/kernel/qabstracteventdispatcher_p.h')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qabstracteventdispatcher_p.h b/src/corelib/kernel/qabstracteventdispatcher_p.h
index b6f0160342..e34e30e7d1 100644
--- a/src/corelib/kernel/qabstracteventdispatcher_p.h
+++ b/src/corelib/kernel/qabstracteventdispatcher_p.h
@@ -65,9 +65,9 @@ class Q_CORE_EXPORT QAbstractEventDispatcherPrivate : public QObjectPrivate
inline QAbstractEventDispatcherPrivate()
- : event_filter(0)
{ }
- QAbstractEventDispatcher::EventFilter event_filter;
+ QList<QAbstractNativeEventFilter *> eventFilters;
static int allocateTimerId();
static void releaseTimerId(int id);