Skip to content

Commit

Permalink
Clone should be const
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 5, 2020
1 parent d8eb0ef commit 873ad5f
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Expand Up @@ -32,7 +32,7 @@ should be set to a QgsProcessingAlgorithm algorithm ID.

QgsProcessingModelChildAlgorithm( const QgsProcessingModelChildAlgorithm &other );

virtual QgsProcessingModelChildAlgorithm *clone() /Factory/;
virtual QgsProcessingModelChildAlgorithm *clone() const /Factory/;


QString childId() const;
Expand Down
Expand Up @@ -86,7 +86,7 @@ in the graphical modeler.
.. seealso:: :py:func:`linksCollapsed`
%End

virtual QgsProcessingModelComponent *clone() = 0 /Factory/;
virtual QgsProcessingModelComponent *clone() const = 0 /Factory/;
%Docstring
Clones the component.

Expand Down
Expand Up @@ -28,7 +28,7 @@ Represents a final output created by the model.
Constructor for QgsProcessingModelOutput with the specified ``name`` and ``description``.
%End

virtual QgsProcessingModelOutput *clone() /Factory/;
virtual QgsProcessingModelOutput *clone() const /Factory/;


QString name() const;
Expand Down
Expand Up @@ -30,7 +30,7 @@ Constructor for QgsProcessingModelParameter. The parameter name should match one
parameters from the parent model.
%End

virtual QgsProcessingModelParameter *clone() /Factory/;
virtual QgsProcessingModelParameter *clone() const /Factory/;


QString parameterName() const;
Expand Down
Expand Up @@ -52,7 +52,7 @@ QgsProcessingModelChildAlgorithm &QgsProcessingModelChildAlgorithm::operator=( c
return *this;
}

QgsProcessingModelChildAlgorithm *QgsProcessingModelChildAlgorithm::clone()
QgsProcessingModelChildAlgorithm *QgsProcessingModelChildAlgorithm::clone() const
{
return new QgsProcessingModelChildAlgorithm( *this );
}
Expand Down
Expand Up @@ -48,7 +48,7 @@ class CORE_EXPORT QgsProcessingModelChildAlgorithm : public QgsProcessingModelCo
QgsProcessingModelChildAlgorithm( const QgsProcessingModelChildAlgorithm &other );
QgsProcessingModelChildAlgorithm &operator=( const QgsProcessingModelChildAlgorithm &other );

QgsProcessingModelChildAlgorithm *clone() override SIP_FACTORY;
QgsProcessingModelChildAlgorithm *clone() const override SIP_FACTORY;

/**
* Returns the child algorithm's unique ID string, used the identify
Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/models/qgsprocessingmodelcomponent.h
Expand Up @@ -92,7 +92,7 @@ class CORE_EXPORT QgsProcessingModelComponent
*
* Ownership is transferred to the caller.
*/
virtual QgsProcessingModelComponent *clone() = 0 SIP_FACTORY;
virtual QgsProcessingModelComponent *clone() const = 0 SIP_FACTORY;

protected:

Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/models/qgsprocessingmodeloutput.cpp
Expand Up @@ -24,7 +24,7 @@ QgsProcessingModelOutput::QgsProcessingModelOutput( const QString &name, const Q
, mName( name )
{}

QgsProcessingModelOutput *QgsProcessingModelOutput::clone()
QgsProcessingModelOutput *QgsProcessingModelOutput::clone() const
{
return new QgsProcessingModelOutput( *this );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/models/qgsprocessingmodeloutput.h
Expand Up @@ -39,7 +39,7 @@ class CORE_EXPORT QgsProcessingModelOutput : public QgsProcessingModelComponent
*/
QgsProcessingModelOutput( const QString &name = QString(), const QString &description = QString() );

QgsProcessingModelOutput *clone() override SIP_FACTORY;
QgsProcessingModelOutput *clone() const override SIP_FACTORY;

/**
* Returns the model output name.
Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/models/qgsprocessingmodelparameter.cpp
Expand Up @@ -25,7 +25,7 @@ QgsProcessingModelParameter::QgsProcessingModelParameter( const QString &paramet

}

QgsProcessingModelParameter *QgsProcessingModelParameter::clone()
QgsProcessingModelParameter *QgsProcessingModelParameter::clone() const
{
return new QgsProcessingModelParameter( *this );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/models/qgsprocessingmodelparameter.h
Expand Up @@ -40,7 +40,7 @@ class CORE_EXPORT QgsProcessingModelParameter : public QgsProcessingModelCompone
*/
QgsProcessingModelParameter( const QString &parameterName = QString() );

QgsProcessingModelParameter *clone() override SIP_FACTORY;
QgsProcessingModelParameter *clone() const override SIP_FACTORY;

/**
* Returns the associated parameter name. The parameter name should match one of the
Expand Down

0 comments on commit 873ad5f

Please sign in to comment.