Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gdal] ifdef out some workarounds not required in gdal >= 2.3
(cherry-picked from 6f01d30)
  • Loading branch information
nyalldawson committed Mar 15, 2018
1 parent 8ba3988 commit 5bea05f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 5bea05f

Please sign in to comment.