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>
This commit is contained in:
Karim Pinter 2017-12-15 12:56:47 +02:00
parent b0938cb6c1
commit 3af9d77431
6 changed files with 31 additions and 32 deletions

View File

@ -509,7 +509,7 @@
"label": "PPS", "label": "PPS",
"emitIf": "config.qnx", "emitIf": "config.qnx",
"condition": "libs.pps", "condition": "libs.pps",
"output": [ "privateConfig" ] "output": [ "privateFeature" ]
}, },
"qeventtransition": { "qeventtransition": {
"label": "QEventTransition class", "label": "QEventTransition class",

View File

@ -187,7 +187,7 @@ vxworks {
kernel/qfunctions_vxworks.h kernel/qfunctions_vxworks.h
} }
qqnx_pps { qnx:qtConfig(qqnx_pps) {
QMAKE_USE_PRIVATE += pps QMAKE_USE_PRIVATE += pps
SOURCES += \ SOURCES += \
kernel/qppsattribute.cpp \ kernel/qppsattribute.cpp \

View File

@ -956,7 +956,7 @@
"label": "IMF", "label": "IMF",
"emitIf": "config.qnx", "emitIf": "config.qnx",
"condition": "libs.imf", "condition": "libs.imf",
"output": [ "privateConfig" ] "output": [ "privateFeature" ]
}, },
"integrityfb": { "integrityfb": {
"label": "INTEGRITY framebuffer", "label": "INTEGRITY framebuffer",

View File

@ -81,26 +81,26 @@ qtConfig(opengles2) {
QMAKE_USE += opengl_es2 egl QMAKE_USE += opengl_es2 egl
} }
CONFIG(qqnx_pps) { qtConfig(qqnx_pps) {
DEFINES += QQNX_PPS SOURCES += qqnxbuttoneventnotifier.cpp \
SOURCES += qqnxclipboard.cpp \
qqnxbuttoneventnotifier.cpp \
qqnxnavigatorpps.cpp \ qqnxnavigatorpps.cpp \
qqnxnavigatoreventnotifier.cpp \ qqnxnavigatoreventnotifier.cpp \
qqnxvirtualkeyboardpps.cpp qqnxvirtualkeyboardpps.cpp
HEADERS += qqnxclipboard.h \ HEADERS += qqnxbuttoneventnotifier.h \
qqnxbuttoneventnotifier.h \
qqnxnavigatorpps.h \ qqnxnavigatorpps.h \
qqnxnavigatoreventnotifier.h \ qqnxnavigatoreventnotifier.h \
qqnxvirtualkeyboardpps.h qqnxvirtualkeyboardpps.h
QMAKE_USE += pps QMAKE_USE += pps
!contains(DEFINES, QT_NO_CLIPBOARD): LIBS += -lclipboard
CONFIG(qqnx_imf) { qtConfig(clipboard) {
DEFINES += QQNX_IMF SOURCES += qqnxclipboard.cpp
HEADERS += qqnxclipboard.h
LIBS += -lclipboard
}
qtConfig(qqnx_imf) {
HEADERS += qqnxinputcontext_imf.h HEADERS += qqnxinputcontext_imf.h
SOURCES += qqnxinputcontext_imf.cpp SOURCES += qqnxinputcontext_imf.cpp
} else { } else {

View File

@ -56,17 +56,16 @@
#include "qqnxeglwindow.h" #include "qqnxeglwindow.h"
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
#include "qqnxnavigatorpps.h" #include "qqnxnavigatorpps.h"
#include "qqnxnavigatoreventnotifier.h" #include "qqnxnavigatoreventnotifier.h"
#include "qqnxvirtualkeyboardpps.h" #include "qqnxvirtualkeyboardpps.h"
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
# include "qqnxbuttoneventnotifier.h" # include "qqnxbuttoneventnotifier.h"
# include "qqnxclipboard.h" # include "qqnxclipboard.h"
# if QT_CONFIG(qqnx_imf)
# if defined(QQNX_IMF)
# include "qqnxinputcontext_imf.h" # include "qqnxinputcontext_imf.h"
# else # else
# include "qqnxinputcontext_noimf.h" # include "qqnxinputcontext_noimf.h"
@ -126,7 +125,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
, m_screenEventThread(0) , m_screenEventThread(0)
, m_navigatorEventHandler(new QQnxNavigatorEventHandler()) , m_navigatorEventHandler(new QQnxNavigatorEventHandler())
, m_virtualKeyboard(0) , m_virtualKeyboard(0)
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
, m_navigatorEventNotifier(0) , m_navigatorEventNotifier(0)
, m_inputContext(0) , m_inputContext(0)
, m_buttonsNotifier(new QQnxButtonEventNotifier()) , m_buttonsNotifier(new QQnxButtonEventNotifier())
@ -150,7 +149,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT), Q_SCREEN_CRITICALERROR(screen_create_context(&ms_screenContext, SCREEN_APPLICATION_CONTEXT),
"Failed to create screen context"); "Failed to create screen context");
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
// Create/start navigator event notifier // Create/start navigator event notifier
m_navigatorEventNotifier = new QQnxNavigatorEventNotifier(m_navigatorEventHandler); 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 = new QQnxScreenEventThread(ms_screenContext, m_screenEventHandler);
m_screenEventThread->start(); m_screenEventThread->start();
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
// Create/start the keyboard class. // Create/start the keyboard class.
m_virtualKeyboard = new QQnxVirtualKeyboardPps(); m_virtualKeyboard = new QQnxVirtualKeyboardPps();
@ -177,7 +176,7 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
QMetaObject::invokeMethod(m_virtualKeyboard, "start", Qt::QueuedConnection); QMetaObject::invokeMethod(m_virtualKeyboard, "start", Qt::QueuedConnection);
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
m_navigator = new QQnxNavigatorPps(); m_navigator = new QQnxNavigatorPps();
#endif #endif
@ -192,16 +191,16 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
QObject::connect(m_virtualKeyboard, SIGNAL(heightChanged(int)), QObject::connect(m_virtualKeyboard, SIGNAL(heightChanged(int)),
primaryDisplay(), SLOT(keyboardHeightChanged(int))); primaryDisplay(), SLOT(keyboardHeightChanged(int)));
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
// Set up the input context // Set up the input context
m_inputContext = new QQnxInputContext(this, *m_virtualKeyboard); m_inputContext = new QQnxInputContext(this, *m_virtualKeyboard);
#if defined(QQNX_IMF) #if QT_CONFIG(qqnx_imf)
m_screenEventHandler->addScreenEventFilter(m_inputContext); m_screenEventHandler->addScreenEventFilter(m_inputContext);
#endif #endif
#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 // 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 // needed to have the QThread internals of the main thread properly initialized
QMetaObject::invokeMethod(m_buttonsNotifier, "start", Qt::QueuedConnection); QMetaObject::invokeMethod(m_buttonsNotifier, "start", Qt::QueuedConnection);
@ -224,7 +223,7 @@ QQnxIntegration::~QQnxIntegration()
#endif #endif
// Stop/destroy navigator event notifier // Stop/destroy navigator event notifier
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
delete m_navigatorEventNotifier; delete m_navigatorEventNotifier;
#endif #endif
delete m_navigatorEventHandler; delete m_navigatorEventHandler;
@ -248,7 +247,7 @@ QQnxIntegration::~QQnxIntegration()
QQnxGLContext::shutdownContext(); QQnxGLContext::shutdownContext();
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
// Destroy the hardware button notifier // Destroy the hardware button notifier
delete m_buttonsNotifier; delete m_buttonsNotifier;
@ -318,7 +317,7 @@ QPlatformOpenGLContext *QQnxIntegration::createPlatformOpenGLContext(QOpenGLCont
} }
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
QPlatformInputContext *QQnxIntegration::inputContext() const QPlatformInputContext *QQnxIntegration::inputContext() const
{ {
qIntegrationDebug(); qIntegrationDebug();
@ -361,7 +360,7 @@ QPlatformClipboard *QQnxIntegration::clipboard() const
{ {
qIntegrationDebug(); qIntegrationDebug();
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
if (!m_clipboard) if (!m_clipboard)
m_clipboard = new QQnxClipboard; m_clipboard = new QQnxClipboard;
#endif #endif

View File

@ -41,7 +41,7 @@
#define QQNXINTEGRATION_H #define QQNXINTEGRATION_H
#include <qpa/qplatformintegration.h> #include <qpa/qplatformintegration.h>
#include <private/qtguiglobal_p.h>
#include <QtCore/qmutex.h> #include <QtCore/qmutex.h>
#include <screen/screen.h> #include <screen/screen.h>
@ -61,7 +61,7 @@ class QQnxServices;
class QSimpleDrag; class QSimpleDrag;
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
class QQnxInputContext; class QQnxInputContext;
class QQnxNavigatorEventNotifier; class QQnxNavigatorEventNotifier;
class QQnxButtonEventNotifier; class QQnxButtonEventNotifier;
@ -96,7 +96,7 @@ public:
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override; QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif #endif
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
QPlatformInputContext *inputContext() const override; QPlatformInputContext *inputContext() const override;
#endif #endif
@ -143,7 +143,7 @@ private:
QQnxScreenEventThread *m_screenEventThread; QQnxScreenEventThread *m_screenEventThread;
QQnxNavigatorEventHandler *m_navigatorEventHandler; QQnxNavigatorEventHandler *m_navigatorEventHandler;
QQnxAbstractVirtualKeyboard *m_virtualKeyboard; QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
#if defined(QQNX_PPS) #if QT_CONFIG(qqnx_pps)
QQnxNavigatorEventNotifier *m_navigatorEventNotifier; QQnxNavigatorEventNotifier *m_navigatorEventNotifier;
QQnxInputContext *m_inputContext; QQnxInputContext *m_inputContext;
QQnxButtonEventNotifier *m_buttonsNotifier; QQnxButtonEventNotifier *m_buttonsNotifier;