Skip to content

Commit

Permalink
fix build with GDAL >=2.3 (followup 2ed5472)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 21, 2018
1 parent ad00020 commit 7604d9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 7604d9b

Please sign in to comment.