Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Slight improvements to Python docs
  • Loading branch information
nyalldawson committed Feb 4, 2019
1 parent 109fcc0 commit 4b0f6b7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions python/core/auto_generated/qgsmimedatautils.sip.in
Expand Up @@ -42,23 +42,23 @@ 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
%End

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
%End

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
Expand Down
4 changes: 2 additions & 2 deletions python/gui/auto_generated/qgsrubberband.sip.in
Expand Up @@ -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() );
Expand Down Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsvariableeditorwidget.sip.in
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmimedatautils.h
Expand Up @@ -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
*/
Expand Down
4 changes: 2 additions & 2 deletions src/gui/qgsrubberband.h
Expand Up @@ -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 );

Expand Down Expand Up @@ -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 );

Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsvariableeditorwidget.h
Expand Up @@ -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;
Expand Down

0 comments on commit 4b0f6b7

Please sign in to comment.