Do not build QQnxScreenEventThread when not needed

Change-Id: I07525ac45a610f56f2bc72731379073f4aa67f7b
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
Fabian Bumberger 2013-03-25 12:37:26 +01:00 committed by The Qt Project
parent ec6e1f0b9f
commit b7891514ab
3 changed files with 25 additions and 8 deletions

View File

@ -11,11 +11,11 @@ QT += platformsupport platformsupport-private
CONFIG(blackberry) {
CONFIG += qqnx_pps
# Unomment this to enable screen event handling
# through a dedicated thread.
# DEFINES += QQNX_SCREENEVENTTHREAD
# Uncomment following line to enable screen event
# handling through a dedicated thread.
# CONFIG += qqnx_screeneventthread
} else {
DEFINES += QQNX_SCREENEVENTTHREAD
CONFIG += qqnx_screeneventthread
}
# Uncomment these to enable debugging output for various aspects of the plugin
@ -45,7 +45,6 @@ CONFIG(blackberry) {
SOURCES = main.cpp \
qqnxbuffer.cpp \
qqnxscreeneventthread.cpp \
qqnxintegration.cpp \
qqnxscreen.cpp \
qqnxwindow.cpp \
@ -61,7 +60,6 @@ SOURCES = main.cpp \
HEADERS = main.h \
qqnxbuffer.h \
qqnxscreeneventthread.h \
qqnxkeytranslator.h \
qqnxintegration.h \
qqnxscreen.h \
@ -76,6 +74,12 @@ HEADERS = main.h \
qqnxservices.h \
qqnxcursor.h
CONFIG(qqnx_screeneventthread) {
DEFINES += QQNX_SCREENEVENTTHREAD
SOURCES += qqnxscreeneventthread.cpp
HEADERS += qqnxscreeneventthread.h
}
LIBS += -lscreen
contains(QT_CONFIG, opengles2) {

View File

@ -40,7 +40,9 @@
****************************************************************************/
#include "qqnxintegration.h"
#if defined(QQNXSCREENEVENTTHREAD)
#include "qqnxscreeneventthread.h"
#endif
#include "qqnxnativeinterface.h"
#include "qqnxrasterbackingstore.h"
#include "qqnxscreen.h"
@ -120,7 +122,9 @@ static inline QQnxIntegration::Options parseOptions(const QStringList &paramList
QQnxIntegration::QQnxIntegration(const QStringList &paramList)
: QPlatformIntegration()
#if defined(QQNX_SCREENEVENTTHREAD)
, m_screenEventThread(0)
#endif
, m_navigatorEventHandler(new QQnxNavigatorEventHandler())
, m_virtualKeyboard(0)
#if defined(QQNX_PPS)
@ -198,8 +202,13 @@ QQnxIntegration::QQnxIntegration(const QStringList &paramList)
#if defined(Q_OS_BLACKBERRY)
QQnxVirtualKeyboardBps* virtualKeyboardBps = new QQnxVirtualKeyboardBps;
m_bpsEventFilter = new QQnxBpsEventFilter(m_navigatorEventHandler,
(m_screenEventThread ? 0 : m_screenEventHandler), virtualKeyboardBps);
#if defined(QQNX_SCREENEVENTTHREAD)
m_bpsEventFilter = new QQnxBpsEventFilter(m_navigatorEventHandler, 0, virtualKeyboardBps);
#else
m_bpsEventFilter = new QQnxBpsEventFilter(m_navigatorEventHandler, m_screenEventHandler, virtualKeyboardBps);
#endif
m_bpsEventFilter->installOnEventDispatcher(m_eventDispatcher);
m_virtualKeyboard = virtualKeyboardBps;

View File

@ -51,7 +51,9 @@
QT_BEGIN_NAMESPACE
class QQnxBpsEventFilter;
#if defined(QQNX_SCREENEVENTTHREAD)
class QQnxScreenEventThread;
#endif
class QQnxFileDialogHelper;
class QQnxNativeInterface;
class QQnxWindow;
@ -144,7 +146,9 @@ private:
static void removeWindow(screen_window_t qnxWindow);
screen_context_t m_screenContext;
#if defined(QNX_SCREENEVENTTHREAD)
QQnxScreenEventThread *m_screenEventThread;
#endif
QQnxNavigatorEventHandler *m_navigatorEventHandler;
QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
#if defined(QQNX_PPS)