Skip to content
Permalink
Browse files

[processing] determive correct output type based on the

QgsProcessingParameterFileDestination filter

(cherry picked from commit 73a8b80)
  • Loading branch information
alexbruy committed Mar 2, 2018
1 parent a2bf1ab commit 511fa36cb88f8293168abd0621f7240a2908815f
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/core/processing/qgsprocessingparameters.cpp
@@ -3386,7 +3386,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 511fa36

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