Skip to content

Commit 107b48a

Browse files
committed
Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the \c directive indicates a code literal value), and for sipify/Python it expands to ``None`` (`` is sphinx annotation for literal values) Makes for nicer dox for both c++ and Python!
1 parent a7ca087 commit 107b48a

File tree

297 files changed

+574
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+574
-573
lines changed

cmake_templates/Doxyfile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ IMAGE_PATH =
898898
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
899899
# properly processed by doxygen.
900900

901-
INPUT_FILTER = "sed -e 's/TRUE/\\c true/' -e 's/FALSE/\\c false/'"
901+
INPUT_FILTER = "sed -e 's/TRUE/\\c true/' -e 's/FALSE/\\c false/'" -e 's/NULLPTR/\\c nullptr/'"
902902

903903
# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
904904
# basis. Doxygen will compare the file name with each pattern and apply the

python/3d/auto_generated/qgsrulebased3drenderer.sip.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Similar to rule-based 2D renderer and rule-based labeling, it allows specificati
7575
public:
7676
Rule( QgsAbstract3DSymbol *symbol /Transfer/, const QString &filterExp = QString(), const QString &description = QString(), bool elseRule = false );
7777
%Docstring
78-
takes ownership of symbol, symbol may be None
78+
takes ownership of symbol, symbol may be ``None``
7979
%End
8080
~Rule();
8181

@@ -89,7 +89,7 @@ takes ownership of symbol, symbol may be None
8989

9090
QgsAbstract3DSymbol *symbol() const;
9191
%Docstring
92-
Returns the labeling settings. May return None.
92+
Returns the labeling settings. May return ``None``.
9393
%End
9494

