Fix docs for createFeatures

This commit is contained in:
Alessandro Pasotti 2019-02-19 11:17:48 +01:00
parent 490c1fedfb
commit 348e6837ac
2 changed files with 11 additions and 6 deletions

View File

@ -177,6 +177,8 @@ Creates a new feature ready for insertion into a layer. Default values and const
passed for the new feature to copy as many attribute values as possible from the map,
assuming that they respect the layer's constraints. Note that the created feature is not
automatically inserted into the layer.
.. seealso:: :py:func:`createFeatures`
%End
static QgsFeatureList createFeatures( const QgsVectorLayer *layer,
@ -184,10 +186,12 @@ automatically inserted into the layer.
QgsExpressionContext *context = 0 );
%Docstring
Creates a set of new features ready for insertion into a layer. Default values and constraints
(e.g., unique constraints) will automatically be handled. An optional attribute map can be
passed for the new feature to copy as many attribute values as possible from the map,
assuming that they respect the layer's constraints. Note that the created features are not
(e.g., unique constraints) will automatically be handled. Note that the created features are not
automatically inserted into the layer.
.. seealso:: :py:func:`createFeature`
.. versionadded:: 3.6
%End
static QgsFeature duplicateFeature( QgsVectorLayer *layer, const QgsFeature &feature, QgsProject *project, int depth, QgsDuplicateFeatureContext &duplicateFeatureContext /Out/ );

View File

@ -170,6 +170,7 @@ class CORE_EXPORT QgsVectorLayerUtils
* passed for the new feature to copy as many attribute values as possible from the map,
* assuming that they respect the layer's constraints. Note that the created feature is not
* automatically inserted into the layer.
* \see createFeatures()
*/
static QgsFeature createFeature( const QgsVectorLayer *layer,
const QgsGeometry &geometry = QgsGeometry(),
@ -178,10 +179,10 @@ class CORE_EXPORT QgsVectorLayerUtils
/**
* Creates a set of new features ready for insertion into a layer. Default values and constraints
* (e.g., unique constraints) will automatically be handled. An optional attribute map can be
* passed for the new feature to copy as many attribute values as possible from the map,
* assuming that they respect the layer's constraints. Note that the created features are not
* (e.g., unique constraints) will automatically be handled. Note that the created features are not
* automatically inserted into the layer.
* \see createFeature()
* \since QGIS 3.6
*/
static QgsFeatureList createFeatures( const QgsVectorLayer *layer,
const QgsFeaturesDataList &featuresData,