From 834f77c9b9bfb1fe5ccaceeed21f60a440e4d22f Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 15 Oct 2025 00:38:31 +0800 Subject: [PATCH] fix: compatibility with Qt 6.10 Credits to Antonio Rojas from Arch Linux. --- CMakeLists.txt | 3 +++ src/plugins/qpa/integration.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 214feadb66..f5bccc6566 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,9 @@ find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS Widgets LinguistTools ) +if(Qt${QT_MAJOR_VERSION}_VERSION VERSION_GREATER_EQUAL 6.10) + find_package(Qt${QT_MAJOR_VERSION} COMPONENTS CorePrivate GuiPrivate REQUIRED) +endif() if (QT_MAJOR_VERSION EQUAL "5") find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS X11Extras) diff --git a/src/plugins/qpa/integration.cpp b/src/plugins/qpa/integration.cpp index a4c9e95586..cd12a36899 100644 --- a/src/plugins/qpa/integration.cpp +++ b/src/plugins/qpa/integration.cpp @@ -35,7 +35,11 @@ #else #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0) #include +#else +#include +#endif #include #endif