Skip to content
Permalink
Browse files

Clone should be const

  • Loading branch information
nyalldawson committed Mar 3, 2020
1 parent d8eb0ef commit 873ad5f734319bf83428a857b6c15ec7e7854268
@@ -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;
@@ -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.

@@ -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;
@@ -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;
@@ -52,7 +52,7 @@ QgsProcessingModelChildAlgorithm &QgsProcessingModelChildAlgorithm::operator=( c
return *this;
}

QgsProcessingModelChildAlgorithm *QgsProcessingModelChildAlgorithm::clone()
QgsProcessingModelChildAlgorithm *QgsProcessingModelChildAlgorithm::clone() const
{
return new QgsProcessingModelChildAlgorithm( *this );
}
@@ -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
@@ -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:

@@ -24,7 +24,7 @@ QgsProcessingModelOutput::QgsProcessingModelOutput( const QString &name, const Q
, mName( name )
{}

QgsProcessingModelOutput *QgsProcessingModelOutput::clone()
QgsProcessingModelOutput *QgsProcessingModelOutput::clone() const
{
return new QgsProcessingModelOutput( *this );
}
@@ -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.
@@ -25,7 +25,7 @@ QgsProcessingModelParameter::QgsProcessingModelParameter( const QString &paramet

}

QgsProcessingModelParameter *QgsProcessingModelParameter::clone()
QgsProcessingModelParameter *QgsProcessingModelParameter::clone() const
{
return new QgsProcessingModelParameter( *this );
}
@@ -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

0 comments on commit 873ad5f

Please sign in to comment.
You can’t perform that action at this time.