Navigation Menu

Skip to content

Commit

Permalink
Fix TestQgsProcessing
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed Apr 27, 2021
1 parent 929bf6c commit 6846023
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/core/processing/qgsprocessingprovider.cpp
Expand Up @@ -193,7 +193,6 @@ bool QgsProcessingProvider::isSupportedOutputValue( const QVariant &outputValue,

QString QgsProcessingProvider::defaultVectorFileExtension( bool hasGeometry ) const
{
QgsSettings settings;
const QString userDefault = QgsProcessingUtils::defaultVectorExtension();

const QStringList supportedExtensions = supportedOutputVectorLayerExtensions();
Expand All @@ -216,7 +215,6 @@ QString QgsProcessingProvider::defaultVectorFileExtension( bool hasGeometry ) co

QString QgsProcessingProvider::defaultRasterFileExtension() const
{
QgsSettings settings;
const QString userDefault = QgsProcessingUtils::defaultRasterExtension();

const QStringList supportedExtensions = supportedOutputRasterLayerExtensions();
Expand Down
4 changes: 2 additions & 2 deletions tests/src/analysis/testqgsprocessing.cpp
Expand Up @@ -11530,7 +11530,7 @@ void TestQgsProcessing::defaultExtensionsForProvider()

// unless the user has set a default format, which IS supported by that provider
QgsProcessing::settingsDefaultOutputVectorLayerExt.setValue( QgsVectorFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "tab" ) ) );
QgsProcessing::settingsDefaultOutputRasterLayerExt.setValue( QgsVectorFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "sdat" ) ) );
QgsProcessing::settingsDefaultOutputRasterLayerExt.setValue( QgsRasterFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "sdat" ) ) );

QCOMPARE( provider.defaultVectorFileExtension( true ), QStringLiteral( "tab" ) );
QCOMPARE( provider.defaultRasterFileExtension(), QStringLiteral( "sdat" ) );
Expand All @@ -11542,7 +11542,7 @@ void TestQgsProcessing::defaultExtensionsForProvider()

// but if default is not supported by provider, we use a supported format
QgsProcessing::settingsDefaultOutputVectorLayerExt.setValue( QgsVectorFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "gpkg" ) ) );
QgsProcessing::settingsDefaultOutputRasterLayerExt.setValue( QgsVectorFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "ecw" ) ) );
QgsProcessing::settingsDefaultOutputRasterLayerExt.setValue( QgsRasterFileWriter::supportedFormatExtensions().indexOf( QLatin1String( "ecw" ) ) );
QCOMPARE( provider.defaultVectorFileExtension( true ), QStringLiteral( "mif" ) );
QCOMPARE( provider.defaultRasterFileExtension(), QStringLiteral( "mig" ) );
}
Expand Down

0 comments on commit 6846023

Please sign in to comment.