Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 2, 2017
1 parent 48b55a7 commit c30d7b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/core/qgsexpressioncontext.h
Expand Up @@ -126,6 +126,7 @@ class CORE_EXPORT QgsExpressionContextScope
* \param name variable name (should be unique within the QgsExpressionContextScope)
* \param value initial variable value
* \param readOnly true if variable should not be editable by users
* \param isStatic true if the variable will not change during the lifteime of an iterator.
*/
StaticVariable( const QString &name = QString(), const QVariant &value = QVariant(), bool readOnly = false, bool isStatic = false )
: name( name )
Expand Down Expand Up @@ -164,10 +165,10 @@ class CORE_EXPORT QgsExpressionContextScope
*/
QString name() const { return mName; }

/** Convenience method for setting a variable in the context scope by name and value. If a variable
/** Convenience method for setting a variable in the context scope by \a name name and \a value. If a variable
* with the same name is already set then its value is overwritten, otherwise a new variable is added to the scope.
* \param name variable name
* \param value variable value
* If the \a isStatic parameter is set to true, this variable can be cached during the execution
* of QgsExpression::prepare().
* \see addVariable()
*/
void setVariable( const QString &name, const QVariant &value, bool isStatic = false );
Expand Down
6 changes: 6 additions & 0 deletions tests/src/core/testqgsexpressioncontext.cpp
Expand Up @@ -111,8 +111,14 @@ class TestQgsExpressionContext : public QObject
return new ModifiableFunction( mVal );
}

/**
* This function is not static, it's value changes with every invocation.
*/
virtual bool isStatic( const QgsExpression::NodeFunction *node, QgsExpression *parent, const QgsExpressionContext *context ) const override
{
Q_UNUSED( node )
Q_UNUSED( parent )
Q_UNUSED( context )
return false;
}

Expand Down

0 comments on commit c30d7b9

Please sign in to comment.