Skip to content

Commit abc4cf5

Browse files
committed
Slight improvements to Python docs
(cherry picked from commit 4b0f6b7)
1 parent 33987fa commit abc4cf5

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

python/core/auto_generated/qgsmimedatautils.sip.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,23 @@ Returns encoded representation of the object
4242

4343
QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const;
4444
%Docstring
45-
Gets vector layer from uri if possible, otherwise returns 0 and error is set
45+
Gets vector layer from uri if possible, otherwise returns None and error is set
4646

4747
:param owner: set to true if caller becomes owner
4848
:param error: set to error message if cannot get vector
4949
%End
5050

5151
QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const;
5252
%Docstring
53-
Gets raster layer from uri if possible, otherwise returns 0 and error is set
53+
Gets raster layer from uri if possible, otherwise returns None and error is set
5454

5555
:param owner: set to true if caller becomes owner
5656
:param error: set to error message if cannot get raster
5757
%End
5858

5959
QgsMeshLayer *meshLayer( bool &owner, QString &error ) const;
6060
%Docstring
61-
Gets mesh layer from uri if possible, otherwise returns 0 and error is set
61+
Gets mesh layer from uri if possible, otherwise returns None and error is set
6262

6363
:param owner: set to true if caller becomes owner
6464
:param error: set to error message if cannot get raster

python/gui/auto_generated/qgsrubberband.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ In contrast to addGeometry(), this method does also change the geometry type of
225225

226226
:param geom: the geometry object
227227
:param layer: the layer containing the feature, used for coord transformation to map
228-
crs. In case of 0 pointer, the coordinates are not going to be transformed.
228+
crs. If ``layer`` is None, the coordinates are not going to be transformed.
229229
%End
230230

231231
void setToGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );
@@ -256,7 +256,7 @@ setToGeometry() is also to be preferred for backwards-compatibility.
256256

257257
:param geometry: the geometry object. Will be treated as a collection of vertices.
258258
:param layer: the layer containing the feature, used for coord transformation to map
259-
crs. In case of 0 pointer, the coordinates are not going to be transformed.
259+
crs. If ``layer`` is None, the coordinates are not going to be transformed.
260260
%End
261261

262262
void addGeometry( const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem() );

python/gui/auto_generated/qgsvariableeditorwidget.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ be modified by users.
6868
%Docstring
6969
Returns the current editable scope for the widget.
7070

71-
:return: editable scope, or 0 if no editable scope is set
71+
:return: editable scope, or None if no editable scope is set
7272

7373
.. seealso:: :py:func:`setEditableScopeIndex`
7474
%End

src/core/qgsmimedatautils.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ class CORE_EXPORT QgsMimeDataUtils
5252
QString data() const;
5353

5454
/**
55-
* Gets vector layer from uri if possible, otherwise returns 0 and error is set
55+
* Gets vector layer from uri if possible, otherwise returns nullptr and error is set
5656
* \param owner set to true if caller becomes owner
5757
* \param error set to error message if cannot get vector
5858
*/
5959
QgsVectorLayer *vectorLayer( bool &owner, QString &error ) const;
6060

6161
/**
62-
* Gets raster layer from uri if possible, otherwise returns 0 and error is set
62+
* Gets raster layer from uri if possible, otherwise returns nullptr and error is set
6363
* \param owner set to true if caller becomes owner
6464
* \param error set to error message if cannot get raster
6565
*/
6666
QgsRasterLayer *rasterLayer( bool &owner, QString &error ) const;
6767

6868
/**
69-
* Gets mesh layer from uri if possible, otherwise returns 0 and error is set
69+
* Gets mesh layer from uri if possible, otherwise returns nullptr and error is set
7070
* \param owner set to true if caller becomes owner
7171
* \param error set to error message if cannot get raster
7272
*/

src/gui/qgsrubberband.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
256256
* In contrast to addGeometry(), this method does also change the geometry type of the rubberband.
257257
* \param geom the geometry object
258258
* \param layer the layer containing the feature, used for coord transformation to map
259-
* crs. In case of 0 pointer, the coordinates are not going to be transformed.
259+
* crs. If \a layer is nullptr, the coordinates are not going to be transformed.
260260
*/
261261
void setToGeometry( const QgsGeometry &geom, QgsVectorLayer *layer );
262262

@@ -286,7 +286,7 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
286286
*
287287
* \param geometry the geometry object. Will be treated as a collection of vertices.
288288
* \param layer the layer containing the feature, used for coord transformation to map
289-
* crs. In case of 0 pointer, the coordinates are not going to be transformed.
289+
* crs. If \a layer is nullptr, the coordinates are not going to be transformed.
290290
*/
291291
void addGeometry( const QgsGeometry &geometry, QgsVectorLayer *layer );
292292

src/gui/qgsvariableeditorwidget.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class GUI_EXPORT QgsVariableEditorWidget : public QWidget
8282

8383
/**
8484
* Returns the current editable scope for the widget.
85-
* \returns editable scope, or 0 if no editable scope is set
85+
* \returns editable scope, or nullptr if no editable scope is set
8686
* \see setEditableScopeIndex()
8787
*/
8888
QgsExpressionContextScope *editableScope() const;

0 commit comments

Comments
 (0)