diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-09-17 13:02:35 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-17 15:00:39 (GMT) |
commit | 9d74928189d990b24cfdd2350fe5a092951d670d (patch) | |
tree | d610aba7ce4fc77f5ceef27dcda2b64e2189ae4c /src/plugins/platforms/blackberry/qbbintegration.cpp | |
parent | 086f85a87c52c6026da294b7d00efffc50b669e1 (diff) | |
download | Qt-9d74928189d990b24cfdd2350fe5a092951d670d.zip Qt-9d74928189d990b24cfdd2350fe5a092951d670d.tar.gz Qt-9d74928189d990b24cfdd2350fe5a092951d670d.tar.bz2 |
QNX: Enable support for hardware buttons in QPA plugin
Backport of 3f407cddf8b1d5fc09b414dbecd9a47d30e3abe7
Change-Id: Id7fd3ca76793d8d3e3698dd402fe31e04567e938
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins/platforms/blackberry/qbbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/blackberry/qbbintegration.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/platforms/blackberry/qbbintegration.cpp b/src/plugins/platforms/blackberry/qbbintegration.cpp index 1ad8ff6..75ed659 100644 --- a/src/plugins/platforms/blackberry/qbbintegration.cpp +++ b/src/plugins/platforms/blackberry/qbbintegration.cpp @@ -54,6 +54,7 @@ #include "qbbglcontext.h" #include "qbblocalethread.h" #include "qbbnativeinterface.h" +#include "qbbbuttoneventnotifier.h" #if defined(Q_OS_BLACKBERRY) #include "qbbbpseventfilter.h" #include "qbbvirtualkeyboardbps.h" @@ -80,6 +81,7 @@ Q_DECLARE_METATYPE(screen_window_t); QBBIntegration::QBBIntegration() : mScreenEventThread(0), mNavigatorEventHandler(new QBBNavigatorEventHandler()), + mButtonsNotifier(new QBBButtonEventNotifier()), mFontDb(new QGenericUnixFontDatabase()), mScreenEventHandler(new QBBScreenEventHandler()), mPaintUsingOpenGL(getenv("QBB_USE_OPENGL") != NULL), @@ -164,6 +166,10 @@ QBBIntegration::QBBIntegration() : // Set up the input context qApp->setInputContext(new QBBInputContext(*mVirtualKeyboard, qApp)); + + // delay invocation of start() to the time the event loop is up and running + // needed to have the QThread internals of the main thread properly initialized + QMetaObject::invokeMethod(mButtonsNotifier, "start", Qt::QueuedConnection); } QBBIntegration::~QBBIntegration() @@ -171,10 +177,11 @@ QBBIntegration::~QBBIntegration() #if defined(QBBINTEGRATION_DEBUG) qDebug() << "QBB: platform plugin shutdown begin"; #endif - - delete mNativeInterface; + // Destroy the hardware button notifier + delete mButtonsNotifier; + #ifdef QBBLOCALETHREAD_ENABLED // stop/destroy the locale thread. delete mLocaleThread; |