Skip to content
Permalink
Browse files

Fix docs for createFeatures

  • Loading branch information
elpaso committed Feb 19, 2019
1 parent 490c1fe commit 348e6837ac883f9c44add8fd45600df3ad507d0b
Showing with 11 additions and 6 deletions.
  1. +7 −3 python/core/auto_generated/qgsvectorlayerutils.sip.in
  2. +4 −3 src/core/qgsvectorlayerutils.h
@@ -177,17 +177,21 @@ 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,
const QgsFeaturesDataList &featuresData,
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/ );
@@ -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,

0 comments on commit 348e683

Please sign in to comment.
You can’t perform that action at this time.