summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxintegration.cpp
diff options
context:
space:
mode:
authorKarim Pinter <karim.pinter@qt.io>2017-12-15 12:56:47 +0200
committerKarim Pinter <karim.pinter@qt.io>2017-12-19 11:07:12 +0000
commit3af9d774316ef0edf65acb478871d89231b930f2 (patch)
treeb89e2b29a7bbce9d36fb496f481c37c44423e9cf /src/plugins/platforms/qnx/qqnxintegration.cpp
parentb0938cb6c1fa29ec2d2a4fb9273e515cd0d6c08e (diff)
Fix pps and imf support for QNX builds
Change from config to feature in the json and pro files. Change-Id: I58ddac3c4ad739253bae010f1d5023fc1d481047 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxintegration.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index eee0581709..072510e052 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -56,17 +56,16 @@
#include "qqnxeglwindow.h"
#endif
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
#include "qqnxnavigatorpps.h"
#include "qqnxnavigatoreventnotifier.h"
#include "qqnxvirtualkeyboardpps.h"
#endif
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
# include "qqnxbuttoneventnotifier.h"
# include "qqnxclipboard.h"
-
-# if defined(QQNX_IMF)
+# if QT_CONFIG(qqnx_imf)
# include "qqnxinputcontext_imf.h"
# else
# include "qqnxinputcontext_noimf.h"
@@ -126,7 +125,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
, m_screenEventThread(0)
, m_navigatorEventHandler(new QQnxNavigatorEventHandler())
, m_virtualKeyboard(0)
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
, m_navigatorEventNotifier(0)
, m_inputContext(0)
, m_buttonsNotifier(new QQnxButtonEventNotifier())
@@ -150,7 +149,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
"Failed to create screen context");
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
// Create/start navigator event notifier
m_navigatorEventNotifier = new QQnxNavigatorEventNotifier(m_navigatorEventHandler);
@@ -168,7 +167,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
m_screenEventThread = new QQnxScreenEventThread(ms_screenContext, m_screenEventHandler);
m_screenEventThread->start();
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
// Create/start the keyboard class.
m_virtualKeyboard = new QQnxVirtualKeyboardPps();
@@ -177,7 +176,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
QMetaObject::invokeMethod(m_virtualKeyboard, "start", Qt::QueuedConnection);
#endif
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
m_navigator = new QQnxNavigatorPps();
#endif
@@ -192,16 +191,16 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
QObject::connect(m_virtualKeyboard, SIGNAL(heightChanged(int)),
primaryDisplay(), SLOT(keyboardHeightChanged(int)));
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
// Set up the input context
m_inputContext = new QQnxInputContext(this, *m_virtualKeyboard);
-#if defined(QQNX_IMF)
+#if QT_CONFIG(qqnx_imf)
m_screenEventHandler->addScreenEventFilter(m_inputContext);
#endif
#endif
}
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
// 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(m_buttonsNotifier, "start", Qt::QueuedConnection);
@@ -224,7 +223,7 @@ QQnxIntegration::~QQnxIntegration()
#endif
// Stop/destroy navigator event notifier
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
delete m_navigatorEventNotifier;
#endif
delete m_navigatorEventHandler;
@@ -248,7 +247,7 @@ QQnxIntegration::~QQnxIntegration()
QQnxGLContext::shutdownContext();
#endif
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
// Destroy the hardware button notifier
delete m_buttonsNotifier;
@@ -318,7 +317,7 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
}
#endif
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
QPlatformInputContext *QQnxIntegration::inputContext() const
{
qIntegrationDebug();
@@ -361,7 +360,7 @@ QPlatformClipboard *QQnxIntegration::clipboard() const
{
qIntegrationDebug();
-#if defined(QQNX_PPS)
+#if QT_CONFIG(qqnx_pps)
if (!m_clipboard)
m_clipboard = new QQnxClipboard;
#endif