Skip to content

Commit

Permalink
Pass context by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 21, 2024
1 parent 7ce4bb5 commit 646c318
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/core/expression/qgsexpressionutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,9 @@ QString QgsExpressionUtils::getFilePathValue( const QVariant &value, const QgsEx

///@endcond

std::tuple<QMetaType::Type, int> QgsExpressionUtils::determineResultType( const QString &expression, const QgsVectorLayer *layer, const QgsFeatureRequest &r, QgsExpressionContext context, bool *foundFeatures )
std::tuple<QMetaType::Type, int> QgsExpressionUtils::determineResultType( const QString &expression, const QgsVectorLayer *layer, const QgsFeatureRequest &r, const QgsExpressionContext &c, bool *foundFeatures )
{
QgsExpressionContext context = c;
QgsFeatureRequest request = r;
QgsExpression exp( expression );
request.setFlags( ( exp.needsGeometry() ) ?
Expand Down
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class CORE_EXPORT QgsExpressionUtils
* \param foundFeatures An optional boolean parameter that will be set when features are found.
* \since QGIS 3.22
*/
static std::tuple<QMetaType::Type, int> determineResultType( const QString &expression, const QgsVectorLayer *layer, const QgsFeatureRequest &request = QgsFeatureRequest(), QgsExpressionContext context = QgsExpressionContext(), bool *foundFeatures = nullptr );
static std::tuple<QMetaType::Type, int> determineResultType( const QString &expression, const QgsVectorLayer *layer, const QgsFeatureRequest &request = QgsFeatureRequest(), const QgsExpressionContext &context = QgsExpressionContext(), bool *foundFeatures = nullptr );

private:

Expand Down

0 comments on commit 646c318

Please sign in to comment.