Skip to content

Commit

Permalink
Nullptr consistency in dox
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 26, 2019
1 parent d60b5e2 commit a7ca087
Show file tree
Hide file tree
Showing 148 changed files with 322 additions and 310 deletions.
4 changes: 2 additions & 2 deletions python/3d/auto_generated/qgsrulebased3drenderer.sip.in
Expand Up @@ -89,7 +89,7 @@ takes ownership of symbol, symbol may be None

QgsAbstract3DSymbol *symbol() const;
%Docstring
Gets the labeling settings. May return a null pointer.
Returns the labeling settings. May return None.
%End

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

void setSymbol( QgsAbstract3DSymbol *symbol /Transfer/ );
%Docstring
Sets new symbol (or NULL). Deletes old symbol if any.
Sets new symbol (or None). Deletes old symbol if any.
%End

void setFilterExpression( const QString &filterExp );
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/3d/qgs3drendererregistry.sip.in
Expand Up @@ -33,7 +33,7 @@ Returns unique identifier of the 3D renderer class

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

Expand Down
Expand Up @@ -245,7 +245,7 @@ with the variables specified.
Creates a new scope which contains variables and functions relating to a :py:class:`QgsLayoutAtlas`.
For instance, current page name and number.

:param atlas: source atlas. If null, a set of default atlas variables will be added to the scope.
:param atlas: source atlas. If None, a set of default atlas variables will be added to the scope.
%End

static QgsExpressionContextScope *layoutItemScope( const QgsLayoutItem *item ) /Factory/;
Expand Down
4 changes: 2 additions & 2 deletions python/core/auto_generated/layertree/qgslayertreegroup.sip.in
Expand Up @@ -136,13 +136,13 @@ Find all group layer nodes

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

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

.. versionadded:: 3.0
Expand Down
16 changes: 8 additions & 8 deletions python/core/auto_generated/layertree/qgslayertreemodel.sip.in
Expand Up @@ -41,7 +41,7 @@ whether to allow changes to the layer tree.

explicit QgsLayerTreeModel( QgsLayerTree *rootNode, QObject *parent /TransferThis/ = 0 );
%Docstring
Construct a new tree model with given layer tree (root node must not be null pointer).
Construct a new tree model with given layer tree (root node must not be None).
The root node is not transferred by the model.
%End

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

static QgsLayerTreeModelLegendNode *index2legendNode( const QModelIndex &index );
%Docstring
Returns legend node for given index. Returns null for invalid index
Returns legend node for given index. Returns None for invalid index

.. versionadded:: 2.6
%End
Expand Down Expand Up @@ -186,7 +186,7 @@ and rule key.

QgsLayerTree *rootGroup() const;
%Docstring
Returns pointer to the root node of the layer tree. Always a non-null pointer.
Returns pointer to the root node of the layer tree. Always a non None value.
%End

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

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

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

const QgsMapSettings *legendFilterMapSettings() const;
%Docstring
Returns the current map settings used for the current legend filter (or null if none is enabled)
Returns the current map settings used for the current legend filter (or None if none is enabled)

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

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

.. versionadded:: 2.6
Expand Down
Expand Up @@ -93,15 +93,15 @@ Default implementation does nothing. *
Entry point called from QgsLegendRenderer to do the rendering.
Default implementation calls drawSymbol() and drawSymbolText() methods.

If ctx is null, this is just first stage when preparing layout - without actual rendering.
If ctx is None, this is just first stage when preparing layout - without actual rendering.
%End

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

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

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

:param settings: Legend layout configuration
:param ctx: Context for rendering - may be null if only doing layout without actual rendering
:param ctx: Context for rendering - may be nullptrnullptr if only doing layout without actual rendering
:param symbolSize: Real size of the associated symbol - used for correct positioning when rendering

:return: Size of the label (may span multiple lines)
Expand Down
Expand Up @@ -89,7 +89,7 @@ Find out about type of the node. It is usually shorter to use convenience functi
%End
QgsLayerTreeNode *parent();
%Docstring
Gets pointer to the parent. If parent is a null pointer, the node is a root node
Gets pointer to the parent. If parent is None, the node is a root node
%End
QList<QgsLayerTreeNode *> children();
%Docstring
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/layout/qgslayout.sip.in
Expand Up @@ -78,7 +78,7 @@ Calling this method removes all items and pages from the layout.
QgsProject *project() const;
%Docstring
The project associated with the layout. Used to get access to layers, map themes,
relations and various other bits. It is never null.
relations and various other bits. It is never None.
%End

QgsLayoutModel *itemsModel();
Expand Down
Expand Up @@ -82,7 +82,7 @@ Sets the layout's name.
virtual QgsProject *layoutProject() const = 0;
%Docstring
The project associated with the layout. Used to get access to layers, map themes,
relations and various other bits. It is never null.
relations and various other bits. It is never None.
%End

virtual QDomElement writeLayoutXml( QDomDocument &document, const QgsReadWriteContext &context ) const = 0;
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsapplication.sip.in
Expand Up @@ -717,7 +717,7 @@ Returns the application's authentication manager instance

.. note::

this can be a null pointer if called before initQgis
this can be None if called before initQgis

.. seealso:: :py:func:`initQgis`

