Skip to content

Commit

Permalink
Code and doc improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 6, 2018
1 parent b5672d7 commit 569b39b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions python/core/processing/qgsprocessingregistry.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ according to some user configuration.
.. seealso:: :py:func:`algorithmById`
%End

void addParameterType( QgsProcessingParameterType *type );
void addParameterType( QgsProcessingParameterType *type /Transfer/ );
%Docstring
Register a new parameter type for processing.
Will emit parameterTypeAdded
Ownership is transferred to the registry.
Will emit parameterTypeAdded.

.. seealso:: :py:func:`removeParameterType`

Expand All @@ -120,7 +121,8 @@ Will emit parameterTypeAdded
void removeParameterType( QgsProcessingParameterType *type );
%Docstring
Unregister a custom parameter type from processing.
Will emit parameterTypeRemoved
The type will be deleted.
Will emit parameterTypeRemoved.

.. seealso:: :py:func:`addParameterType`

Expand Down
10 changes: 6 additions & 4 deletions src/core/processing/qgsprocessingregistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,19 @@ class CORE_EXPORT QgsProcessingRegistry : public QObject

/**
* Register a new parameter type for processing.
* Will emit parameterTypeAdded
* Ownership is transferred to the registry.
* Will emit parameterTypeAdded.
*
* \see removeParameterType
*
* \since QGIS 3.2
*/
void addParameterType( QgsProcessingParameterType *type );
void addParameterType( QgsProcessingParameterType *type SIP_TRANSFER );

/**
* Unregister a custom parameter type from processing.
* Will emit parameterTypeRemoved
* The type will be deleted.
* Will emit parameterTypeRemoved.
*
* \see addParameterType
*
Expand Down Expand Up @@ -196,7 +198,7 @@ class CORE_EXPORT QgsProcessingRegistry : public QObject
QMap<QString, QgsProcessingProvider *> mProviders;

//! Hash of available parameter types by id. This object owns the pointers.
QHash<QString, QgsProcessingParameterType *> mParameterTypes;
QMap<QString, QgsProcessingParameterType *> mParameterTypes;

#ifdef SIP_RUN
QgsProcessingRegistry( const QgsProcessingRegistry &other );
Expand Down

0 comments on commit 569b39b

Please sign in to comment.