From d8272bcd9f99b660fa70e2fe1a4921854b306b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marianne=20Yrj=C3=A4n=C3=A4?= Date: Tue, 9 Mar 2021 11:44:16 +0200 Subject: [PATCH] Add QNX qpa to builds Task-number: QTBUG-91234 Change-Id: I978aff101ce29d2df74ced801911426ccd56e997 Reviewed-by: Rami Potinkara Reviewed-by: James McDonnell (cherry picked from commit 9c6721c106cfb593841e99b9670a3ba936254206) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/CMakeLists.txt | 2 +- .../platforms/qnx/.prev_CMakeLists.txt | 91 ++++++++++++++++++ src/plugins/platforms/qnx/CMakeLists.txt | 92 +++++++++++++++++++ src/plugins/platforms/qnx/qqnxwindow.cpp | 8 +- 4 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 src/plugins/platforms/qnx/.prev_CMakeLists.txt create mode 100644 src/plugins/platforms/qnx/CMakeLists.txt diff --git a/src/plugins/platforms/CMakeLists.txt b/src/plugins/platforms/CMakeLists.txt index bb246565b95..7f0ada80a68 100644 --- a/src/plugins/platforms/CMakeLists.txt +++ b/src/plugins/platforms/CMakeLists.txt @@ -25,7 +25,7 @@ if(QT_FEATURE_direct2d1_1 AND QT_FEATURE_directwrite) add_subdirectory(direct2d) endif() if(QNX) - # add_subdirectory(qnx) # special case TODO + add_subdirectory(qnx) endif() if(QT_FEATURE_eglfs) add_subdirectory(eglfs) diff --git a/src/plugins/platforms/qnx/.prev_CMakeLists.txt b/src/plugins/platforms/qnx/.prev_CMakeLists.txt new file mode 100644 index 00000000000..ad0731b840a --- /dev/null +++ b/src/plugins/platforms/qnx/.prev_CMakeLists.txt @@ -0,0 +1,91 @@ +# Generated from qnx.pro. + +##################################################################### +## QQnxIntegrationPlugin Plugin: +##################################################################### + +qt_internal_add_plugin(QQnxIntegrationPlugin + OUTPUT_NAME qqnx + TYPE platforms + SOURCES + main.cpp main.h + qqnxabstractcover.h + qqnxabstractnavigator.cpp qqnxabstractnavigator.h + qqnxabstractvirtualkeyboard.cpp qqnxabstractvirtualkeyboard.h + qqnxbuffer.cpp qqnxbuffer.h + qqnxcursor.cpp qqnxcursor.h + qqnxforeignwindow.cpp qqnxforeignwindow.h + qqnxglobal.cpp qqnxglobal.h + qqnxintegration.cpp qqnxintegration.h + qqnxkeytranslator.h + qqnxlgmon.h + qqnxnativeinterface.cpp qqnxnativeinterface.h + qqnxnavigatoreventhandler.cpp qqnxnavigatoreventhandler.h + qqnxrasterbackingstore.cpp qqnxrasterbackingstore.h + qqnxrasterwindow.cpp qqnxrasterwindow.h + qqnxscreen.cpp qqnxscreen.h + qqnxscreeneventfilter.h + qqnxscreeneventhandler.cpp qqnxscreeneventhandler.h + qqnxscreeneventthread.cpp qqnxscreeneventthread.h + qqnxservices.cpp qqnxservices.h + qqnxwindow.cpp qqnxwindow.h + PUBLIC_LIBRARIES + Qt::Core + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + screen +) + +#### Keys ignored in scope 1:.:.:qnx.pro:: +# OTHER_FILES = "qnx.json" + +## Scopes: +##################################################################### + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_egl + SOURCES + qqnxeglwindow.cpp qqnxeglwindow.h + qqnxglcontext.cpp qqnxglcontext.h + PUBLIC_LIBRARIES + EGL::EGL +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_pps + SOURCES + qqnxbuttoneventnotifier.cpp qqnxbuttoneventnotifier.h + qqnxnavigatoreventnotifier.cpp qqnxnavigatoreventnotifier.h + qqnxnavigatorpps.cpp qqnxnavigatorpps.h + qqnxvirtualkeyboardpps.cpp qqnxvirtualkeyboardpps.h + PUBLIC_LIBRARIES + PPS::PPS +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_clipboard AND QT_FEATURE_qqnx_pps + SOURCES + qqnxclipboard.cpp qqnxclipboard.h + PUBLIC_LIBRARIES + clipboard +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_imf AND QT_FEATURE_qqnx_pps + SOURCES + qqnxinputcontext_imf.cpp qqnxinputcontext_imf.h +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_pps AND NOT QT_FEATURE_qqnx_imf + SOURCES + qqnxinputcontext_noimf.cpp qqnxinputcontext_noimf.h +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_lgmon + SOURCES + qqnxlgmon.cpp + DEFINES + QQNX_LGMON + PUBLIC_LIBRARIES + lgmon +) + +#### Keys ignored in scope 8:.:.:qnx.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +# PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/qnx/CMakeLists.txt b/src/plugins/platforms/qnx/CMakeLists.txt new file mode 100644 index 00000000000..b49c5be1629 --- /dev/null +++ b/src/plugins/platforms/qnx/CMakeLists.txt @@ -0,0 +1,92 @@ +# Generated from qnx.pro. + +##################################################################### +## QQnxIntegrationPlugin Plugin: +##################################################################### + +qt_internal_add_plugin(QQnxIntegrationPlugin + OUTPUT_NAME qqnx + TYPE platforms + DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES qnx # special case + SOURCES + main.cpp main.h + qqnxabstractcover.h + qqnxabstractnavigator.cpp qqnxabstractnavigator.h + qqnxabstractvirtualkeyboard.cpp qqnxabstractvirtualkeyboard.h + qqnxbuffer.cpp qqnxbuffer.h + qqnxcursor.cpp qqnxcursor.h + qqnxforeignwindow.cpp qqnxforeignwindow.h + qqnxglobal.cpp qqnxglobal.h + qqnxintegration.cpp qqnxintegration.h + qqnxkeytranslator.h + qqnxlgmon.h + qqnxnativeinterface.cpp qqnxnativeinterface.h + qqnxnavigatoreventhandler.cpp qqnxnavigatoreventhandler.h + qqnxrasterbackingstore.cpp qqnxrasterbackingstore.h + qqnxrasterwindow.cpp qqnxrasterwindow.h + qqnxscreen.cpp qqnxscreen.h + qqnxscreeneventfilter.h + qqnxscreeneventhandler.cpp qqnxscreeneventhandler.h + qqnxscreeneventthread.cpp qqnxscreeneventthread.h + qqnxservices.cpp qqnxservices.h + qqnxwindow.cpp qqnxwindow.h + LIBRARIES + Qt::Core + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + screen +) + +#### Keys ignored in scope 1:.:.:qnx.pro:: +# OTHER_FILES = "qnx.json" + +## Scopes: +##################################################################### + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_egl + SOURCES + qqnxeglwindow.cpp qqnxeglwindow.h + qqnxglcontext.cpp qqnxglcontext.h + PUBLIC_LIBRARIES + EGL::EGL +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_pps + SOURCES + qqnxbuttoneventnotifier.cpp qqnxbuttoneventnotifier.h + qqnxnavigatoreventnotifier.cpp qqnxnavigatoreventnotifier.h + qqnxnavigatorpps.cpp qqnxnavigatorpps.h + qqnxvirtualkeyboardpps.cpp qqnxvirtualkeyboardpps.h + PUBLIC_LIBRARIES + PPS::PPS +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_clipboard AND QT_FEATURE_qqnx_pps + SOURCES + qqnxclipboard.cpp qqnxclipboard.h + PUBLIC_LIBRARIES + clipboard +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_imf AND QT_FEATURE_qqnx_pps + SOURCES + qqnxinputcontext_imf.cpp qqnxinputcontext_imf.h +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION QT_FEATURE_qqnx_pps AND NOT QT_FEATURE_qqnx_imf + SOURCES + qqnxinputcontext_noimf.cpp qqnxinputcontext_noimf.h +) + +qt_internal_extend_target(QQnxIntegrationPlugin CONDITION lgmon + SOURCES + qqnxlgmon.cpp + DEFINES + QQNX_LGMON + PUBLIC_LIBRARIES + lgmon +) + +#### Keys ignored in scope 8:.:.:qnx.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN: +# PLUGIN_EXTENDS = "-" diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 9d3b921c444..146db2909c2 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -946,10 +946,12 @@ void QQnxWindow::applyWindowState() void QQnxWindow::windowPosted() { - if (m_cover) + if (m_cover) { m_cover->updateCover(); - - qqnxLgmonFramePosted(m_cover); // for performance measurements + qqnxLgmonFramePosted(true); // for performance measurements + } else { + qqnxLgmonFramePosted(false); // for performance measurements + } } bool QQnxWindow::shouldMakeFullScreen() const