Skip to content

Commit

Permalink
cppcheck-suppress memleak and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vcloarec committed Dec 2, 2020
1 parent 30446ef commit c79123b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/gui/auto_generated/qgsmaptool.sip.in
Expand Up @@ -225,14 +225,14 @@ A pointer to the map mouse ``event`` can be provided to allow particular behavio

This method can return true to inform the caller that the menu was effectivly populated.

The default implementation does nothing and return false;
The default implementation does nothing and returns false.

.. note::

The context menu is only shown when the ShowContextMenu flag
is present in :py:func:`~QgsMapTool.flags`.

.. versionadded:: 3.14
.. versionadded:: 3.18
%End

signals:
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsmaptoolselect.cpp
Expand Up @@ -169,6 +169,8 @@ bool QgsMapToolSelect::populateContextMenuWithEvent( QMenu *menu, QgsMapMouseEve

menuActions->populateMenu( menu );

// cppcheck wrongly believes menuActions will leak
// cppcheck-suppress memleak
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsmaptool.h
Expand Up @@ -226,12 +226,12 @@ class GUI_EXPORT QgsMapTool : public QObject
*
* This method can return true to inform the caller that the menu was effectivly populated.
*
* The default implementation does nothing and return false;
* The default implementation does nothing and returns false.
*
* \note The context menu is only shown when the ShowContextMenu flag
* is present in flags().
*
* \since QGIS 3.14
* \since QGIS 3.18
*/
virtual bool populateContextMenuWithEvent( QMenu *menu, QgsMapMouseEvent *event );

Expand Down

0 comments on commit c79123b

Please sign in to comment.