Skip to content
Permalink
Browse files

Make QgsVectorDataProvider defaults methods more efficient

  • Loading branch information
nyalldawson committed Aug 23, 2016
1 parent 5ac34ce commit a10b8fc3e5658290dd7e18df1001e543c3a75caa
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/core/qgsvectordataprovider.cpp
@@ -390,7 +390,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();
@@ -458,7 +458,8 @@ void QgsVectorDataProvider::fillMinMaxCache() const

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 a10b8fc

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