Skip to content
Permalink
Browse files

more constness

  • Loading branch information
3nids committed May 30, 2017
1 parent 0f26431 commit 8ce847f9b42e82b84849a4b9f73bb31106e75f5c
@@ -196,7 +196,7 @@ class QgsPropertyTransformer
:rtype: Type
%End

virtual QgsPropertyTransformer *clone() = 0 /Factory/;
virtual QgsPropertyTransformer *clone() const = 0 /Factory/;
%Docstring
Returns a clone of the transformer.
:rtype: QgsPropertyTransformer
@@ -345,7 +345,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer
%End

virtual Type transformerType() const;
virtual QgsGenericNumericTransformer *clone() /Factory/;
virtual QgsGenericNumericTransformer *clone() const /Factory/;
virtual QVariant toVariant() const;
virtual bool loadVariant( const QVariant &definition );
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
@@ -481,7 +481,7 @@ class QgsSizeScaleTransformer : QgsPropertyTransformer
%End

virtual Type transformerType() const;
virtual QgsSizeScaleTransformer *clone() /Factory/;
virtual QgsSizeScaleTransformer *clone() const /Factory/;
virtual QVariant toVariant() const;
virtual bool loadVariant( const QVariant &definition );
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
@@ -621,7 +621,7 @@ Copy constructor


virtual Type transformerType() const;
virtual QgsColorRampTransformer *clone() /Factory/;
virtual QgsColorRampTransformer *clone() const /Factory/;
virtual QVariant toVariant() const;
virtual bool loadVariant( const QVariant &definition );
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const;
@@ -154,7 +154,7 @@ QgsGenericNumericTransformer &QgsGenericNumericTransformer::operator=( const Qgs
return *this;
}

QgsGenericNumericTransformer *QgsGenericNumericTransformer::clone()
QgsGenericNumericTransformer *QgsGenericNumericTransformer::clone() const
{
std::unique_ptr< QgsGenericNumericTransformer > t( new QgsGenericNumericTransformer( mMinValue,
mMaxValue,
@@ -346,7 +346,7 @@ QgsSizeScaleTransformer &QgsSizeScaleTransformer::operator=( const QgsSizeScaleT
return *this;
}

QgsSizeScaleTransformer *QgsSizeScaleTransformer::clone()
QgsSizeScaleTransformer *QgsSizeScaleTransformer::clone() const
{
std::unique_ptr< QgsSizeScaleTransformer > t( new QgsSizeScaleTransformer( mType,
mMinValue,
@@ -587,7 +587,7 @@ QgsColorRampTransformer &QgsColorRampTransformer::operator=( const QgsColorRampT
return *this;
}

QgsColorRampTransformer *QgsColorRampTransformer::clone()
QgsColorRampTransformer *QgsColorRampTransformer::clone() const
{
std::unique_ptr< QgsColorRampTransformer > c( new QgsColorRampTransformer( mMinValue, mMaxValue,
mGradientRamp ? mGradientRamp->clone() : nullptr,
@@ -222,7 +222,7 @@ class CORE_EXPORT QgsPropertyTransformer
/**
* Returns a clone of the transformer.
*/
virtual QgsPropertyTransformer *clone() = 0 SIP_FACTORY;
virtual QgsPropertyTransformer *clone() const = 0 SIP_FACTORY;

/**
* Loads this transformer from a QVariantMap, wrapped in a QVariant.
@@ -367,7 +367,7 @@ class CORE_EXPORT QgsGenericNumericTransformer : public QgsPropertyTransformer
QgsGenericNumericTransformer &operator=( const QgsGenericNumericTransformer &other );

virtual Type transformerType() const override { return GenericNumericTransformer; }
virtual QgsGenericNumericTransformer *clone() override SIP_FACTORY;
virtual QgsGenericNumericTransformer *clone() const override SIP_FACTORY;
virtual QVariant toVariant() const override;
virtual bool loadVariant( const QVariant &definition ) override;
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const override;
@@ -503,7 +503,7 @@ class CORE_EXPORT QgsSizeScaleTransformer : public QgsPropertyTransformer
QgsSizeScaleTransformer &operator=( const QgsSizeScaleTransformer &other );

virtual Type transformerType() const override { return SizeScaleTransformer; }
virtual QgsSizeScaleTransformer *clone() SIP_FACTORY override;
virtual QgsSizeScaleTransformer *clone() const override SIP_FACTORY;
virtual QVariant toVariant() const override;
virtual bool loadVariant( const QVariant &definition ) override;
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const override;
@@ -640,7 +640,7 @@ class CORE_EXPORT QgsColorRampTransformer : public QgsPropertyTransformer
QgsColorRampTransformer &operator=( const QgsColorRampTransformer &other );

virtual Type transformerType() const override { return ColorRampTransformer; }
virtual QgsColorRampTransformer *clone() SIP_FACTORY override;
virtual QgsColorRampTransformer *clone() const override SIP_FACTORY;
virtual QVariant toVariant() const override;
virtual bool loadVariant( const QVariant &definition ) override;
virtual QVariant transform( const QgsExpressionContext &context, const QVariant &value ) const override;
@@ -44,7 +44,7 @@ class TestTransformer : public QgsPropertyTransformer
}

virtual Type transformerType() const override { return SizeScaleTransformer; }
virtual TestTransformer *clone() override
virtual TestTransformer *clone() const override
{
return new TestTransformer( mMinValue, mMaxValue );
}

0 comments on commit 8ce847f

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