diff --git a/python/core/auto_generated/geometry/qgsgeometry.sip.in b/python/core/auto_generated/geometry/qgsgeometry.sip.in index 7f87553c854..a602f6d25f4 100644 --- a/python/core/auto_generated/geometry/qgsgeometry.sip.in +++ b/python/core/auto_generated/geometry/qgsgeometry.sip.in @@ -133,6 +133,12 @@ Sets the underlying geometry store. Ownership of geometry is transferred. 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` diff --git a/src/core/geometry/qgsgeometry.h b/src/core/geometry/qgsgeometry.h index 787801119bc..919b8103d33 100644 --- a/src/core/geometry/qgsgeometry.h +++ b/src/core/geometry/qgsgeometry.h @@ -196,6 +196,9 @@ 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()