And use it when we need to clone parameters (instead of more fragile
conversion to and from variants)
This fixes model loading which use algorithms which create python
subclasses of parameter definitions
This allows creation of models with child algorithms which do
things like merge a selected layer with a predefined static
layer, or create a vrt with a mix of static and user selected
layers.
And selecting/deselecting only these items. Otherwise it can be quite
cumbersome to manually select complex sets of items (e.g. try needing
to select ~50% of the layers in a large project - there's currently
no quick way to do this.) With this change you can at least
ctrl/shift click to create selections quicker.
parameters which accept lists of multiple layers
E.g. build vrt alg, merge vector layers alg
Otherwise you may need to load 100's of layers temporarily into
a project to perform algs on them
It was slightly confusing to have another override for snapping while it is possible
to configure "no snapping" or "all layers" snapping mode in project anyway.
And with the nice snapping toolbar it can be also done very quickly.
In addition to geometry filtered layers for each geometry
type in a mixed-geometry type layer adds a table
layer with all attributes.
Tehre is no perfetc solution here, if the layer is created
with a filter on geometrytype, the attributes are not shown
(this is probably a pre-existing bug), if the layer is added
as is, only the first geometry type is drawn.
With this implementation at least all data (attributes and
geometries) are accessible in some way.
Note that geopackage layers added by DB Manager do not show
all geometries of a mixed type layer.
Check that all parameter's values pass the validity check,
even if not returned as QgsProcessingModelChildParameterSource.
In case of list, tests that it is really a QgsProcessingModelChildParameterSource list,
and create a QgsProcessingModelChildParameterSource from the list if it is not the case
(useful for custom parameters that return lists as ParameterFieldsMapping).