9595
QString filterExpression() const;
@@ -127,7 +127,7 @@ Unique rule identifier (for identification of rule within labeling, used as prov
127127

128128
void setSymbol( QgsAbstract3DSymbol *symbol /Transfer/ );
129129
%Docstring
130-
Sets new symbol (or None). Deletes old symbol if any.
130+
Sets new symbol (or ``None``). Deletes old symbol if any.
131131
%End
132132

133133
void setFilterExpression( const QString &filterExp );

python/analysis/auto_generated/raster/qgsalignraster.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ Method to be overridden for progress reporting.
137137

138138
void setProgressHandler( ProgressHandler *progressHandler );
139139
%Docstring
140-
Assign a progress handler instance. Does not take ownership. None can be passed.
140+
Assign a progress handler instance. Does not take ownership. ``None`` can be passed.
141141
%End
142142
ProgressHandler *progressHandler() const;
143143
%Docstring
144-
Gets associated progress handler. May be None (default)
144+
Gets associated progress handler. May be ``None`` (default)
145145
%End
146146

147147
void setRasters( const List &list );

python/analysis/auto_generated/vector/geometry_checker/qgsfeaturepool.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Implementations will remove the feature from the layer or from the data provider
6060
QgsVectorLayer *layer() const;
6161
%Docstring
6262
Gets a pointer to the underlying layer.
63-
May return a ``None`` if the layer has been deleted.
63+
May return a ````None```` if the layer has been deleted.
6464
This must only be called from the main thread.
6565
%End
6666

python/core/auto_generated/3d/qgs3drendererregistry.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Returns unique identifier of the 3D renderer class
3333

3434
virtual QgsAbstract3DRenderer *createRenderer( QDomElement &elem, const QgsReadWriteContext &context ) = 0 /Factory/;
3535
%Docstring
36-
Returns new instance of the renderer given the DOM element. Returns None on error.
36+
Returns new instance of the renderer given the DOM element. Returns ``None`` on error.
3737
Pure virtual function: must be implemented in derived classes.
3838
%End
3939

python/core/auto_generated/effects/qgspainteffectregistry.sip.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Create a paint effect of this class given an encoded map of properties.
6868

6969
virtual QgsPaintEffectWidget *createWidget() /Factory/;
7070
%Docstring
71-
Create configuration widget for paint effect of this class. Can return None
71+
Create configuration widget for paint effect of this class. Can return ``None``
7272
if there's no GUI for the paint effect class.
7373

7474
:return: configuration widget
@@ -107,7 +107,7 @@ Returns the metadata for a specific effect.
107107

108108
:param name: unique string name for paint effect class
109109

110-
:return: paint effect metadata if found, otherwise None
110+
:return: paint effect metadata if found, otherwise ``None``
111111
%End
112112

113113
bool addEffectType( QgsPaintEffectAbstractMetadata *metadata /Transfer/ );
@@ -126,7 +126,7 @@ Creates a new paint effect given the effect name and properties map.
126126
:param name: unique name representing paint effect class
127127
:param properties: encoded string map of effect properties
128128

129-
:return: new paint effect of specified class, or None if matching
129+
:return: new paint effect of specified class, or ``None`` if matching
130130
paint effect could not be created
131131
%End
132132

@@ -137,7 +137,7 @@ properties.
137137

138138
:param element: encoded DOM element of effect properties
139139

140-
:return: new paint effect, or None if matching
140+
:return: new paint effect, or ``None`` if matching
141141
paint effect could not be created
142142
%End
143143

python/core/auto_generated/expression/qgsexpression.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,14 @@ Returns calculator used for distance and area calculations
294294
%Docstring
295295
Sets the geometry calculator used for distance and area calculations in expressions.
296296
(used by $length, $area and $perimeter functions only).
297-
If the geometry calculator is set to None (default), prepare() will read variables
297+
If the geometry calculator is set to ``None`` (default), prepare() will read variables
298298
from the expression context ("project_ellipsoid", "_project_transform_context" and
299299
"_layer_crs") to build a geometry calculator.
300300
If these variables does not exist and if setGeomCalculator() is not called,
301301
all distance and area calculations are performed using simple
302302
Cartesian methods (ie no ellipsoidal calculations).
303303

304-
:param calc: geometry calculator. Ownership is not transferred. Set to a None to force
304+
:param calc: geometry calculator. Ownership is not transferred. Set to ``None`` to force
305305
Cartesian calculations.
306306

307307
.. seealso:: :py:func:`geomCalculator`

python/core/auto_generated/expression/qgsexpressioncontextutils.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ with the variables specified.
245245
Creates a new scope which contains variables and functions relating to a :py:class:`QgsLayoutAtlas`.
246246
For instance, current page name and number.
247247

248-
:param atlas: source atlas. If None, a set of default atlas variables will be added to the scope.
248+
:param atlas: source atlas. If ``None``, a set of default atlas variables will be added to the scope.
249249
%End
250250

251251
static QgsExpressionContextScope *layoutItemScope( const QgsLayoutItem *item ) /Factory/;

python/core/auto_generated/geometry/qgsabstractgeometry.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ E.g. :py:class:`QgsLineString` -> :py:class:`QgsCompoundCurve`, :py:class:`QgsPo
465465
Makes a new geometry with all the points or vertices snapped to the closest point of the grid.
466466
Ownership is transferred to the caller.
467467

468-
If the gridified geometry could not be calculated a None will be returned.
468+
If the gridified geometry could not be calculated ``None`` will be returned.
469469
It may generate an invalid geometry (in some corner cases).
470470
It can also be thought as rounding the edges and it may be useful for removing errors.
471471
Example:

python/core/auto_generated/geometry/qgscurve.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Returns an interpolated point on the curve at the specified ``distance``.
203203
If z or m values are present, the output z and m will be interpolated using
204204
the existing vertices' z or m values.
205205

206-
If distance is negative, or is greater than the length of the curve, a None
206+
If distance is negative, or is greater than the length of the curve, ``None``
207207
will be returned.
208208

209209
.. versionadded:: 3.4

python/core/auto_generated/geometry/qgsgeometry.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ Try to convert the geometry to the requested type
14481448
:param destType: the geometry type to be converted to
14491449
:param destMultipart: determines if the output geometry will be multipart or not
14501450

1451-
:return: the converted geometry or None if the conversion fails.
1451+
:return: the converted geometry or ``None`` if the conversion fails.
14521452

14531453
.. versionadded:: 2.2
14541454
%End

python/core/auto_generated/geometry/qgsgeometryengine.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,15 @@ Calculate the symmetric difference of this and ``geom``.
104104
virtual QgsPoint *centroid( QString *errorMsg = 0 ) const = 0 /Factory/;
105105
%Docstring
106106
Calculates the centroid of this.
107-
May return a `None`.
107+
May return a ```None```.
108108

109109
.. versionadded:: 3.0
110110
%End
111111

112112
virtual QgsPoint *pointOnSurface( QString *errorMsg = 0 ) const = 0 /Factory/;
113113
%Docstring
114114
Calculate a point that is guaranteed to be on the surface of this.
115-
May return a `None`.
115+
May return a ```None```.
116116

117117
.. versionadded:: 3.0
118118
%End

python/core/auto_generated/layertree/qgslayertreegroup.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ Find all group layer nodes
136136

137137
static QgsLayerTreeGroup *readXml( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
138138
%Docstring
139-
Read group (tree) from XML element <layer-tree-group> and return the newly created group (or None on error).
139+
Read group (tree) from XML element <layer-tree-group> and return the newly created group (or ``None`` on error).
140140
Does not resolve textual references to layers. Call resolveReferences() afterwards to do it.
141141
%End
142142

143143
static QgsLayerTreeGroup *readXml( QDomElement &element, const QgsProject *project, const QgsReadWriteContext &context ) /Factory/;
144144
%Docstring
145-
Read group (tree) from XML element <layer-tree-group> and return the newly created group (or None on error).
145+
Read group (tree) from XML element <layer-tree-group> and return the newly created group (or ``None`` on error).
146146
Also resolves textual references to layers from the project (calls resolveReferences() internally).
147147

148148
.. versionadded:: 3.0

python/core/auto_generated/layertree/qgslayertreelayer.sip.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Returns the map layer associated with this node.
5151

5252
.. warning::
5353

54-
This can be (and often is!) a None, e.g. in the case of a layer node representing a layer
54+
This can be (and often is!) ``None``, e.g. in the case of a layer node representing a layer
5555
which has not yet been fully loaded into a project, or a layer node representing a layer
56-
with an invalid data source. The returned pointer must ALWAYS be checked to avoid dereferencing a None.
56+
with an invalid data source. The returned pointer must ALWAYS be checked to avoid dereferencing ``None``.
5757

5858
.. seealso:: :py:func:`layerId`
5959
%End

python/core/auto_generated/layertree/qgslayertreemodel.sip.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ whether to allow changes to the layer tree.
4141

4242
explicit QgsLayerTreeModel( QgsLayerTree *rootNode, QObject *parent /TransferThis/ = 0 );
4343
%Docstring
44-
Construct a new tree model with given layer tree (root node must not be None).
44+
Construct a new tree model with given layer tree (root node must not be ``None``).
4545
The root node is not transferred by the model.
4646
%End
4747

@@ -112,7 +112,7 @@ Check whether a flag is enabled
112112
QgsLayerTreeNode *index2node( const QModelIndex &index ) const;
113113
%Docstring
114114
Returns layer tree node for given index. Returns root node for invalid index.
115-
Returns None if index does not refer to a layer tree node (e.g. it is a legend node)
115+
Returns ``None`` if index does not refer to a layer tree node (e.g. it is a legend node)
116116
%End
117117
QModelIndex node2index( QgsLayerTreeNode *node ) const;
118118
%Docstring
@@ -128,7 +128,7 @@ If ``skipInternal`` is ``True``, a node is included in the output list only if n
128128

129129
static QgsLayerTreeModelLegendNode *index2legendNode( const QModelIndex &index );
130130
%Docstring
131-
Returns legend node for given index. Returns None for invalid index
131+
Returns legend node for given index. Returns ``None`` for invalid index
132132

133133
.. versionadded:: 2.6
134134
%End
@@ -186,7 +186,7 @@ and rule key.
186186

187187
QgsLayerTree *rootGroup() const;
188188
%Docstring
189-
Returns pointer to the root node of the layer tree. Always a non None value.
189+
Returns pointer to the root node of the layer tree. Always a non ``None`` value.
190190
%End
191191

192192
void setRootGroup( QgsLayerTree *newRootGroup );
@@ -254,7 +254,7 @@ A scale <= 0 indicates that no scale filtering is being performed.
254254
void setLegendFilterByMap( const QgsMapSettings *settings );
255255
%Docstring
256256
Force only display of legend nodes which are valid for given map settings.
257-
Setting None or invalid map settings will disable the functionality.
257+
Setting ``None`` or invalid map settings will disable the functionality.
258258
Ownership of map settings pointer does not change, a copy is made.
259259

260260
.. versionadded:: 2.6
@@ -264,7 +264,7 @@ Ownership of map settings pointer does not change, a copy is made.
264264
%Docstring
265265
Filter display of legend nodes for given map settings
266266

267-
:param settings: Map settings. Setting a None or invalid settings will disable any filter. Ownership is not changed, a copy is made
267+
:param settings: Map settings. Setting ``None`` or invalid settings will disable any filter. Ownership is not changed, a copy is made
268268
:param useExtent: Whether to use the extent of the map settings as a first spatial filter on legend nodes
269269
:param polygon: If not empty, this polygon will be used instead of the map extent to filter legend nodes
270270
:param useExpressions: Whether to use legend node filter expressions
@@ -274,7 +274,7 @@ Filter display of legend nodes for given map settings
274274

275275
const QgsMapSettings *legendFilterMapSettings() const;
276276
%Docstring
277-
Returns the current map settings used for the current legend filter (or None if none is enabled)
277+
Returns the current map settings used for the current legend filter (or ``None`` if none is enabled)
278278

279279
.. versionadded:: 2.14
280280
%End
@@ -289,7 +289,7 @@ so that legend nodes that use map units can be scaled currectly
289289

290290
void legendMapViewData( double *mapUnitsPerPixel /Out/, int *dpi /Out/, double *scale /Out/ ) const;
291291
%Docstring
292-
Gets hints about map view - to be used in legend nodes. Arguments that are not None will receive values.
292+
Gets hints about map view - to be used in legend nodes. Arguments that are not ``None`` will receive values.
293293
If there are no valid map view data (from previous call to setLegendMapViewData()), returned values are zeros.
294294

295295
.. versionadded:: 2.6

python/core/auto_generated/layertree/qgslayertreemodellegendnode.sip.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ Default implementation does nothing. *
9393
Entry point called from QgsLegendRenderer to do the rendering.
9494
Default implementation calls drawSymbol() and drawSymbolText() methods.
9595

96-
If ctx is None, this is just first stage when preparing layout - without actual rendering.
96+
If ctx is ``None``, this is just first stage when preparing layout - without actual rendering.
9797
%End
9898

9999
virtual QSizeF drawSymbol( const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight ) const;
100100
%Docstring
101101
Draws symbol on the left side of the item
102102

103103
:param settings: Legend layout configuration
104-
:param ctx: Context for rendering - may be None if only doing layout without actual rendering
104+
:param ctx: Context for rendering - may be ``None`` if only doing layout without actual rendering
105105
:param itemHeight: Minimal height of the legend item - used for correct positioning when rendering
106106

107107
:return: Real size of the symbol (may be bigger than "normal" symbol size from settings)
@@ -112,7 +112,7 @@ Draws symbol on the left side of the item
112112
Draws label on the right side of the item
113113

114114
:param settings: Legend layout configuration
115-
:param ctx: Context for rendering - may be nullptrnullptr if only doing layout without actual rendering
115+
:param ctx: Context for rendering - may be ``None`` if only doing layout without actual rendering
116116
:param symbolSize: Real size of the associated symbol - used for correct positioning when rendering
117117

118118
:return: Size of the label (may span multiple lines)

python/core/auto_generated/layertree/qgslayertreenode.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Find out about type of the node. It is usually shorter to use convenience functi
8989
%End
9090
QgsLayerTreeNode *parent();
9191
%Docstring
92-
Gets pointer to the parent. If parent is None, the node is a root node
92+
Gets pointer to the parent. If parent is ``None``, the node is a root node
9393
%End
9494
QList<QgsLayerTreeNode *> children();
9595
%Docstring

python/core/auto_generated/layout/qgsabstractreportsection.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ section.
143143

144144
virtual QgsLayout *nextBody( bool &ok /Out/ );
145145
%Docstring
146-
Returns the next body layout to export, or a None if
146+
Returns the next body layout to export, or ``None`` if
147147
no body layout is required this iteration.
148148

149149
``ok`` will be set to ``False`` if no bodies remain for this section.

python/core/auto_generated/layout/qgslayout.sip.in

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Calling this method removes all items and pages from the layout.
7878
QgsProject *project() const;
7979
%Docstring
8080
The project associated with the layout. Used to get access to layers, map themes,
81-
relations and various other bits. It is never None.
81+
relations and various other bits. It is never ``None``.
8282
%End
8383

8484
QgsLayoutModel *itemsModel();
@@ -177,7 +177,7 @@ which deferred z-order updates.
177177

178178
QgsLayoutItem *itemByUuid( const QString &uuid, bool includeTemplateUuids = false ) const;
179179
%Docstring
180-
Returns the layout item with matching ``uuid`` unique identifier, or a None
180+
Returns the layout item with matching ``uuid`` unique identifier, or ``None``
181181
if a matching item could not be found.
182182

183183
If ``includeTemplateUuids`` is ``True``, then item's template UUID
@@ -196,7 +196,7 @@ Note that template UUIDs are only available while a layout is being restored fro
196196

197197
QgsLayoutItem *itemByTemplateUuid( const QString &uuid ) const;
198198
%Docstring
199-
Returns the layout item with matching template ``uuid`` unique identifier, or a None
199+
Returns the layout item with matching template ``uuid`` unique identifier, or ``None``
200200
if a matching item could not be found. Unlike itemByUuid(), this method ONLY checks
201201
template UUIDs for a match.
202202

@@ -224,7 +224,7 @@ item found.
224224

225225
QgsLayoutMultiFrame *multiFrameByUuid( const QString &uuid, bool includeTemplateUuids = false ) const;
226226
%Docstring
227-
Returns the layout multiframe with matching ``uuid`` unique identifier, or a None
227+
Returns the layout multiframe with matching ``uuid`` unique identifier, or ``None``
228228
if a matching multiframe could not be found.
229229

230230
If ``includeTemplateUuids`` is ``True``, then the multiframe's :py:func:`QgsLayoutMultiFrame.templateUuid()`
@@ -438,7 +438,7 @@ Returns list of keys stored in custom properties for the layout.
438438
%Docstring
439439
Returns the map item which will be used to generate corresponding world files when the
440440
layout is exported. If no map was explicitly set via setReferenceMap(), the largest
441-
map in the layout will be returned (or None if there are no maps in the layout).
441+
map in the layout will be returned (or ``None`` if there are no maps in the layout).
442442

443443
.. seealso:: :py:func:`setReferenceMap`
444444
%End
@@ -587,7 +587,7 @@ and it's associated objects.
587587
QgsLayoutItemGroup *groupItems( const QList<QgsLayoutItem *> &items );
588588
%Docstring
589589
Creates a new group from a list of layout ``items`` and adds the group to the layout.
590-
If grouping was not possible, a None will be returned.
590+
If grouping was not possible, ``None`` will be returned.
591591

592592
.. seealso:: :py:func:`ungroupItems`
593593
%End
@@ -637,7 +637,7 @@ Emitted whenever the expression variables stored in the layout have been changed
637637
void selectedItemChanged( QgsLayoutItem *selected );
638638
%Docstring
639639
Emitted whenever the selected item changes.
640-
If None, no item is selected.
640+
If ``None``, no item is selected.
641641
%End
642642

643643
void refreshed();

python/core/auto_generated/layout/qgslayoutexporter.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ an export.
326326
%Docstring
327327
Georeferences a ``file`` (image of PDF) exported from the layout.
328328

329-
The ``referenceMap`` argument specifies a map item to use for georeferencing. If left as None, the
329+
The ``referenceMap`` argument specifies a map item to use for georeferencing. If left as ``None``, the
330330
default layout QgsLayout.referenceMap() will be used.
331331

332332
The ``exportRegion`` argument can be set to a valid rectangle to indicate that only part of the layout was

0 commit comments

Comments
 (0)