From 0b64a8399544339508a88c31e635002f99aeae59 Mon Sep 17 00:00:00 2001 From: David Signer Date: Fri, 8 May 2020 07:51:47 +0200 Subject: [PATCH] docs --- python/core/auto_generated/qgsvectorlayer.sip.in | 6 +++--- python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in | 2 ++ src/core/qgsvectorlayer.cpp | 2 +- src/core/qgsvectorlayer.h | 6 +++--- src/core/qgsvectorlayerjoinbuffer.h | 2 ++ 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/python/core/auto_generated/qgsvectorlayer.sip.in b/python/core/auto_generated/qgsvectorlayer.sip.in index 40d37f2bd0d..2c9f3ed44d2 100644 --- a/python/core/auto_generated/qgsvectorlayer.sip.in +++ b/python/core/auto_generated/qgsvectorlayer.sip.in @@ -1276,7 +1276,7 @@ Deletes a vertex from a feature. Deletes the selected features :param deleteCount: The number of successfully deleted features -:param cascade: If the decendants of the feature should be deleted as well +:param context: The chain of features who will be deleted for feedback and to avoid endless recursions :return: ``True`` in case of success and ``False`` otherwise %End @@ -1961,7 +1961,7 @@ Deletes a list of attribute fields (but does not commit it) Deletes a feature from the layer (but does not commit it). :param fid: The feature id to delete -:param cascade: If the decendants of the feature should be deleted as well +:param context: The chain of features who will be deleted for feedback and to avoid endless recursions .. note:: @@ -1976,7 +1976,7 @@ Deletes a feature from the layer (but does not commit it). Deletes a set of features from the layer (but does not commit it) :param fids: The feature ids to delete -:param cascade: If the decendants of the feature should be deleted as well +:param context: The chain of features who will be deleted for feedback and to avoid endless recursions :return: ``False`` if the layer is not in edit mode or does not support deleting in case of an active transaction depends on the provider implementation diff --git a/python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in b/python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in index 0b599dfbdf0..c4353d5c9e9 100644 --- a/python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in +++ b/python/core/auto_generated/qgsvectorlayerjoinbuffer.sip.in @@ -213,6 +213,7 @@ Deletes a feature from joined layers. The feature id given in parameter is the one coming from the target layer. :param fid: The feature id from the target layer to delete +:param context: The chain of features who will be deleted for feedback and to avoid endless recursions :return: ``False`` if an error happened, ``True`` otherwise @@ -226,6 +227,7 @@ Deletes a list of features from joined layers. Feature ids given in a parameter are those coming from the target layer. :param fids: Feature ids from the target layer to delete +:param context: The chain of features who will be deleted for feedback and to avoid endless recursions :return: ``False`` if an error happened, ``True`` otherwise diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index 88ab70ebbc5..4489c2a692c 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -3176,7 +3176,7 @@ bool QgsVectorLayer::deleteFeatureCascade( QgsFeatureId fid, QgsVectorLayer::Del QgsFeatureIds handledFeatureIds = context->handledFeatures.value( this ); if ( handledFeatureIds.contains( fid ) ) { - // break recursion + // avoid endless recursion return false; } else diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index e78e8250712..3f32451ab1b 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -1295,7 +1295,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * Deletes the selected features * \param deleteCount The number of successfully deleted features - * \param cascade If the decendants of the feature should be deleted as well + * \param context The chain of features who will be deleted for feedback and to avoid endless recursions * * \returns TRUE in case of success and FALSE otherwise */ @@ -1832,7 +1832,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * Deletes a feature from the layer (but does not commit it). * \param fid The feature id to delete - * \param cascade If the decendants of the feature should be deleted as well + * \param context The chain of features who will be deleted for feedback and to avoid endless recursions * * \note Calls to deleteFeature() are only valid for layers in which edits have been enabled * by a call to startEditing(). Changes made to features using this method are not committed @@ -1844,7 +1844,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * Deletes a set of features from the layer (but does not commit it) * \param fids The feature ids to delete - * \param cascade If the decendants of the feature should be deleted as well + * \param context The chain of features who will be deleted for feedback and to avoid endless recursions * * \returns FALSE if the layer is not in edit mode or does not support deleting * in case of an active transaction depends on the provider implementation diff --git a/src/core/qgsvectorlayerjoinbuffer.h b/src/core/qgsvectorlayerjoinbuffer.h index f1a58dfd597..a6ca61142d7 100644 --- a/src/core/qgsvectorlayerjoinbuffer.h +++ b/src/core/qgsvectorlayerjoinbuffer.h @@ -197,6 +197,7 @@ class CORE_EXPORT QgsVectorLayerJoinBuffer : public QObject, public QgsFeatureSi * parameter is the one coming from the target layer. * * \param fid The feature id from the target layer to delete + * \param context The chain of features who will be deleted for feedback and to avoid endless recursions * * \returns FALSE if an error happened, TRUE otherwise * @@ -209,6 +210,7 @@ class CORE_EXPORT QgsVectorLayerJoinBuffer : public QObject, public QgsFeatureSi * in a parameter are those coming from the target layer. * * \param fids Feature ids from the target layer to delete + * \param context The chain of features who will be deleted for feedback and to avoid endless recursions * * \returns FALSE if an error happened, TRUE otherwise *