From 8da8e848d346534badd6e7974539b1e0fdd46666 Mon Sep 17 00:00:00 2001
From: t0b3 <t0b3@users.noreply.github.com>
Date: Tue, 25 Nov 2025 15:21:15 +0100
Subject: [PATCH 1/2] fix: support Qt 6.10.1

fixes: #64055
---
 src/core/qgssnappingutils.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/qgssnappingutils.cpp b/src/core/qgssnappingutils.cpp
index 8f2f33a05dd4..73b418ec6ec5 100644
--- a/src/core/qgssnappingutils.cpp
+++ b/src/core/qgssnappingutils.cpp
@@ -646,7 +646,7 @@ QString QgsSnappingUtils::dump()
     msg += QString( "layer : %1\n"
                     "config: %2   tolerance %3 %4\n" )
            .arg( layer.layer->name() )
-           .arg( layer.type ).arg( layer.tolerance ).arg( static_cast<int>( layer.unit ) );
+           .arg( static_cast<int>( layer.type ) ).arg( layer.tolerance ).arg( static_cast<int>( layer.unit ) );
 
     if ( mStrategy == IndexAlwaysFull || mStrategy == IndexHybrid || mStrategy == IndexExtent )
     {

From 2a7ecfed2492735545e3dc2e3de6748ffc7fa7c6 Mon Sep 17 00:00:00 2001
From: t0b3 <thomas.bettler@gmail.com>
Date: Wed, 26 Nov 2025 11:51:34 +0100
Subject: [PATCH 2/2] fix: support private Qt6Sql headers with Qt 6.10

---
 CMakeLists.txt                      | 2 +-
 external/qspatialite/CMakeLists.txt | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 01af5b942558..08870cf66916 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -618,7 +618,7 @@ if(WITH_CORE)
 
   find_package(${QT_VERSION_BASE} COMPONENTS Core Gui Widgets Network Xml Svg Concurrent Test Sql Positioning REQUIRED)
   if (BUILD_WITH_QT6)
-    find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat REQUIRED)
+    find_package(${QT_VERSION_BASE} COMPONENTS Core5Compat SqlPrivate REQUIRED)
   endif()
 
   if (NOT IOS)
diff --git a/external/qspatialite/CMakeLists.txt b/external/qspatialite/CMakeLists.txt
index 489a41f6cc33..bdd11db4a6d7 100644
--- a/external/qspatialite/CMakeLists.txt
+++ b/external/qspatialite/CMakeLists.txt
@@ -5,6 +5,7 @@ add_definitions(${QT_DEFINITIONS})
 add_definitions(-DQT_PLUGIN)
 add_definitions(-DQT_SHARED)
 
+find_package(${QT_VERSION_BASE}Sql CONFIG)
 include_directories(SYSTEM ${${QT_VERSION_BASE}Sql_PRIVATE_INCLUDE_DIRS})
 
 set(QSQLSPATIALITE_SRC qsql_spatialite.cpp smain.cpp qsql_spatialite.h smain.h)
