diff --git a/python/gui/auto_generated/qgsmaptoolcapture.sip.in b/python/gui/auto_generated/qgsmaptoolcapture.sip.in index 62396fe57d7..c2d9899e5de 100644 --- a/python/gui/auto_generated/qgsmaptoolcapture.sip.in +++ b/python/gui/auto_generated/qgsmaptoolcapture.sip.in @@ -346,14 +346,14 @@ geometryCaptured is called just before .. versionadded:: 3.24 %End - virtual void lineCaptured( QgsCurve *line ); + virtual void lineCaptured( const QgsCurve *line ); %Docstring Called when a line is captured geometryCaptured is called just before .. versionadded:: 3.24 %End - virtual void polygonCaptured( QgsCurvePolygon *polygon ); + virtual void polygonCaptured( const QgsCurvePolygon *polygon ); %Docstring Called when a polygon is captured geometryCaptured is called just before diff --git a/src/app/qgsmaptooladdpart.cpp b/src/app/qgsmaptooladdpart.cpp index b3ae7a955f9..2f1372e73db 100644 --- a/src/app/qgsmaptooladdpart.cpp +++ b/src/app/qgsmaptooladdpart.cpp @@ -86,7 +86,7 @@ void QgsMapToolAddPart::pointCaptured( const QgsPoint &point ) finalizeEditCommand( layer, errorCode ); } -void QgsMapToolAddPart::lineCaptured( QgsCurve *line ) +void QgsMapToolAddPart::lineCaptured( const QgsCurve *line ) { QgsVectorLayer *layer = getLayerAndCheckSelection(); if ( !layer ) @@ -96,7 +96,7 @@ void QgsMapToolAddPart::lineCaptured( QgsCurve *line ) finalizeEditCommand( layer, errorCode ); } -void QgsMapToolAddPart::polygonCaptured( QgsCurvePolygon *polygon ) +void QgsMapToolAddPart::polygonCaptured( const QgsCurvePolygon *polygon ) { QgsVectorLayer *layer = getLayerAndCheckSelection(); if ( !layer ) diff --git a/src/app/qgsmaptooladdpart.h b/src/app/qgsmaptooladdpart.h index 31de9bb9a32..b2175069d97 100644 --- a/src/app/qgsmaptooladdpart.h +++ b/src/app/qgsmaptooladdpart.h @@ -42,8 +42,8 @@ class APP_EXPORT QgsMapToolAddPart : public QgsMapToolCapture QgsVectorLayer *getLayerAndCheckSelection(); void pointCaptured( const QgsPoint &point ) override; - void lineCaptured( QgsCurve *line ) override; - void polygonCaptured( QgsCurvePolygon *polygon ) override; + void lineCaptured( const QgsCurve *line ) override; + void polygonCaptured( const QgsCurvePolygon *polygon ) override; void finalizeEditCommand( QgsVectorLayer *layer, Qgis::GeometryOperationResult errorCode ); }; diff --git a/src/gui/qgsmaptoolcapture.h b/src/gui/qgsmaptoolcapture.h index 0c85756bf0d..46f3eb31c10 100644 --- a/src/gui/qgsmaptoolcapture.h +++ b/src/gui/qgsmaptoolcapture.h @@ -357,14 +357,14 @@ class GUI_EXPORT QgsMapToolCapture : public QgsMapToolAdvancedDigitizing * geometryCaptured is called just before * \since QGIS 3.24 */ - virtual void lineCaptured( QgsCurve *line ) {Q_UNUSED( line )} SIP_FORCE + virtual void lineCaptured( const QgsCurve *line ) {Q_UNUSED( line )} SIP_FORCE /** * Called when a polygon is captured * geometryCaptured is called just before * \since QGIS 3.24 */ - virtual void polygonCaptured( QgsCurvePolygon *polygon ) {Q_UNUSED( polygon )} SIP_FORCE + virtual void polygonCaptured( const QgsCurvePolygon *polygon ) {Q_UNUSED( polygon )} SIP_FORCE //! whether tracing has been requested by the user bool tracingEnabled();