Skip to content

Commit

Permalink
Make QgsVectorDataProvider defaults methods more efficient
Browse files Browse the repository at this point in the history
(cherry-picked from a10b8fc)
  • Loading branch information
nyalldawson committed Aug 26, 2016
1 parent 787216a commit 3716478
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/qgsvectordataprovider.cpp
Expand Up @@ -393,7 +393,7 @@ void QgsVectorDataProvider::uniqueValues( int index, QList<QVariant> &values, in
QgsFeature f;
QgsAttributeList keys;
keys.append( index );
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ) );
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ).setFlags( QgsFeatureRequest::NoGeometry ) );

QSet<QString> set;
values.clear();
Expand Down Expand Up @@ -461,7 +461,8 @@ void QgsVectorDataProvider::fillMinMaxCache()

QgsFeature f;
QgsAttributeList keys = mCacheMinValues.keys();
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys ) );
QgsFeatureIterator fi = getFeatures( QgsFeatureRequest().setSubsetOfAttributes( keys )
.setFlags( QgsFeatureRequest::NoGeometry ) );

while ( fi.nextFeature( f ) )
{
Expand Down

0 comments on commit 3716478

Please sign in to comment.