File 0001-Add-missing-find_package-for-QtSqlPrivate.patch of Package kmymoney
From e191896a551d5b0623444143683ac9cf854f74e5 Mon Sep 17 00:00:00 2001
From: Nicolas Fella <nicolas.fella@gmx.de>
Date: Mon, 15 Sep 2025 16:21:12 +0200
Subject: [PATCH] Add missing find_package for QtSqlPrivate
Since Qt 6.10 the private parts are split into a separate CMake package
BUG: 509512
---
.gitlab-ci.yml | 2 ++
.kde-ci.yml | 2 +-
CMakeLists.txt | 4 ++++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1ba6603..0595322 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,6 +4,8 @@ include:
file:
- /gitlab-templates/json-validation.yml
- /gitlab-templates/linux.yml
+ - /gitlab-templates/linux-qt6.yml
+ - /gitlab-templates/linux-qt6-next.yml
- /gitlab-templates/freebsd-qt6.yml
- /gitlab-templates/windows-qt6.yml
- /gitlab-templates/craft-appimage-qt6.yml
diff --git a/.kde-ci.yml b/.kde-ci.yml
index ad5c942..f3facd4 100644
--- a/.kde-ci.yml
+++ b/.kde-ci.yml
@@ -30,7 +30,7 @@ Dependencies:
# 'pim/kidentitymanagement': '@stable'
'office/alkimia': '@latest'
-- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6']
+- 'on': ['Linux/Qt6', 'Linux/Qt6Next', 'FreeBSD/Qt6', 'Windows/Qt6']
'require':
'frameworks/extra-cmake-modules': '@latest-kf6'
'frameworks/kcmutils': '@latest-kf6'
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32e2840..044c21e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,6 +185,10 @@ endif()
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets Svg Xml Test PrintSupport)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} OPTIONAL_COMPONENTS Sql Concurrent QuickWidgets)
+if (Qt6Sql_VERSION VERSION_GREATER_EQUAL "6.10.0")
+ find_package(Qt6 REQUIRED COMPONENTS SqlPrivate)
+endif()
+
find_package(KF${QT_MAJOR_VERSION} ${KF_MIN_VERSION} REQUIRED COMPONENTS Archive CoreAddons Config ConfigWidgets Crash I18n Completion KCMUtils ItemModels ItemViews Service XmlGui TextWidgets Notifications KIO)
# For KF < 5.100 we need to fix a few method names that
--
2.51.0