From 7f6206a208a85bed52a24a53dfaa930ffd477232 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 15 Oct 2025 01:06:09 +0800 Subject: [PATCH 1/2] fix: compatibility with Qt 6.10 Credits to Antonio Rojas from Arch Linux. --- CMakeLists.txt | 1 + platformthemeplugin/qdeepintheme.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91cc9da7..2b2eac2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,7 @@ option(ENABLE_COV "Enable code coverage" OFF) if(PROJECT_VERSION_MAJOR EQUAL 6) set(VERSION_SUFFIX 6) find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core) + find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) else() set(VERSION_SUFFIX) find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core) diff --git a/platformthemeplugin/qdeepintheme.h b/platformthemeplugin/qdeepintheme.h index 9c6fcc49..34b65532 100644 --- a/platformthemeplugin/qdeepintheme.h +++ b/platformthemeplugin/qdeepintheme.h @@ -7,7 +7,11 @@ #include +#if QT_VERSION >= QT_VERSION_CHECK(6, 10, 0) +#include +#else #include +#endif #include #include From 5a4af20c95593111dd9424f4b6a4b85a8eac6716 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 15 Oct 2025 09:46:31 +0800 Subject: [PATCH 2/2] fix: adjust cmake conditions for <6.10 compatibility --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b2eac2e..5c5312a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,9 @@ option(ENABLE_COV "Enable code coverage" OFF) if(PROJECT_VERSION_MAJOR EQUAL 6) set(VERSION_SUFFIX 6) find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core) - find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) + if(Qt6_VERSION VERSION_GREATER_EQUAL 6.10) + find_package(Qt6 COMPONENTS CorePrivate GuiPrivate WidgetsPrivate REQUIRED) + endif() else() set(VERSION_SUFFIX) find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)