From c54e202449c0fc1c329c504dfe4ed3aefe722240 Mon Sep 17 00:00:00 2001 From: Luigi Pirelli Date: Tue, 26 Sep 2017 11:43:59 +0200 Subject: [PATCH] more explicit documentation --- python/core/qgsvectordataprovider.sip | 7 +++++++ python/core/qgsvectorlayereditbuffer.sip | 5 +++-- src/core/qgsvectordataprovider.h | 7 +++++++ src/core/qgsvectorlayereditbuffer.h | 3 ++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/python/core/qgsvectordataprovider.sip b/python/core/qgsvectordataprovider.sip index 34b18d92cc61..72c997170675 100644 --- a/python/core/qgsvectordataprovider.sip +++ b/python/core/qgsvectordataprovider.sip @@ -391,6 +391,13 @@ class QgsVectorDataProvider : QgsDataProvider void pushError( const QString& msg ); /** Converts the geometry to the provider type if possible / necessary + * this is the list of possibile modifications: + * - convert compoundcurve to circularstring + * (possible if compoundcurve consists of one circular string) + * - convert to multitype if necessary + * - convert to curved type if necessary + * - convert to linear type from curved type + * - Add or Remove z/m types @return the converted geometry or nullptr if no conversion was necessary or possible*/ QgsGeometry* convertToProviderType( const QgsGeometry* geom ) const /Factory/; }; diff --git a/python/core/qgsvectorlayereditbuffer.sip b/python/core/qgsvectorlayereditbuffer.sip index 4d681ef1b5d5..a982a90036ca 100644 --- a/python/core/qgsvectorlayereditbuffer.sip +++ b/python/core/qgsvectorlayereditbuffer.sip @@ -150,8 +150,9 @@ class QgsVectorLayerEditBuffer : QObject void updateLayerFields(); /** Apply geometry modification basing on provider geometry type. - * Geometry is modified or only if successful conversion is possible. - * In case of conversion a message is sent to the log. + * Geometry is modified only if successful conversion is possible. + * adaptGeometry calls QgsVectorDataProvider::convertToProviderType() + * if necessary and that apply the modifications. * @param geometry pointer to the geometry that should be adapted to provider * @return bool true if success. * True: Input geometry is changed because conversion is applied or diff --git a/src/core/qgsvectordataprovider.h b/src/core/qgsvectordataprovider.h index fbe8bbeb0eff..978212b60029 100644 --- a/src/core/qgsvectordataprovider.h +++ b/src/core/qgsvectordataprovider.h @@ -469,6 +469,13 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider QgsAttrPalIndexNameHash mAttrPalIndexName; /** Converts the geometry to the provider type if possible / necessary + * this is the list of possibile modifications: + * - convert compoundcurve to circularstring + * (possible if compoundcurve consists of one circular string) + * - convert to multitype if necessary + * - convert to curved type if necessary + * - convert to linear type from curved type + * - Add or Remove z/m types @return the converted geometry or nullptr if no conversion was necessary or possible*/ QgsGeometry* convertToProviderType( const QgsGeometry* geom ) const; diff --git a/src/core/qgsvectorlayereditbuffer.h b/src/core/qgsvectorlayereditbuffer.h index 29113d7a0132..eb82482283b8 100644 --- a/src/core/qgsvectorlayereditbuffer.h +++ b/src/core/qgsvectorlayereditbuffer.h @@ -180,7 +180,8 @@ class CORE_EXPORT QgsVectorLayerEditBuffer : public QObject /** Apply geometry modification basing on provider geometry type. * Geometry is modified only if successful conversion is possible. - * In case of conversion a message is sent to the log. + * adaptGeometry calls QgsVectorDataProvider::convertToProviderType() + * if necessary and that apply the modifications. * @param geometry pointer to the geometry that should be adapted to provider * @return bool true if success. * True: Input geometry is changed because conversion is applied or