Skip to content
Permalink
Browse files

QgsExpression: some const fixes

  • Loading branch information
m-kuhn committed Nov 30, 2014
1 parent 5a883c0 commit a92d1a6e312e352e7cfdcbc3d8858ebd8a3cb075
Showing with 8 additions and 7 deletions.
  1. +2 −2 python/core/qgsexpression.sip
  2. +2 −2 src/core/qgsexpression.cpp
  3. +4 −3 src/core/qgsexpression.h
@@ -24,10 +24,10 @@ class QgsExpression
* all attributes from the layer are required for evaluation of the expression.
* QgsFeatureRequest::setSubsetOfAttributes automatically handles this case.
*/
QStringList referencedColumns();
QStringList referencedColumns() const;

//! Returns true if the expression uses feature geometry for some computation
bool needsGeometry();
bool needsGeometry() const;

// evaluation

@@ -1891,7 +1891,7 @@ QgsExpression::~QgsExpression()
delete mRootNode;
}

QStringList QgsExpression::referencedColumns()
QStringList QgsExpression::referencedColumns() const
{
if ( !mRootNode )
return QStringList();
@@ -1915,7 +1915,7 @@ QStringList QgsExpression::referencedColumns()
return columns;
}

bool QgsExpression::needsGeometry()
bool QgsExpression::needsGeometry() const
{
if ( !mRootNode )
return false;
@@ -103,15 +103,16 @@ class CORE_EXPORT QgsExpression
//! Get the expression ready for evaluation - find out column indexes.
bool prepare( const QgsFields &fields );

/**Get list of columns referenced by the expression.
/**
* Get list of columns referenced by the expression.
* @note if the returned list contains the QgsFeatureRequest::AllAttributes constant then
* all attributes from the layer are required for evaluation of the expression.
* QgsFeatureRequest::setSubsetOfAttributes automatically handles this case.
*/
QStringList referencedColumns();
QStringList referencedColumns() const;

//! Returns true if the expression uses feature geometry for some computation
bool needsGeometry();
bool needsGeometry() const;

// evaluation

0 comments on commit a92d1a6

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