Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nyalldawson committed May 3, 2017
1 parent dc7198a commit 75fa28f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1226,7 +1226,7 @@ OGRGeometryH QgsOgrProvider::ConvertGeometryIfNecessary( OGRGeometryH hGeom )
return OGR_G_ForceTo( hGeom, layerGeomType, nullptr );
}

bool QgsOgrProvider::addFeature( QgsFeature &f )
bool QgsOgrProvider::addFeaturePrivate( QgsFeature &f )
{
bool returnValue = true;
OGRFeatureDefnH fdef = OGR_L_GetLayerDefn( ogrLayer );
Expand Down Expand Up @@ -1386,7 +1386,7 @@ bool QgsOgrProvider::addFeatures( QgsFeatureList &flist )
bool returnvalue = true;
for ( QgsFeatureList::iterator it = flist.begin(); it != flist.end(); ++it )
{
if ( !addFeature( *it ) )
if ( !addFeaturePrivate( *it ) )
{
returnvalue = false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.h
Expand Up @@ -225,7 +225,7 @@ class QgsOgrProvider : public QgsVectorDataProvider

mutable QStringList mSubLayerList;

bool addFeature( QgsFeature &f ) override;
bool addFeaturePrivate( QgsFeature &f );
//! Deletes one feature
bool deleteFeature( QgsFeatureId id );

Expand Down

0 comments on commit 75fa28f

Please sign in to comment.