mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
fix buildSupportedRasterFileFilter for sip api v2
This commit is contained in:
parent
ae3abccfe3
commit
097536c30c
@ -94,6 +94,7 @@ class QgsRasterLayer : QgsMapLayer
|
||||
// Static methods:
|
||||
//
|
||||
static void buildSupportedRasterFileFilter( QString & fileFilters );
|
||||
static QString buildSupportedRasterFileFilter2(); /* for sip api v2 */
|
||||
|
||||
/** This helper checks to see whether the file name appears to be a valid
|
||||
* raster file name. If the file name looks like it could be valid,
|
||||
|
@ -429,8 +429,7 @@ class FileFilter:
|
||||
@classmethod
|
||||
def allRastersFilter(self):
|
||||
if self.rastersFilter == '':
|
||||
# TODO fix this, does not work
|
||||
QgsRasterLayer.buildSupportedRasterFileFilter(self.rastersFilter)
|
||||
self.rastersFilter = QgsRasterLayer.buildSupportedRasterFileFilter2()
|
||||
|
||||
# workaround for QGis < 1.5 (see #2376)
|
||||
# removed as this is a core plugin QGis >= 1.9
|
||||
|
@ -176,13 +176,20 @@ void QgsRasterLayer::buildSupportedRasterFileFilter( QString & theFileFiltersStr
|
||||
buildsupportedrasterfilefilter_t *pBuild = ( buildsupportedrasterfilefilter_t * ) cast_to_fptr( QgsProviderRegistry::instance()->function( "gdal", "buildSupportedRasterFileFilter" ) );
|
||||
if ( ! pBuild )
|
||||
{
|
||||
QgsDebugMsg( "Could get buildSupportedRasterFileFilter in gdal provider library" );
|
||||
QgsDebugMsg( "Could not get buildSupportedRasterFileFilter in gdal provider library" );
|
||||
return;
|
||||
}
|
||||
|
||||
pBuild( theFileFiltersString );
|
||||
}
|
||||
|
||||
QString QgsRasterLayer::buildSupportedRasterFileFilter2( )
|
||||
{
|
||||
QString theFileFiltersString;
|
||||
buildSupportedRasterFileFilter( theFileFiltersString );
|
||||
return theFileFiltersString;
|
||||
}
|
||||
|
||||
/**
|
||||
* This helper checks to see whether the file name appears to be a valid raster file name
|
||||
*/
|
||||
|
@ -245,6 +245,7 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
|
||||
};
|
||||
|
||||
static void buildSupportedRasterFileFilter( QString & fileFilters );
|
||||
static QString buildSupportedRasterFileFilter2(); /* for sip api v2 */
|
||||
|
||||
/** This helper checks to see whether the file name appears to be a valid
|
||||
* raster file name. If the file name looks like it could be valid,
|
||||
|
Loading…
x
Reference in New Issue
Block a user