Skip to content
Permalink
Browse files

Merge pull request #9074 from m-kuhn/til

Deprecate QgsGeometry::set for usage in Python
  • Loading branch information
m-kuhn committed Feb 7, 2019
2 parents 6c1036c + 2400050 commit 32b6599df036b29b1a4faa3992a503a4a12501f9
Showing with 11 additions and 2 deletions.
  1. +7 −1 python/core/auto_generated/geometry/qgsgeometry.sip.in
  2. +4 −1 src/core/geometry/qgsgeometry.h
@@ -125,14 +125,20 @@ and a deep copy. Where possible, use constGet() instead.
.. versionadded:: 3.0
%End

void set( QgsAbstractGeometry *geometry /Transfer/ );
void set( QgsAbstractGeometry *geometry /Transfer/ ) /Deprecated/;
%Docstring
Sets the underlying geometry store. Ownership of geometry is transferred.

.. note::

In QGIS 2.x this method was named setGeometry().

.. note::

This method is deprecated for usage in Python and will be removed from Python bindings with QGIS 4.
Using this method will confuse Python's memory management and type information system.
Better create a new QgsGeometry object instead.

.. seealso:: :py:func:`get`

.. seealso:: :py:func:`constGet`
@@ -196,12 +196,15 @@ class CORE_EXPORT QgsGeometry
* Sets the underlying geometry store. Ownership of geometry is transferred.
*
* \note In QGIS 2.x this method was named setGeometry().
* \note This method is deprecated for usage in Python and will be removed from Python bindings with QGIS 4.
* Using this method will confuse Python's memory management and type information system.
* Better create a new QgsGeometry object instead.
*
* \see get()
* \see constGet()
* \since QGIS 3.0
*/
void set( QgsAbstractGeometry *geometry SIP_TRANSFER );
void set( QgsAbstractGeometry *geometry SIP_TRANSFER ) SIP_DEPRECATED;

/**
* Returns true if the geometry is null (ie, contains no underlying geometry

0 comments on commit 32b6599

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