Skip to content

Commit

Permalink
Enable platforminputcontext in QNX QPA without PPS
Browse files Browse the repository at this point in the history
Platforminputcontext is needed for Qt Virtual Keyboard to work thus it
needs to be enabled without to condition to PPS. PPS is removed in
QNX 8.0 and the condition would never be met. It is safe to enable
platforminputcontext without condition for QNX 7.x as well since it is
needed for Qt VKB anyways.

Fixes: QTBUG-129436
Change-Id: I82230d1411e54713a2dabadf5a8dff3ca5455fbb
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 4d908a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
  • Loading branch information
Tuomas Vaarala authored and Qt Cherry-pick Bot committed Oct 3, 2024
1 parent 3b1951c commit 305b461
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
15 changes: 7 additions & 8 deletions src/plugins/platforms/qnx/qqnxintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
#if QT_CONFIG(qqnx_pps)
# include "qqnxbuttoneventnotifier.h"
# include "qqnxclipboard.h"
# if QT_CONFIG(qqnx_imf)
# include "qqnxinputcontext_imf.h"
# else
# include "qqnxinputcontext_noimf.h"
# endif
#endif

#if QT_CONFIG(qqnx_imf)
# include "qqnxinputcontext_imf.h"
#else
# include "qqnxinputcontext_noimf.h"
#endif

#include <qpa/qplatforminputcontextfactory_p.h>
Expand Down Expand Up @@ -117,9 +118,9 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
, m_screenEventThread(0)
, m_navigatorEventHandler(new QQnxNavigatorEventHandler())
, m_virtualKeyboard(0)
, m_inputContext(0)
#if QT_CONFIG(qqnx_pps)
, m_navigatorEventNotifier(0)
, m_inputContext(0)
, m_buttonsNotifier(new QQnxButtonEventNotifier())
#endif
, m_qpaInputContext(0)
Expand Down Expand Up @@ -403,15 +404,13 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
}
#endif

#if QT_CONFIG(qqnx_pps)
QPlatformInputContext *QQnxIntegration::inputContext() const
{
qCDebug(lcQpaQnx) << Q_FUNC_INFO;
if (m_qpaInputContext)
return m_qpaInputContext;
return m_inputContext;
}
#endif

void QQnxIntegration::moveToScreen(QWindow *window, int screen)
{
Expand Down
6 changes: 2 additions & 4 deletions src/plugins/platforms/qnx/qqnxintegration.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class QQnxAbstractVirtualKeyboard;
class QQnxServices;

class QSimpleDrag;
class QQnxInputContext;

#if QT_CONFIG(qqnx_pps)
class QQnxInputContext;
class QQnxNavigatorEventNotifier;
class QQnxButtonEventNotifier;
#endif
Expand Down Expand Up @@ -73,9 +73,7 @@ class QQnxIntegration : public QPlatformIntegration
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif

#if QT_CONFIG(qqnx_pps)
QPlatformInputContext *inputContext() const override;
#endif

void moveToScreen(QWindow *window, int screen);

Expand Down Expand Up @@ -124,9 +122,9 @@ class QQnxIntegration : public QPlatformIntegration
QQnxScreenEventThread *m_screenEventThread;
QQnxNavigatorEventHandler *m_navigatorEventHandler;
QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
QQnxInputContext *m_inputContext;
#if QT_CONFIG(qqnx_pps)
QQnxNavigatorEventNotifier *m_navigatorEventNotifier;
QQnxInputContext *m_inputContext;
QQnxButtonEventNotifier *m_buttonsNotifier;
#endif
QPlatformInputContext *m_qpaInputContext;
Expand Down

0 comments on commit 305b461

Please sign in to comment.