From 348e6837ac883f9c44add8fd45600df3ad507d0b Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Tue, 19 Feb 2019 11:17:48 +0100 Subject: [PATCH] Fix docs for createFeatures --- python/core/auto_generated/qgsvectorlayerutils.sip.in | 10 +++++++--- src/core/qgsvectorlayerutils.h | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/python/core/auto_generated/qgsvectorlayerutils.sip.in b/python/core/auto_generated/qgsvectorlayerutils.sip.in index 0f65209f2c8..0a3049dc7d2 100644 --- a/python/core/auto_generated/qgsvectorlayerutils.sip.in +++ b/python/core/auto_generated/qgsvectorlayerutils.sip.in @@ -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/ ); diff --git a/src/core/qgsvectorlayerutils.h b/src/core/qgsvectorlayerutils.h index a6087da502b..c3e62fd3b84 100644 --- a/src/core/qgsvectorlayerutils.h +++ b/src/core/qgsvectorlayerutils.h @@ -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,