Fix docstrings

This commit is contained in:
Matthias Kuhn 2017-05-02 19:43:29 +02:00
parent 48b55a71d3
commit c30d7b98d7
2 changed files with 10 additions and 3 deletions

View File

@ -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 )
@ -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 );

View File

@ -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;
}