Skip to content
Permalink
Browse files

[processing] determive correct output type based on the

QgsProcessingParameterFileDestination filter
  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent 705ffce commit 73a8b80e59bb2ca5fcca92aedca970e6f2db3028
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/processing/qgsprocessingparameters.cpp
@@ -3402,7 +3402,14 @@ QString QgsProcessingParameterFileDestination::valueAsPythonString( const QVaria

QgsProcessingOutputDefinition *QgsProcessingParameterFileDestination::toOutputDefinition() const
{
return new QgsProcessingOutputFile( name(), description() );
if ( !mFileFilter.isEmpty() and mFileFilter.contains( QStringLiteral( "html" ), Qt::CaseInsensitive ) )
{
return new QgsProcessingOutputHtml( name(), description() );
}
else
{
return new QgsProcessingOutputFile( name(), description() );
}
}

QString QgsProcessingParameterFileDestination::defaultFileExtension() const

0 comments on commit 73a8b80

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