From 1603ba23656c8c31dc05fe9b3f1e12b22e29989a Mon Sep 17 00:00:00 2001 From: David Faure Date: Sat, 23 Jun 2012 21:48:53 +0200 Subject: 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 --- dist/changes-5.0.0 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'dist') diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 438885888f..df110ee3d0 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -389,6 +389,14 @@ QtCore * QEvent::AccessibilityPrepare, AccessibilityHelp and AccessibilityDescription removed: * The enum values simply didn't make sense in the first place and should simply be dropped. +* Filtering of native events (QCoreApplication::setEventFilter, as well as + QApplication::x11EventFilter/macEventFilter/qwsEventFilter) have been replaced + with QCoreApplication::installNativeEventFilter and removeNativeEventFilter, + for an API much closer to QEvent filtering. Note that the native events that can be + filtered this way depend on which QPA backend is chosen, at runtime. On X11, XEvents are + not used anymore, and have been replaced with xcb_generic_event_t due to the switch to + XCB, which requires porting the application code to XCB as well. + * [QTBUG-23529] QHash is now more resilient to a family of denial of service attacks exploiting algorithmic complexity, by supporting two-arguments overloads of the qHash() hashing function. -- cgit v1.2.3