Skip to content

Commit 75fa28f

Browse files
committed
Followup 363336, fixing adding features to OGR data providers
(addFeature cannot be called directly - it must be called by addFeatures to ensure the various edition setup code is called)
1 parent dc7198a commit 75fa28f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ OGRGeometryH QgsOgrProvider::ConvertGeometryIfNecessary( OGRGeometryH hGeom )
12261226
return OGR_G_ForceTo( hGeom, layerGeomType, nullptr );
12271227
}
12281228

1229-
bool QgsOgrProvider::addFeature( QgsFeature &f )
1229+
bool QgsOgrProvider::addFeaturePrivate( QgsFeature &f )
12301230
{
12311231
bool returnValue = true;
12321232
OGRFeatureDefnH fdef = OGR_L_GetLayerDefn( ogrLayer );
@@ -1386,7 +1386,7 @@ bool QgsOgrProvider::addFeatures( QgsFeatureList &flist )
13861386
bool returnvalue = true;
13871387
for ( QgsFeatureList::iterator it = flist.begin(); it != flist.end(); ++it )
13881388
{
1389-
if ( !addFeature( *it ) )
1389+
if ( !addFeaturePrivate( *it ) )
13901390
{
13911391
returnvalue = false;
13921392
}

src/providers/ogr/qgsogrprovider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ class QgsOgrProvider : public QgsVectorDataProvider
225225

226226
mutable QStringList mSubLayerList;
227227

228-
bool addFeature( QgsFeature &f ) override;
228+
bool addFeaturePrivate( QgsFeature &f );
229229
//! Deletes one feature
230230
bool deleteFeature( QgsFeatureId id );
231231

0 commit comments

Comments
 (0)