Skip to content
Permalink
Browse files

Make QgsVectorDataProvider defaults methods more efficient

(cherry-picked from a10b8fc)
  • Loading branch information
nyalldawson committed Aug 29, 2016
1 parent e304c4d commit 923bd5aa37463bd7976d68008bb6c8d74daba9f2
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsvectordataprovider.cpp
@@ -367,7 +367,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();
@@ -422,7 +422,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 ) )
{

0 comments on commit 923bd5a

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