Skip to content
Permalink
Browse files

Not using reference for QgsFeatureIds since the given value could may…

…be be changed on recursive delete.

Recursions are usualy not used with compositions, but to be save, this change has been made.
  • Loading branch information
signedav committed May 7, 2020
1 parent 73b1b2d commit aa8224716c79a37ce2957aae099ea1de931da87d
Showing with 3 additions and 3 deletions.
  1. +1 −1 python/core/auto_generated/qgsvectorlayer.sip.in
  2. +1 −1 src/core/qgsvectorlayer.cpp
  3. +1 −1 src/core/qgsvectorlayer.h
@@ -1971,7 +1971,7 @@ Deletes a feature from the layer (but does not commit it).
changes can be discarded by calling rollBack().
%End

bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = 0 );
bool deleteFeatures( const QgsFeatureIds fids, DeleteContext *context = 0 );
%Docstring
Deletes a set of features from the layer (but does not commit it)

@@ -3240,7 +3240,7 @@ bool QgsVectorLayer::deleteFeature( QgsFeatureId fid, QgsVectorLayer::DeleteCont
return res;
}

bool QgsVectorLayer::deleteFeatures( const QgsFeatureIds &fids, QgsVectorLayer::DeleteContext *context )
bool QgsVectorLayer::deleteFeatures( const QgsFeatureIds fids, QgsVectorLayer::DeleteContext *context )
{
bool res = true;
const auto constFids = fids;
@@ -1854,7 +1854,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* to the underlying data provider until a commitChanges() call is made. Any uncommitted
* changes can be discarded by calling rollBack().
*/
bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = nullptr );
bool deleteFeatures( const QgsFeatureIds fids, DeleteContext *context = nullptr );

/**
* Attempts to commit to the underlying data provider any buffered changes made since the

0 comments on commit aa82247

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