Skip to content

Commit a10b8fc

Browse files
committedAug 23, 2016
Make QgsVectorDataProvider defaults methods more efficient
1 parent 5ac34ce commit a10b8fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/core/qgsvectordataprovider.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ void QgsVectorDataProvider::uniqueValues( int index, QList<QVariant> &values, in
390390
QgsFeature f;
391391
QgsAttributeList keys;
392392
keys.append( index );
393-
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ) );
393+
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ).setFlags( QgsFeatureRequest::NoGeometry ) );
394394

395395
QSet<QString> set;
396396
values.clear();
@@ -458,7 +458,8 @@ void QgsVectorDataProvider::fillMinMaxCache() const
458458

459459
QgsFeature f;
460460
QgsAttributeList keys = mCacheMinValues.keys();
461-
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ) );
461+
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys )
462+
.setFlags( QgsFeatureRequest::NoGeometry ) );
462463

463464
while ( fi.nextFeature( f ) )
464465
{

0 commit comments

Comments
 (0)
Please sign in to comment.