From 4f2bbe407a0202cdd141a0697fe2f90579d2a50e Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 20 Feb 2025 09:54:05 +1000 Subject: [PATCH 1/2] Fix compilation on GDAL 3.11 --- .../auto_generated/proj/qgscoordinatereferencesystem.sip.in | 1 - .../auto_generated/proj/qgscoordinatereferencesystem.sip.in | 1 - src/core/proj/qgscoordinatereferencesystem.h | 6 ------ src/core/proj/qgscoordinatereferencesystem_p.h | 6 ------ 4 files changed, 14 deletions(-) diff --git a/python/PyQt6/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in b/python/PyQt6/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in index 9c5d7453ab1e..4ac534f8aa07 100644 --- a/python/PyQt6/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in +++ b/python/PyQt6/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in @@ -15,7 +15,6 @@ - class QgsCoordinateReferenceSystem { %Docstring(signature="appended") diff --git a/python/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in b/python/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in index b33cfa95148a..90a5dcb3b60a 100644 --- a/python/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in +++ b/python/core/auto_generated/proj/qgscoordinatereferencesystem.sip.in @@ -15,7 +15,6 @@ - class QgsCoordinateReferenceSystem { %Docstring(signature="appended") diff --git a/src/core/proj/qgscoordinatereferencesystem.h b/src/core/proj/qgscoordinatereferencesystem.h index 79d2e139cae3..1b3ad4a6b6a5 100644 --- a/src/core/proj/qgscoordinatereferencesystem.h +++ b/src/core/proj/qgscoordinatereferencesystem.h @@ -55,12 +55,6 @@ typedef struct pj_ctx PJ_CONTEXT; // forward declaration for sqlite3 typedef struct sqlite3 sqlite3 SIP_SKIP; -#ifdef DEBUG -typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH SIP_SKIP; -#else -typedef void *OGRSpatialReferenceH SIP_SKIP; -#endif - class QgsCoordinateReferenceSystem; typedef void ( *CUSTOM_CRS_VALIDATION )( QgsCoordinateReferenceSystem & ) SIP_SKIP; diff --git a/src/core/proj/qgscoordinatereferencesystem_p.h b/src/core/proj/qgscoordinatereferencesystem_p.h index 12dce8e2d1e0..8c34918068ce 100644 --- a/src/core/proj/qgscoordinatereferencesystem_p.h +++ b/src/core/proj/qgscoordinatereferencesystem_p.h @@ -35,12 +35,6 @@ #include "qgsprojutils.h" #include "qgsreadwritelocker.h" -#ifdef DEBUG -typedef struct OGRSpatialReferenceHS *OGRSpatialReferenceH; -#else -typedef void *OGRSpatialReferenceH; -#endif - class QgsCoordinateReferenceSystemPrivate : public QSharedData { public: From 3c210ff4308d6a9b259f96f0bc473c90b0b23a7f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 20 Feb 2025 09:54:15 +1000 Subject: [PATCH 2/2] Show GDAL release nickname in about screen on GDAL >= 3.11 --- src/app/qgisapp.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index b9da4e4f3ad9..038f4516cdc1 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -5505,11 +5505,21 @@ QString QgisApp::getVersionString() // GDAL version const QString gdalVersionCompiled { GDAL_RELEASE_NAME }; const QString gdalVersionRunning { GDALVersionInfo( "RELEASE_NAME" ) }; - versionString += QStringLiteral( "%1%2" ).arg( tr( "GDAL/OGR version" ), gdalVersionCompiled ); +#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION( 3, 11, 0 ) + const QString gdalReleaseNickName { GDAL_RELEASE_NICKNAME }; +#else + const QString gdalReleaseNickName; +#endif + + versionString += QStringLiteral( "%1%2" ).arg( tr( "GDAL version" ), gdalVersionCompiled ); if ( gdalVersionCompiled != gdalVersionRunning ) { versionString += QStringLiteral( " (%1)
%2 (%3)" ).arg( compLabel, gdalVersionRunning, runLabel ); } + if ( !gdalReleaseNickName.isEmpty() ) + { + versionString += QStringLiteral( " — %1" ).arg( gdalReleaseNickName ); + } versionString += QLatin1String( "" ); // proj