mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
[processing] determive correct output type based on the
QgsProcessingParameterFileDestination filter
This commit is contained in:
parent
705ffced63
commit
73a8b80e59
@ -3401,9 +3401,16 @@ QString QgsProcessingParameterFileDestination::valueAsPythonString( const QVaria
|
||||
}
|
||||
|
||||
QgsProcessingOutputDefinition *QgsProcessingParameterFileDestination::toOutputDefinition() const
|
||||
{
|
||||
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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user