Skip to content
Permalink
Browse files

mispelling doc and explicit geometry name

  • Loading branch information
luipir committed Sep 26, 2017
1 parent bbfa048 commit f2762164a85ca2bd9ada2630711c93059f9dc113
@@ -151,10 +151,10 @@ class QgsVectorLayerEditBuffer : QObject

/** Apply geom modification basing on provider geometry type.
* Geom is modified only if successful convertion is possibile.
* In case of convertion a message is notified in the log
* @param geom pointer to the geometry that is adapted to provider
* In case of conversion a message is sent to the log.
* @param geometry pointer to the geometry that should be adapted to provider
* @return bool true if success
* @note added in QGIS 2.18
*/
bool adaptGeometry( QgsGeometry* geom );
bool adaptGeometry( QgsGeometry* geometry );
};
@@ -180,7 +180,7 @@ bool QgsVectorLayerEditBuffer::deleteFeatures( const QgsFeatureIds& fids )
return true;
}

bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geom )
bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geometry )
{
/* this routine was introduced to fi the following issue:
* https://issues.qgis.org/issues/15741
@@ -190,21 +190,21 @@ bool QgsVectorLayerEditBuffer::adaptGeometry( QgsGeometry* geom )
* https://issues.qgis.org/issues/15741
*/
QgsVectorDataProvider* provider = L->dataProvider();
if ( geom && geom->geometry() &&
!geom->isEmpty() &&
geom->wkbType() != provider->geometryType() )
if ( geometry && geometry->geometry() &&
!geometry->isEmpty() &&
geometry->wkbType() != provider->geometryType() )
{
// check if provider do strict geometry control
// otherwise leave to the commit to rise provider errors
if ( provider->doesStrictFeatureTypeCheck() )
{
QgsGeometry* newGeom = provider->convertToProviderType( geom );
QgsGeometry* newGeom = provider->convertToProviderType( geometry );
if ( !newGeom )
{
QgsMessageLog::logMessage( tr( "ERROR: geometry type is not compatible with the layer.", "not compatible geometry" ) );
return false;
}
geom = newGeom;
geometry = newGeom;
}
}
return true;
@@ -180,12 +180,12 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject

/** Apply geom modification basing on provider geometry type.
* Geom is modified only if successful convertion is possibile.
* In case of convertion a message is notified in the log
* @param geom pointer to the geometry that is adapted to provider
* In case of conversion a message is sent to the log.
* @param geometry pointer to the geometry that should be adapted to provider
* @return bool true if success
* @note added in QGIS 2.18
*/
bool adaptGeometry( QgsGeometry* geom );
bool adaptGeometry( QgsGeometry* geometry );

protected:
QgsVectorLayer* L;

0 comments on commit f276216

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