Expand Down
8 changes: 4 additions & 4 deletions python/core/auto_generated/qgsdatadefinedsizelegend.sip.in
Expand Up @@ -76,11 +76,11 @@ Returns marker symbol that will be used to draw markers in legend

void setSizeScaleTransformer( QgsSizeScaleTransformer *transformer /Transfer/ );
%Docstring
Sets transformer for scaling of symbol sizes. Takes ownership of the object. Accepts null pointer to set no transformer.
Sets transformer for scaling of symbol sizes. Takes ownership of the object. Accepts None to set no transformer.
%End
QgsSizeScaleTransformer *sizeScaleTransformer() const;
%Docstring
Returns transformer for scaling of symbol sizes. Returns null if no transformer is defined.
Returns transformer for scaling of symbol sizes. Returns None if no transformer is defined.
%End

void setClasses( const QList< QgsDataDefinedSizeLegend::SizeClass > &classes );
Expand Down Expand Up @@ -151,7 +151,7 @@ Generates legend symbol items according to the configuration
void drawCollapsedLegend( QgsRenderContext &context, QSize *outputSize /Out/ = 0, int *labelXOffset /Out/ = 0 ) const;
%Docstring
Draw the legend if using LegendOneNodeForAll and optionally output size of the legend and x offset of labels (in painter units).
If the painter in context is null, it only does size calculation without actual rendering.
If the painter in context is None, it only does size calculation without actual rendering.
Does nothing if legend is not configured as collapsed.
%End

Expand All @@ -162,7 +162,7 @@ Returns output image that would be shown in the legend. Returns invalid image if

static QgsDataDefinedSizeLegend *readXml( const QDomElement &elem, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates instance from given element and returns it (caller takes ownership). Returns null on error.
Creates instance from given element and returns it (caller takes ownership). Returns None on error.
%End

void writeXml( QDomElement &elem, const QgsReadWriteContext &context ) const;
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsdataitem.sip.in
Expand Up @@ -115,7 +115,7 @@ Removes a child item and returns it without deleting it. Emits relevant signals

:param child: child to remove

:return: pointer to the removed item or null if no such item was found
:return: pointer to the removed item or None if no such item was found
%End

virtual bool equal( const QgsDataItem *other );
Expand Down
6 changes: 3 additions & 3 deletions python/core/auto_generated/qgsdataitemprovider.sip.in
Expand Up @@ -19,7 +19,7 @@ This is the interface for those who want to add custom data items to the browser

The method createDataItem() is ever called only if capabilities() return non-zero value.
There are two occasions when createDataItem() is called:
1. to create root items (passed path is empty, parent item is null).
1. to create root items (passed path is empty, parent item is None).
2. to create items in directory structure. For this capabilities have to return at least
of the following: QgsDataProvider.Dir or QgsDataProvider.File. Passed path is the file
or directory being inspected, parent item is a valid QgsDirectoryItem
Expand All @@ -45,13 +45,13 @@ Returns combination of flags from QgsDataProvider.DataCapabilities

virtual QgsDataItem *createDataItem( const QString &path, QgsDataItem *parentItem ) = 0 /Factory/;
%Docstring
Create a new instance of :py:class:`QgsDataItem` (or null) for given path and parent item.
Create a new instance of :py:class:`QgsDataItem` (or None) for given path and parent item.
Caller takes responsibility of deleting created items.
%End

virtual QVector<QgsDataItem *> createDataItems( const QString &path, QgsDataItem *parentItem );
%Docstring
Create a vector of instances of :py:class:`QgsDataItem` (or null) for given path and parent item.
Create a vector of instances of :py:class:`QgsDataItem` (or None) for given path and parent item.
Caller takes responsibility of deleting created items.
%End

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsdiagramrenderer.sip.in
Expand Up @@ -737,7 +737,7 @@ Configures appearance of legend. Takes ownership of the passed settings objects.

QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const;
%Docstring
Returns configuration of appearance of legend. Will return null if no configuration has been set.
Returns configuration of appearance of legend. Will return None if no configuration has been set.

.. versionadded:: 3.0
%End
Expand Down
8 changes: 4 additions & 4 deletions python/core/auto_generated/qgsexpressioncontext.sip.in
Expand Up @@ -263,7 +263,7 @@ Retrieves a function from the scope.

:param name: function name

:return: function, or null if matching function could not be found
:return: function, or None if matching function could not be found

.. seealso:: :py:func:`hasFunction`

Expand Down Expand Up @@ -498,7 +498,7 @@ scope which contains a matching variable.

:param name: variable name

:return: matching scope containing variable, or null if none found
:return: matching scope containing variable, or None if none found
%End


Expand All @@ -508,7 +508,7 @@ Returns the scope at the specified index within the context.

:param index: index of scope

:return: matching scope, or null if none found
:return: matching scope, or None if none found

.. seealso:: :py:func:`lastScope`
%End
Expand Down Expand Up @@ -620,7 +620,7 @@ function set.

:param name: function name

:return: function if contained by the context, otherwise null.
:return: function if contained by the context, otherwise None.

.. seealso:: :py:func:`hasFunction`
%End
Expand Down
8 changes: 4 additions & 4 deletions