Skip to content

Commit a92d1a6

Browse files
committedNov 30, 2014
QgsExpression: some const fixes
1 parent 5a883c0 commit a92d1a6

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
 

‎python/core/qgsexpression.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ class QgsExpression
2424
* all attributes from the layer are required for evaluation of the expression.
2525
* QgsFeatureRequest::setSubsetOfAttributes automatically handles this case.
2626
*/
27-
QStringList referencedColumns();
27+
QStringList referencedColumns() const;
2828

2929
//! Returns true if the expression uses feature geometry for some computation
30-
bool needsGeometry();
30+
bool needsGeometry() const;
3131

3232
// evaluation
3333

‎src/core/qgsexpression.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,7 +1891,7 @@ QgsExpression::~QgsExpression()
18911891
delete mRootNode;
18921892
}
18931893

1894-
QStringList QgsExpression::referencedColumns()
1894+
QStringList QgsExpression::referencedColumns() const
18951895
{
18961896
if ( !mRootNode )
18971897
return QStringList();
@@ -1915,7 +1915,7 @@ QStringList QgsExpression::referencedColumns()
19151915
return columns;
19161916
}
19171917

1918-
bool QgsExpression::needsGeometry()
1918+
bool QgsExpression::needsGeometry() const
19191919
{
19201920
if ( !mRootNode )
19211921
return false;

‎src/core/qgsexpression.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,16 @@ class CORE_EXPORT QgsExpression
103103
//! Get the expression ready for evaluation - find out column indexes.
104104
bool prepare( const QgsFields &fields );
105105

106-
/**Get list of columns referenced by the expression.
106+
/**
107+
* Get list of columns referenced by the expression.
107108
* @note if the returned list contains the QgsFeatureRequest::AllAttributes constant then
108109
* all attributes from the layer are required for evaluation of the expression.
109110
* QgsFeatureRequest::setSubsetOfAttributes automatically handles this case.
110111
*/
111-
QStringList referencedColumns();
112+
QStringList referencedColumns() const;
112113

113114
//! Returns true if the expression uses feature geometry for some computation
114-
bool needsGeometry();
115+
bool needsGeometry() const;
115116

116117
// evaluation
117118

0 commit comments

Comments
 (0)
Please sign in to comment.