Skip to content

Commit

Permalink
Fix build error using cov-build
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 27, 2015
1 parent e94d57e commit 6bf5e91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/core/qgsexpression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,13 @@ QVariant QgsExpression::evaluate( const QgsFeature* f )
return mRootNode->eval( this, &context );
}

QVariant QgsExpression::evaluate( const QgsFeature &f )
{
Q_NOWARN_DEPRECATED_PUSH
return evaluate( &f );
Q_NOWARN_DEPRECATED_POP
}

QVariant QgsExpression::evaluate( const QgsFeature* f, const QgsFields& fields )
{
// first prepare
Expand Down Expand Up @@ -3272,3 +3279,10 @@ bool QgsExpression::Node::prepare( QgsExpression* parent, const QgsExpressionCon
return prepare( parent, f );
Q_NOWARN_DEPRECATED_POP
}

QVariant QgsExpression::StaticFunction::func( const QVariantList &values, const QgsFeature* f, QgsExpression* parent )
{
Q_NOWARN_DEPRECATED_PUSH
return mFnc( values, f, parent );
Q_NOWARN_DEPRECATED_POP
}
11 changes: 3 additions & 8 deletions src/core/qgsexpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class CORE_EXPORT QgsExpression
//! Evaluate the feature and return the result
//! @note prepare() should be called before calling this method
//! @note available in python bindings as evaluatePrepared
Q_DECL_DEPRECATED inline QVariant evaluate( const QgsFeature& f ) { Q_NOWARN_DEPRECATED_PUSH return evaluate( &f ); Q_NOWARN_DEPRECATED_POP }
Q_DECL_DEPRECATED QVariant evaluate( const QgsFeature& f );

//! Evaluate the feature and return the result
//! @note this method does not expect that prepare() has been called on this instance
Expand All @@ -139,7 +139,7 @@ class CORE_EXPORT QgsExpression
//! Evaluate the feature and return the result
//! @note this method does not expect that prepare() has been called on this instance
//! @note not available in python bindings
Q_DECL_DEPRECATED inline QVariant evaluate( const QgsFeature& f, const QgsFields& fields );
Q_DECL_DEPRECATED QVariant evaluate( const QgsFeature& f, const QgsFields& fields );

/** Evaluate the feature and return the result.
* @note this method does not expect that prepare() has been called on this instance
Expand Down Expand Up @@ -458,12 +458,7 @@ class CORE_EXPORT QgsExpression
, mContextFnc( fcn )
, mAliases( aliases )
{}
Q_DECL_DEPRECATED virtual QVariant func( const QVariantList& values, const QgsFeature* f, QgsExpression* parent ) override
{
Q_NOWARN_DEPRECATED_PUSH
return mFnc( values, f, parent );
Q_NOWARN_DEPRECATED_POP
}
Q_DECL_DEPRECATED virtual QVariant func( const QVariantList& values, const QgsFeature* f, QgsExpression* parent ) override;

/** Returns result of evaluating the function.
* @param values list of values passed to the function
Expand Down

0 comments on commit 6bf5e91

Please sign in to comment.