From 3662027578f85366547e8e172cf3a42c54e59793 Mon Sep 17 00:00:00 2001 From: Kevin Krammer Date: Mon, 16 Apr 2012 09:53:17 +0200 Subject: Use BPS based event handling Create a QPA specific subclass of the blackberry event dispatcher (basically the BPS equivalent to QPAEventDispatcherGlib or QEventDispatcherQPA. Create an event dispatcher event filter that will receive all BPS events and then either handle them itself or delegate to event subtype specific handlers. Backport of fa94f01489611f2c72d1678b4d9439a584e7c4f9 Change-Id: Ie51c064c5ef1faca04e09a4f7ff35069ff6afda5 Reviewed-by: Thomas McGuire Reviewed-by: Sean Harmer Reviewed-by: Giuseppe D'Angelo --- src/gui/kernel/qapplication_qpa.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gui/kernel/qapplication_qpa.cpp') diff --git a/src/gui/kernel/qapplication_qpa.cpp b/src/gui/kernel/qapplication_qpa.cpp index 242b5ef5e2..b777e38506 100644 --- a/src/gui/kernel/qapplication_qpa.cpp +++ b/src/gui/kernel/qapplication_qpa.cpp @@ -42,10 +42,14 @@ #include "qapplication_p.h" #include "qcolormap.h" #include "qpixmapcache.h" +#if defined(Q_OS_BLACKBERRY) +#include "qeventdispatcher_blackberry_qpa_p.h" +#else #if !defined(QT_NO_GLIB) #include "qeventdispatcher_glib_qpa_p.h" #endif #include "qeventdispatcher_qpa_p.h" +#endif #ifndef QT_NO_CURSOR #include "private/qcursor_p.h" #endif @@ -147,12 +151,16 @@ QString QApplicationPrivate::appName() const void QApplicationPrivate::createEventDispatcher() { Q_Q(QApplication); +#if defined(Q_OS_BLACKBERRY) + eventDispatcher = new QEventDispatcherBlackberryQPA(q); +#else #if !defined(QT_NO_GLIB) if (qgetenv("QT_NO_GLIB").isEmpty() && QEventDispatcherGlib::versionSupported()) eventDispatcher = new QPAEventDispatcherGlib(q); else #endif eventDispatcher = new QEventDispatcherQPA(q); +#endif } static bool qt_try_modal(QWidget *widget, QEvent::Type type) -- cgit v1.2.3