Skip to content
Permalink
Browse files

fix windows build

  • Loading branch information
jef-n committed Apr 17, 2013
1 parent 4c05932 commit 157024038cde3f7e7c6469654910fc00fbccc38a
Showing with 23 additions and 12 deletions.
  1. +10 −2 src/core/raster/qgsrasterdataprovider.cpp
  2. +13 −10 src/providers/gdal/qgsgdalprovider.cpp
@@ -341,13 +341,21 @@ QString QgsRasterDataProvider::lastErrorFormat()
return "text/plain";
}

typedef QList<QPair<QString, QString> > pyramidResamplingMethods_t();
typedef QList<QPair<QString, QString> > *pyramidResamplingMethods_t();
QList<QPair<QString, QString> > QgsRasterDataProvider::pyramidResamplingMethods( QString providerKey )
{
pyramidResamplingMethods_t *pPyramidResamplingMethods = ( pyramidResamplingMethods_t * ) cast_to_fptr( QgsProviderRegistry::instance()->function( providerKey, "pyramidResamplingMethods" ) );
if ( pPyramidResamplingMethods )
{
return pPyramidResamplingMethods();
QList<QPair<QString, QString> > *methods = pPyramidResamplingMethods();
if ( !methods )
{
QgsDebugMsg( "provider pyramidResamplingMethods returned no methods" );
}
else
{
return *methods;
}
}
else
{
@@ -2753,16 +2753,19 @@ QString QgsGdalProvider::validatePyramidsCreationOptions( RasterPyramidsFormat p
// by running one of the other resampling strategies below.
// see ticket #284

QGISEXTERN QList<QPair<QString, QString> > pyramidResamplingMethods()
QGISEXTERN QList<QPair<QString, QString> > *pyramidResamplingMethods()
{
QList<QPair<QString, QString> > methods;
methods.append( QPair<QString, QString>( "NEAREST", QObject::tr( "Nearest Neighbour" ) ) );
methods.append( QPair<QString, QString>( "AVERAGE", QObject::tr( "Average" ) ) );
methods.append( QPair<QString, QString>( "GAUSS", QObject::tr( "Gauss" ) ) );
methods.append( QPair<QString, QString>( "CUBIC", QObject::tr( "Cubic" ) ) );
methods.append( QPair<QString, QString>( "MODE", QObject::tr( "Mode" ) ) );
methods.append( QPair<QString, QString>( "NONE", QObject::tr( "None" ) ) );
static QList<QPair<QString, QString> > methods;

return methods;
}
if ( methods.isEmpty() )
{
methods.append( QPair<QString, QString>( "NEAREST", QObject::tr( "Nearest Neighbour" ) ) );
methods.append( QPair<QString, QString>( "AVERAGE", QObject::tr( "Average" ) ) );
methods.append( QPair<QString, QString>( "GAUSS", QObject::tr( "Gauss" ) ) );
methods.append( QPair<QString, QString>( "CUBIC", QObject::tr( "Cubic" ) ) );
methods.append( QPair<QString, QString>( "MODE", QObject::tr( "Mode" ) ) );
methods.append( QPair<QString, QString>( "NONE", QObject::tr( "None" ) ) );
}

return &methods;
}

0 comments on commit 1570240

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