From 6bf3ee0f3086cc4164c2a608ac4dc815b62a6cf1 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Fri, 20 Sep 2024 09:40:43 +0200 Subject: [PATCH] const correction --- python/PyQt6/gui/auto_generated/qgsmapcanvas.sip.in | 2 +- python/gui/auto_generated/qgsmapcanvas.sip.in | 2 +- src/gui/qgsmapcanvas.cpp | 2 +- src/gui/qgsmapcanvas.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/PyQt6/gui/auto_generated/qgsmapcanvas.sip.in b/python/PyQt6/gui/auto_generated/qgsmapcanvas.sip.in index c72a34e80d61..78230d28bf60 100644 --- a/python/PyQt6/gui/auto_generated/qgsmapcanvas.sip.in +++ b/python/PyQt6/gui/auto_generated/qgsmapcanvas.sip.in @@ -388,7 +388,7 @@ that this map tool won't be used any more. You don't have to call it manually, :py:class:`QgsMapTool` takes care of it. %End - QgsMapTool *mapTool(); + QgsMapTool *mapTool() const; %Docstring Returns the currently active tool %End diff --git a/python/gui/auto_generated/qgsmapcanvas.sip.in b/python/gui/auto_generated/qgsmapcanvas.sip.in index c72a34e80d61..78230d28bf60 100644 --- a/python/gui/auto_generated/qgsmapcanvas.sip.in +++ b/python/gui/auto_generated/qgsmapcanvas.sip.in @@ -388,7 +388,7 @@ that this map tool won't be used any more. You don't have to call it manually, :py:class:`QgsMapTool` takes care of it. %End - QgsMapTool *mapTool(); + QgsMapTool *mapTool() const; %Docstring Returns the currently active tool %End diff --git a/src/gui/qgsmapcanvas.cpp b/src/gui/qgsmapcanvas.cpp index 8824adcfba77..0ff553e2576e 100644 --- a/src/gui/qgsmapcanvas.cpp +++ b/src/gui/qgsmapcanvas.cpp @@ -3076,7 +3076,7 @@ void QgsMapCanvas::projectThemesChanged() } -QgsMapTool *QgsMapCanvas::mapTool() +QgsMapTool *QgsMapCanvas::mapTool() const { return mMapTool; } diff --git a/src/gui/qgsmapcanvas.h b/src/gui/qgsmapcanvas.h index 8225ff022161..2f74be999dc8 100644 --- a/src/gui/qgsmapcanvas.h +++ b/src/gui/qgsmapcanvas.h @@ -442,7 +442,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsExpressionContex void unsetMapTool( QgsMapTool *mapTool ); //! Returns the currently active tool - QgsMapTool *mapTool(); + QgsMapTool *mapTool() const; /** * Sets the \a project linked to this canvas.