Skip to content
Permalink
Browse files

fix build with GDAL >=2.3 (followup 2ed5472)

  • Loading branch information
jef-n committed Jun 21, 2018
1 parent ad00020 commit 7604d9b8e37b035bf1b10966d6c9d10c7f26312a
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/core/qgsvectorfilewriter.cpp
@@ -2815,13 +2815,13 @@ QList< QgsVectorFileWriter::FilterFormatDetails > QgsVectorFileWriter::supported

#if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(2,3,0)
GDALDriverH gdalDriver = GDALGetDriverByName( drvName.toLocal8Bit().constData() );
char **driverMetadata = nullptr;
char **metadata = nullptr;
if ( gdalDriver )
{
driverMetadata = GDALGetMetadata( gdalDriver, nullptr );
metadata = GDALGetMetadata( gdalDriver, nullptr );
}

bool nonSpatialFormat = CSLFetchBoolean( driverMetadata, GDAL_DCAP_NONSPATIAL, false );
bool nonSpatialFormat = CSLFetchBoolean( metadata, GDAL_DCAP_NONSPATIAL, false );
#else
bool nonSpatialFormat = ( drvName == QLatin1String( "ODS" ) || drvName == QLatin1String( "XLSX" ) || drvName == QLatin1String( "XLS" ) );
#endif

0 comments on commit 7604d9b

Please sign in to comment.
You can’t perform that action at this time.