diff --git a/src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp b/src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp index 546d62584ece..24c73257abce 100644 --- a/src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp +++ b/src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp @@ -9023,6 +9023,23 @@ QgsAbstractProcessingParameterWidgetWrapper *QgsProcessingFileDestinationWidgetW return new QgsProcessingFileDestinationWidgetWrapper( parameter, type ); } +QStringList QgsProcessingFileDestinationWidgetWrapper::compatibleParameterTypes() const +{ + return QStringList() + << QgsProcessingParameterString::typeName() + << QgsProcessingParameterFile::typeName(); +} + +QStringList QgsProcessingFileDestinationWidgetWrapper::compatibleOutputTypes() const +{ + return QStringList() << QgsProcessingOutputFile::typeName() + << QgsProcessingOutputString::typeName() + << QgsProcessingOutputVariant::typeName() + << QgsProcessingOutputRasterLayer::typeName() + << QgsProcessingOutputVectorLayer::typeName() + << QgsProcessingOutputMapLayer::typeName(); +} + QString QgsProcessingFileDestinationWidgetWrapper::modelerExpressionFormatString() const { return tr( "path to file destination" ); @@ -9048,6 +9065,21 @@ QgsAbstractProcessingParameterWidgetWrapper *QgsProcessingFolderDestinationWidge return new QgsProcessingFolderDestinationWidgetWrapper( parameter, type ); } +QStringList QgsProcessingFolderDestinationWidgetWrapper::compatibleParameterTypes() const +{ + return QStringList() + << QgsProcessingParameterString::typeName() + << QgsProcessingParameterFile::typeName(); +} + +QStringList QgsProcessingFolderDestinationWidgetWrapper::compatibleOutputTypes() const +{ + return QStringList() << QgsProcessingOutputFile::typeName() + << QgsProcessingOutputFolder::typeName() + << QgsProcessingOutputString::typeName() + << QgsProcessingOutputVariant::typeName(); +} + QString QgsProcessingFolderDestinationWidgetWrapper::modelerExpressionFormatString() const { return tr( "path to folder destination" ); diff --git a/src/gui/processing/qgsprocessingwidgetwrapperimpl.h b/src/gui/processing/qgsprocessingwidgetwrapperimpl.h index 7e2766a8c6de..134b87870443 100644 --- a/src/gui/processing/qgsprocessingwidgetwrapperimpl.h +++ b/src/gui/processing/qgsprocessingwidgetwrapperimpl.h @@ -2412,6 +2412,8 @@ class GUI_EXPORT QgsProcessingFileDestinationWidgetWrapper : public QgsProcessin QgsAbstractProcessingParameterWidgetWrapper *createWidgetWrapper( const QgsProcessingParameterDefinition *parameter, QgsProcessingGui::WidgetType type ) override; protected: + QStringList compatibleParameterTypes() const override; + QStringList compatibleOutputTypes() const override; QString modelerExpressionFormatString() const override; }; @@ -2430,6 +2432,8 @@ class GUI_EXPORT QgsProcessingFolderDestinationWidgetWrapper : public QgsProcess QgsAbstractProcessingParameterWidgetWrapper *createWidgetWrapper( const QgsProcessingParameterDefinition *parameter, QgsProcessingGui::WidgetType type ) override; protected: + QStringList compatibleParameterTypes() const override; + QStringList compatibleOutputTypes() const override; QString modelerExpressionFormatString() const override; };