Skip to content
Permalink
Browse files

[gdal] ifdef out some workarounds not required in gdal >= 2.3

  • Loading branch information
nyalldawson committed Mar 13, 2018
1 parent f95d616 commit 6f01d30d14e1eda8857db70e1c9e3a43d87cef61
Showing with 9 additions and 6 deletions.
  1. +9 −6 src/providers/gdal/qgsgdalprovider.cpp
@@ -2269,22 +2269,25 @@ void buildSupportedRasterFileFilterAndExtensions( QString &fileFiltersString, QS
// DMD_EXTENSION; so let's check for them here and handle
// them appropriately

if ( myGdalDriverDescription.startsWith( QLatin1String( "EHdr" ) ) )
if ( myGdalDriverDescription.startsWith( QLatin1String( "AIG" ) ) )
{
fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "hdr.adf" ) );
wildcards << QStringLiteral( "hdr.adf" );
}
#if !(GDAL_VERSION_MAJOR > 2 || (GDAL_VERSION_MAJOR == 2 && GDAL_VERSION_MINOR >= 3))
else if ( myGdalDriverDescription.startsWith( QLatin1String( "EHdr" ) ) )
{
// Fixed in GDAL 2.3
fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.bil" ) );
extensions << QStringLiteral( "bil" );
}
else if ( myGdalDriverDescription == QLatin1String( "ERS" ) )
{
// Fixed in GDAL 2.3
fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "*.ers" ) );
extensions << QStringLiteral( "ers" );
}
else if ( myGdalDriverDescription.startsWith( QLatin1String( "AIG" ) ) )
{
fileFiltersString += createFileFilter_( myGdalDriverLongName, QStringLiteral( "hdr.adf" ) );
wildcards << QStringLiteral( "hdr.adf" );
}
#endif
else
{
catchallFilter << QString( GDALGetDescription( myGdalDriver ) );

0 comments on commit 6f01d30

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