@@ -4867,6 +4867,8 @@ void TestQgsProcessing::parameterVectorOut()
4867
4867
def.reset ( new QgsProcessingParameterVectorDestination ( " with_geom" , QString (), QgsProcessing::TypeVectorAnyGeometry, QString (), true ) );
4868
4868
DummyProvider3 provider;
4869
4869
QString error;
4870
+ QVERIFY ( provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) ); // optional
4871
+ QVERIFY ( provider.isSupportedOutputValue ( QString (), def.get (), context, error ) ); // optional
4870
4872
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.shp" , def.get (), context, error ) );
4871
4873
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.SHP" , def.get (), context, error ) );
4872
4874
QVERIFY ( !provider.isSupportedOutputValue ( " ogr:d:/test.shp" , def.get (), context, error ) );
@@ -4875,6 +4877,9 @@ void TestQgsProcessing::parameterVectorOut()
4875
4877
QVERIFY ( provider.isSupportedOutputValue ( " d:/test.MIF" , def.get (), context, error ) );
4876
4878
QVERIFY ( provider.isSupportedOutputValue ( " ogr:d:/test.MIF" , def.get (), context, error ) );
4877
4879
QVERIFY ( provider.isSupportedOutputValue ( QgsProcessingOutputLayerDefinition ( " d:/test.MIF" ), def.get (), context, error ) );
4880
+ def.reset ( new QgsProcessingParameterVectorDestination ( " with_geom" , QString (), QgsProcessing::TypeVectorAnyGeometry, QString (), false ) );
4881
+ QVERIFY ( !provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) ); // non-optional
4882
+ QVERIFY ( !provider.isSupportedOutputValue ( QString (), def.get (), context, error ) ); // non-optional
4878
4883
4879
4884
provider.loadAlgorithms ();
4880
4885
def->mOriginalProvider = &provider;
@@ -4986,6 +4991,8 @@ void TestQgsProcessing::parameterRasterOut()
4986
4991
4987
4992
DummyProvider3 provider;
4988
4993
QString error;
4994
+ QVERIFY ( !provider.isSupportedOutputValue ( QVariant (), def.get (), context, error ) );
4995
+ QVERIFY ( !provider.isSupportedOutputValue ( QString (), def.get (), context, error ) );
4989
4996
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.tif" , def.get (), context, error ) );
4990
4997
QVERIFY ( !provider.isSupportedOutputValue ( " d:/test.TIF" , def.get (), context, error ) );
4991
4998
QVERIFY ( !provider.isSupportedOutputValue ( QgsProcessingOutputLayerDefinition ( " d:/test.tif" ), def.get (), context, error ) );
0 commit comments