Skip to content
Permalink
Browse files

Make expression functions that use internal requests more stable

  • Loading branch information
m-kuhn committed Aug 2, 2018
1 parent 14643ad commit 5252bf195489a633f617459480bf707259628592
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/expression/qgsexpressionfunction.cpp
@@ -3569,6 +3569,8 @@ static QVariant fcnGetFeatureById( const QVariantList &values, const QgsExpressi

QgsFeatureRequest req;
req.setFilterFid( fid );
req.setConnectionTimeout( 10000 );
req.setFreeConnectionsRequirement( 1 );
QgsFeatureIterator fIt = vl->getFeatures( req );

QgsFeature fet;
@@ -3609,6 +3611,8 @@ static QVariant fcnGetFeature( const QVariantList &values, const QgsExpressionCo
req.setFilterExpression( QStringLiteral( "%1=%2" ).arg( QgsExpression::quotedColumnRef( attribute ),
QgsExpression::quotedString( attVal.toString() ) ) );
req.setLimit( 1 );
req.setConnectionTimeout( 10000 );
req.setFreeConnectionsRequirement( 1 );
if ( !parent->needsGeometry() )
{
req.setFlags( QgsFeatureRequest::NoGeometry );

0 comments on commit 5252bf1

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