From 247b697c4f0c79373f275a4c347c1ba0993dcd65 Mon Sep 17 00:00:00 2001 From: Christopher Hahn Date: Wed, 24 Jun 2026 12:24:12 +0200 Subject: [PATCH] gui+qnx: enable QClipboard on QNX (BB10) Upstream Qt gates the clipboard feature off on QNX (CONDITION ... AND NOT QNX), so QGuiApplication::clipboard() / QClipboard disappear and tdesktop (which uses clipboard in ~50 files) can't build. Allow the feature on QNX. The qqnx platform plugin ships a working QQnxClipboard (built when QT_FEATURE_qqnx_pps, links libclipboard which the QNX 8 sysroot provides), but it had bit-rotted while the feature was off: Qt 6.8.3 no longer pulls QLoggingCategory/QSet transitively, so add the missing includes to qqnxclipboard.{h,cpp}. Build with -DFEATURE_clipboard=ON. Co-Authored-By: Claude Opus 4.8 --- src/gui/configure.cmake | 5 ++++- src/plugins/platforms/qnx/qqnxclipboard.cpp | 2 ++ src/plugins/platforms/qnx/qqnxclipboard.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake index 0e53f5127a..46dfff586d 100644 --- a/src/gui/configure.cmake +++ b/src/gui/configure.cmake @@ -1082,7 +1082,10 @@ qt_feature("clipboard" PUBLIC SECTION "Kernel" LABEL "QClipboard" PURPOSE "Provides cut and paste operations." - CONDITION NOT INTEGRITY AND NOT QNX AND NOT rtems + # BB10: upstream gates clipboard off on QNX, but the qqnx plugin ships a + # working QQnxClipboard (built when QT_FEATURE_qqnx_pps, links libclipboard + # which the QNX sysroot provides). tdesktop needs QClipboard, so allow it. + CONDITION NOT INTEGRITY AND NOT rtems ) qt_feature_definition("clipboard" "QT_NO_CLIPBOARD" NEGATE VALUE "1") qt_feature("wheelevent" PUBLIC diff --git a/src/plugins/platforms/qnx/qqnxclipboard.cpp b/src/plugins/platforms/qnx/qqnxclipboard.cpp index 3f27ec8069..b402a9d170 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.cpp +++ b/src/plugins/platforms/qnx/qqnxclipboard.cpp @@ -10,7 +10,9 @@ #include #include +#include #include +#include #include #include diff --git a/src/plugins/platforms/qnx/qqnxclipboard.h b/src/plugins/platforms/qnx/qqnxclipboard.h index 66f862f0dc..39d11d66b7 100644 --- a/src/plugins/platforms/qnx/qqnxclipboard.h +++ b/src/plugins/platforms/qnx/qqnxclipboard.h @@ -8,6 +8,7 @@ #if !defined(QT_NO_CLIPBOARD) #include +#include QT_BEGIN_NAMESPACE