From e232817e5bd794368f3aff807a06c112a2b974a7 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 25 Mar 2019 11:00:17 -0500 Subject: [PATCH] add missing doc --- python/core/auto_additions/qgsmaplayer.py | 2 +- scripts/sipify.pl | 1 + src/core/qgsmaplayer.h | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python/core/auto_additions/qgsmaplayer.py b/python/core/auto_additions/qgsmaplayer.py index 5ae7bfca732..e4baf5bdda2 100644 --- a/python/core/auto_additions/qgsmaplayer.py +++ b/python/core/auto_additions/qgsmaplayer.py @@ -9,7 +9,7 @@ QgsMapLayer.PluginLayer = QgsMapLayerType.PluginLayer QgsMapLayer.PluginLayer.__doc__ = "" QgsMapLayer.MeshLayer = QgsMapLayerType.MeshLayer QgsMapLayer.MeshLayer.__doc__ = "Added in 3.2" -QgsMapLayerType.__doc__ = 'Types of layers that can be added to a map\n\n' + '* VectorLayer: ' + QgsMapLayerType.VectorLayer.__doc__ + '\n' + '* RasterLayer: ' + QgsMapLayerType.RasterLayer.__doc__ + '\n' + '* PluginLayer: ' + QgsMapLayerType.PluginLayer.__doc__ + '\n' + '* MeshLayer: ' + QgsMapLayerType.MeshLayer.__doc__ +QgsMapLayerType.__doc__ = 'Types of layers that can be added to a map\n\n.. versionadded:: 3.8\n\n' + '* VectorLayer: ' + QgsMapLayerType.VectorLayer.__doc__ + '\n' + '* RasterLayer: ' + QgsMapLayerType.RasterLayer.__doc__ + '\n' + '* PluginLayer: ' + QgsMapLayerType.PluginLayer.__doc__ + '\n' + '* MeshLayer: ' + QgsMapLayerType.MeshLayer.__doc__ # -- QgsMapLayer.LayerFlag.baseClass = QgsMapLayer QgsMapLayer.LayerFlags.baseClass = QgsMapLayer diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 0df70fd73a2..41d8552a1b6 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -1010,6 +1010,7 @@ while ($LINE_IDX < $LINE_COUNT){ } write_output("ENU4", "$LINE\n"); if ($is_scope_based eq "1") { + $COMMENT =~ s/\n/\\n/g; if ( $ACTUAL_CLASS ne "" ){ push @OUTPUT_PYTHON, "$ACTUAL_CLASS.$enum_qualname.__doc__ = '$COMMENT\\n\\n' + " . join(" + '\\n' + ", @enum_members_doc) . "\n# --\n"; } else { diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 14e7db75cbb..0a8638fdade 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -57,7 +57,11 @@ class QPainter; #define QGSCLIPBOARD_MAPLAYER_MIME "application/qgis.maplayer" -//! Types of layers that can be added to a map +/** + * \ingroup core + * Types of layers that can be added to a map + * \since QGIS 3.8 + */ enum class QgsMapLayerType SIP_MONKEYPATCH_SCOPEENUM_UNNEST( QgsMapLayer, LayerType ) : int { VectorLayer,