diff options
author | David Faure <faure@kde.org> | 2012-06-23 21:48:53 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-20 18:34:08 +0200 |
commit | 1603ba23656c8c31dc05fe9b3f1e12b22e29989a (patch) | |
tree | 5e507db7a34023b9236c982257923a2242c1693a /src/corelib/kernel/qcoreapplication_win.cpp | |
parent | 981ea7a1aa602cebfdd43b7dc6efd3abf5a1cba3 (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 <marius.storm-olsen@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication_win.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreapplication_win.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/corelib/kernel/qcoreapplication_win.cpp b/src/corelib/kernel/qcoreapplication_win.cpp index 5649a8dd76..9d92f83b04 100644 --- a/src/corelib/kernel/qcoreapplication_win.cpp +++ b/src/corelib/kernel/qcoreapplication_win.cpp @@ -207,12 +207,6 @@ void qWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPSTR cmdParam, the event to be processed by Qt, then return true and set \a result to the value that the window procedure should return. Otherwise return false. - - It is only directly addressed messages that are filtered. To - handle system wide messages, such as messages from a registered - hot key, you need to install an event filter on the event - dispatcher, which is returned from - QAbstractEventDispatcher::instance(). */ bool QCoreApplication::winEventFilter(MSG *msg, long *result) // Windows event filter { |