summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-07-20 20:52:44 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-24 00:08:28 +0200
commit42c86bba9d46d8d16ffd6c90ec34857eccc23df4 (patch)
tree703d79deb66054ed88613474f8d87e9f742f65dd /src/plugins/platforms
parent607c37befb145c3aa1b9d29365ac682a2bd3a55f (diff)
Remove winEventFilter, replaced with installNativeEventFilter.
No reason to keep a virtual method for Windows when all other similar methods (macEvent and x11Event) have been removed, and when installNativeEventFilter provides a much nicer solution (no need to derive from QApplication). Change-Id: Ia2a7960e320fcbd04cef91f467900861dbb377c1 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/windows/qwindowscontext.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
2 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index b12975174f..b2c492af39 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -706,8 +706,8 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
msg.pt.y = GET_Y_LPARAM(lParam);
long filterResult = 0;
- QCoreApplication* coreApp = QCoreApplication::instance();
- if (coreApp && coreApp->filterNativeEvent(d->m_eventType, &msg, &filterResult)) {
+ QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance();
+ if (dispatcher && dispatcher->filterNativeEvent(d->m_eventType, &msg, &filterResult)) {
*result = LRESULT(filterResult);
return true;
}
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 7f197c8ad5..11e1cc0c17 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -543,7 +543,8 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event)
#endif
long result = 0;
- bool handled = QCoreApplication::instance()->filterNativeEvent(m_nativeInterface->genericEventFilterType(), event, &result);
+ QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance();
+ bool handled = dispatcher && dispatcher->filterNativeEvent(m_nativeInterface->genericEventFilterType(), event, &result);
uint response_type = event->response_type & ~0x80;