From 4b0f6b756c61e02e60322ac30658cadb6cbe5c31 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 4 Feb 2019 08:18:37 +1000 Subject: [PATCH] Slight improvements to Python docs --- python/core/auto_generated/qgsmimedatautils.sip.in | 6 +++--- python/gui/auto_generated/qgsrubberband.sip.in | 4 ++-- python/gui/auto_generated/qgsvariableeditorwidget.sip.in | 2 +- src/core/qgsmimedatautils.h | 6 +++--- src/gui/qgsrubberband.h | 4 ++-- src/gui/qgsvariableeditorwidget.h | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/python/core/auto_generated/qgsmimedatautils.sip.in b/python/core/auto_generated/qgsmimedatautils.sip.in index 97da7184d44..8ac5917b5a7 100644 --- a/python/core/auto_generated/qgsmimedatautils.sip.in +++ b/python/core/auto_generated/qgsmimedatautils.sip.in @@ -42,7 +42,7 @@ Returns encoded representation of the object QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const; %Docstring -Gets vector layer from uri if possible, otherwise returns 0 and error is set +Gets vector layer from uri if possible, otherwise returns None and error is set :param owner: set to true if caller becomes owner :param error: set to error message if cannot get vector @@ -50,7 +50,7 @@ Gets vector layer from uri if possible, otherwise returns 0 and error is set QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const; %Docstring -Gets raster layer from uri if possible, otherwise returns 0 and error is set +Gets raster layer from uri if possible, otherwise returns None and error is set :param owner: set to true if caller becomes owner :param error: set to error message if cannot get raster @@ -58,7 +58,7 @@ Gets raster layer from uri if possible, otherwise returns 0 and error is set QgsMeshLayer *meshLayer( bool &owner, QString &error ) const; %Docstring -Gets mesh layer from uri if possible, otherwise returns 0 and error is set +Gets mesh layer from uri if possible, otherwise returns None and error is set :param owner: set to true if caller becomes owner :param error: set to error message if cannot get raster diff --git a/python/gui/auto_generated/qgsrubberband.sip.in b/python/gui/auto_generated/qgsrubberband.sip.in index def7c60ecaa..364a52c1ba7 100644 --- a/python/gui/auto_generated/qgsrubberband.sip.in +++ b/python/gui/auto_generated/qgsrubberband.sip.in @@ -225,7 +225,7 @@ In contrast to addGeometry(), this method does also change the geometry type of :param geom: the geometry object :param layer: the layer containing the feature, used for coord transformation to map - crs. In case of 0 pointer, the coordinates are not going to be transformed. + crs. If ``layer`` is None, the coordinates are not going to be transformed. %End void setToGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() ); @@ -256,7 +256,7 @@ setToGeometry() is also to be preferred for backwards-compatibility. :param geometry: the geometry object. Will be treated as a collection of vertices. :param layer: the layer containing the feature, used for coord transformation to map - crs. In case of 0 pointer, the coordinates are not going to be transformed. + crs. If ``layer`` is None, the coordinates are not going to be transformed. %End void addGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() ); diff --git a/python/gui/auto_generated/qgsvariableeditorwidget.sip.in b/python/gui/auto_generated/qgsvariableeditorwidget.sip.in index 07a85b2a378..0cfa06aa5af 100644 --- a/python/gui/auto_generated/qgsvariableeditorwidget.sip.in +++ b/python/gui/auto_generated/qgsvariableeditorwidget.sip.in @@ -68,7 +68,7 @@ be modified by users. %Docstring Returns the current editable scope for the widget. -:return: editable scope, or 0 if no editable scope is set +:return: editable scope, or None if no editable scope is set .. seealso:: :py:func:`setEditableScopeIndex` %End diff --git a/src/core/qgsmimedatautils.h b/src/core/qgsmimedatautils.h index bbf061b6fa0..9f5a67b5311 100644 --- a/src/core/qgsmimedatautils.h +++ b/src/core/qgsmimedatautils.h @@ -52,21 +52,21 @@ class CORE_EXPORT QgsMimeDataUtils QString data() const; /** - * Gets vector layer from uri if possible, otherwise returns 0 and error is set + * Gets vector layer from uri if possible, otherwise returns nullptr and error is set * \param owner set to true if caller becomes owner * \param error set to error message if cannot get vector */ QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const; /** - * Gets raster layer from uri if possible, otherwise returns 0 and error is set + * Gets raster layer from uri if possible, otherwise returns nullptr and error is set * \param owner set to true if caller becomes owner * \param error set to error message if cannot get raster */ QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const; /** - * Gets mesh layer from uri if possible, otherwise returns 0 and error is set + * Gets mesh layer from uri if possible, otherwise returns nullptr and error is set * \param owner set to true if caller becomes owner * \param error set to error message if cannot get raster */ diff --git a/src/gui/qgsrubberband.h b/src/gui/qgsrubberband.h index 8695805c139..3608e6b11a0 100644 --- a/src/gui/qgsrubberband.h +++ b/src/gui/qgsrubberband.h @@ -256,7 +256,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem * In contrast to addGeometry(), this method does also change the geometry type of the rubberband. * \param geom the geometry object * \param layer the layer containing the feature, used for coord transformation to map - * crs. In case of 0 pointer, the coordinates are not going to be transformed. + * crs. If \a layer is nullptr, the coordinates are not going to be transformed. */ void setToGeometry( const QgsGeometry &geom, QgsVectorLayer *layer ); @@ -286,7 +286,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem * * \param geometry the geometry object. Will be treated as a collection of vertices. * \param layer the layer containing the feature, used for coord transformation to map - * crs. In case of 0 pointer, the coordinates are not going to be transformed. + * crs. If \a layer is nullptr, the coordinates are not going to be transformed. */ void addGeometry( const QgsGeometry &geometry, QgsVectorLayer *layer ); diff --git a/src/gui/qgsvariableeditorwidget.h b/src/gui/qgsvariableeditorwidget.h index 3c5b2e52098..86841c0d3e1 100644 --- a/src/gui/qgsvariableeditorwidget.h +++ b/src/gui/qgsvariableeditorwidget.h @@ -82,7 +82,7 @@ class GUI_EXPORT QgsVariableEditorWidget : public QWidget /** * Returns the current editable scope for the widget. - * \returns editable scope, or 0 if no editable scope is set + * \returns editable scope, or nullptr if no editable scope is set * \see setEditableScopeIndex() */ QgsExpressionContextScope *editableScope() const;