diff --git a/src/core/providers/ogr/qgsogrproviderutils.cpp b/src/core/providers/ogr/qgsogrproviderutils.cpp index 9c1b80eb3457..67b779c265c2 100644 --- a/src/core/providers/ogr/qgsogrproviderutils.cpp +++ b/src/core/providers/ogr/qgsogrproviderutils.cpp @@ -344,8 +344,13 @@ QString createFilters( const QString &type ) } else if ( driverName.startsWith( QLatin1String( "GPKG" ) ) ) { +#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,7,0) + sFileFilters += createFileFilter_( QObject::tr( "GeoPackage" ), QStringLiteral( "*.gpkg *.gpkg.zip" ) ); + sExtensions << QStringLiteral( "gpkg" ) << QStringLiteral( "gpkg.zip" ); +#else sFileFilters += createFileFilter_( QObject::tr( "GeoPackage" ), QStringLiteral( "*.gpkg" ) ); sExtensions << QStringLiteral( "gpkg" ); +#endif } else if ( driverName.startsWith( QLatin1String( "GRASS" ) ) ) { diff --git a/src/core/qgsvectorfilewriter.cpp b/src/core/qgsvectorfilewriter.cpp index 91e12afce66b..0ae7e8e2b5cf 100644 --- a/src/core/qgsvectorfilewriter.cpp +++ b/src/core/qgsvectorfilewriter.cpp @@ -1574,7 +1574,11 @@ class QgsVectorFileWriterMetadataContainer QgsVectorFileWriter::MetaData( QStringLiteral( "GeoPackage" ), QObject::tr( "GeoPackage" ), +#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,7,0) + QStringLiteral( "*.gpkg *.gpkg.zip" ), +#else QStringLiteral( "*.gpkg" ), +#endif QStringLiteral( "gpkg" ), datasetOptions, layerOptions,