Skip to content
Permalink
Browse files

use QgsFeatureRequest::setNoAttributes (#8332)

  • Loading branch information
3nids committed Oct 25, 2018
1 parent bf5537e commit 6fc36dcd1afe9c032596b581b2174ebf017f4957
Showing with 86 additions and 86 deletions.
  1. +4 −4 src/3d/symbols/qgspoint3dsymbol_p.cpp
  2. +1 −1 src/analysis/network/qgsvectorlayerdirector.cpp
  3. +1 −1 src/analysis/processing/qgsalgorithmdbscanclustering.cpp
  4. +3 −3 src/analysis/processing/qgsalgorithmextractbylocation.cpp
  5. +1 −1 src/analysis/processing/qgsalgorithmkmeansclustering.cpp
  6. +1 −1 src/analysis/processing/qgsalgorithmlineintersection.cpp
  7. +1 −1 src/analysis/processing/qgsalgorithmsplitwithlines.cpp
  8. +1 −1 src/analysis/processing/qgsalgorithmzonalhistogram.cpp
  9. +5 −5 src/analysis/processing/qgsoverlayutils.cpp
  10. +1 −1 src/analysis/vector/geometry_checker/qgsgeometryfollowboundariescheck.cpp
  11. +1 −1 src/analysis/vector/qgsgeometrysnapper.cpp
  12. +1 −1 src/analysis/vector/qgsgeometrysnappersinglesource.cpp
  13. +1 −1 src/analysis/vector/qgszonalstatistics.cpp
  14. +1 −1 src/app/qgisapp.cpp
  15. +1 −1 src/app/qgsgeometryvalidationservice.cpp
  16. +2 −2 src/app/qgsmaptoolmovefeature.cpp
  17. +2 −2 src/app/qgsmaptoolreshape.cpp
  18. +1 −1 src/app/qgsmaptoolrotatefeature.cpp
  19. +1 −1 src/app/qgsmaptoolselectutils.cpp
  20. +1 −1 src/app/qgsmaptoolshowhidelabels.cpp
  21. +2 −2 src/app/qgsmaptoolsimplify.cpp
  22. +1 −1 src/app/qgsmergeattributesdialog.cpp
  23. +2 −2 src/app/qgsselectbyformdialog.cpp
  24. +3 −3 src/app/vertextool/qgsvertextool.cpp
  25. +1 −1 src/core/geometry/qgsgeometryeditutils.cpp
  26. +2 −2 src/core/providers/memory/qgsmemoryprovider.cpp
  27. +2 −2 src/core/qgsfeaturesource.cpp
  28. +2 −2 src/core/qgsofflineediting.cpp
  29. +1 −1 src/core/qgspointlocator.cpp
  30. +1 −1 src/core/qgsspatialindex.cpp
  31. +1 −1 src/core/qgsspatialindexkdbush_p.h
  32. +1 −1 src/core/qgstracer.cpp
  33. +2 −2 src/core/qgsvectordataprovider.cpp
  34. +1 −1 src/core/qgsvectorfilewriter.cpp
  35. +6 −6 src/core/qgsvectorlayer.cpp
  36. +8 −8 src/core/qgsvectorlayereditutils.cpp
  37. +1 −1 src/core/qgsvectorlayerjoinbuffer.cpp
  38. +1 −1 src/core/qgsvectorlayerrenderer.cpp
  39. +1 −1 src/core/qgsvectorlayerundocommand.cpp
  40. +1 −1 src/core/qgsvectorlayerutils.cpp
  41. +1 −1 src/gui/attributetable/qgsattributetabledelegate.cpp
  42. +1 −1 src/gui/qgsexpressionselectiondialog.cpp
  43. +2 −2 src/gui/qgsmapcanvas.cpp
  44. +2 −2 src/gui/qgsrelationeditorwidget.cpp
  45. +1 −1 src/gui/symbology/qgsrulebasedrendererwidget.cpp
  46. +1 −1 src/plugins/evis/idtool/eviseventidtool.cpp
  47. +6 −6 src/plugins/topology/topolTest.cpp
  48. +1 −1 src/providers/wfs/qgswfsprovider.cpp
@@ -153,7 +153,7 @@ void QgsPoint3DSymbolInstancedEntityFactory::addEntityForSelectedPoints( const Q
QgsFeatureRequest req;
req.setDestinationCrs( map.crs(), map.transformContext() );
req.setFilterFids( layer->selectedFeatureIds() );
req.setSubsetOfAttributes( QgsAttributeList() );
req.setNoAttributes();

// build the entity
QgsPoint3DSymbolInstancedEntityNode *entity = new QgsPoint3DSymbolInstancedEntityNode( map, layer, symbol, req );
@@ -169,7 +169,7 @@ void QgsPoint3DSymbolInstancedEntityFactory::addEntityForNotSelectedPoints( cons
// build the feature request to select features
QgsFeatureRequest req;
req.setDestinationCrs( map.crs(), map.transformContext() );
req.setSubsetOfAttributes( QgsAttributeList() );
req.setNoAttributes();

QgsFeatureIds notSelected = layer->allFeatureIds();
notSelected.subtract( layer->selectedFeatureIds() );
@@ -328,7 +328,7 @@ void QgsPoint3DSymbolModelEntityFactory::addEntitiesForSelectedPoints( const Qgs
{
QgsFeatureRequest req;
req.setDestinationCrs( map.crs(), map.transformContext() );
req.setSubsetOfAttributes( QgsAttributeList() );
req.setNoAttributes();
req.setFilterFids( layer->selectedFeatureIds() );

addMeshEntities( map, layer, req, symbol, parent, true );
@@ -341,7 +341,7 @@ void QgsPoint3DSymbolModelEntityFactory::addEntitiesForNotSelectedPoints( const
// build the feature request to select features
QgsFeatureRequest req;
req.setDestinationCrs( map.crs(), map.transformContext() );
req.setSubsetOfAttributes( QgsAttributeList() );
req.setNoAttributes();
QgsFeatureIds notSelected = layer->allFeatureIds();
notSelected.subtract( layer->selectedFeatureIds() );
req.setFilterFids( notSelected );
@@ -203,7 +203,7 @@ void QgsVectorLayerDirector::makeGraph( QgsGraphBuilderInterface *builder, const
};

// first iteration - get all nodes from network, and snap additional points to network
QgsFeatureIterator fit = mSource->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = mSource->getFeatures( QgsFeatureRequest().setNoAttributes() );
QgsFeature feature;
while ( fit.nextFeature( feature ) )
{
@@ -133,7 +133,7 @@ QVariantMap QgsDbscanClusteringAlgorithm::processAlgorithm( const QVariantMap &p
feedback->pushInfo( QObject::tr( "Analysing clusters" ) );
std::unordered_map< QgsFeatureId, int> idToCluster;
idToCluster.reserve( index.size() );
QgsFeatureIterator features = source->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator features = source->getFeatures( QgsFeatureRequest().setNoAttributes() );
const long featureCount = source->featureCount();

int clusterCount = 0;
@@ -96,7 +96,7 @@ void QgsLocationBasedAlgorithm::process( const QgsProcessingContext &context, Qg
disjointSet = targetSource->allFeatureIds();

QgsFeatureIds foundSet;
QgsFeatureRequest request = QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ).setDestinationCrs( targetSource->sourceCrs(), context.transformContext() );
QgsFeatureRequest request = QgsFeatureRequest().setNoAttributes().setDestinationCrs( targetSource->sourceCrs(), context.transformContext() );
QgsFeatureIterator fIt = intersectSource->getFeatures( request );
double step = intersectSource->featureCount() > 0 ? 100.0 / intersectSource->featureCount() : 1;
int current = 0;
@@ -115,7 +115,7 @@ void QgsLocationBasedAlgorithm::process( const QgsProcessingContext &context, Qg
QgsRectangle bbox = f.geometry().boundingBox();
request = QgsFeatureRequest().setFilterRect( bbox );
if ( onlyRequireTargetIds )
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();

QgsFeatureIterator testFeatureIt = targetSource->getFeatures( request );
QgsFeature testFeature;
@@ -192,7 +192,7 @@ void QgsLocationBasedAlgorithm::process( const QgsProcessingContext &context, Qg
disjointSet = disjointSet.subtract( foundSet );
QgsFeatureRequest disjointReq = QgsFeatureRequest().setFilterFids( disjointSet );
if ( onlyRequireTargetIds )
disjointReq.setSubsetOfAttributes( QgsAttributeList() ).setFlags( QgsFeatureRequest::NoGeometry );
disjointReq.setNoAttributes().setFlags( QgsFeatureRequest::NoGeometry );
QgsFeatureIterator disjointIt = targetSource->getFeatures( disjointReq );
QgsFeature f;
while ( disjointIt.nextFeature( f ) )
@@ -95,7 +95,7 @@ QVariantMap QgsKMeansClusteringAlgorithm::processAlgorithm( const QVariantMap &p
QgsFeature feat;

std::vector< Feature > clusterFeatures;
QgsFeatureIterator features = source->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator features = source->getFeatures( QgsFeatureRequest().setNoAttributes() );
QHash< QgsFeatureId, int > idToObj;
while ( features.nextFeature( feat ) )
{
@@ -144,7 +144,7 @@ QVariantMap QgsLineIntersectionAlgorithm::processAlgorithm( const QVariantMap &p
if ( !sink )
throw QgsProcessingException( invalidSinkError( parameters, QStringLiteral( "OUTPUT" ) ) );

QgsSpatialIndex spatialIndex( sourceB->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ).setDestinationCrs( sourceA->sourceCrs(), context.transformContext() ) ), feedback );
QgsSpatialIndex spatialIndex( sourceB->getFeatures( QgsFeatureRequest().setNoAttributes().setDestinationCrs( sourceA->sourceCrs(), context.transformContext() ) ), feedback );
QgsFeature outFeature;
QgsFeatureIterator features = sourceA->getFeatures( QgsFeatureRequest().setSubsetOfAttributes( fieldsAIndices ) );
double step = sourceA->featureCount() > 0 ? 100.0 / sourceA->featureCount() : 1;
@@ -105,7 +105,7 @@ QVariantMap QgsSplitWithLinesAlgorithm::processAlgorithm( const QVariantMap &par
QgsSpatialIndex spatialIndex;
QMap< QgsFeatureId, QgsGeometry > splitGeoms;
QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
request.setDestinationCrs( source->sourceCrs(), context.transformContext() );

QgsFeatureIterator splitLines = linesSource->getFeatures( request );
@@ -107,7 +107,7 @@ QVariantMap QgsZonalHistogramAlgorithm::processAlgorithm( const QVariantMap &par

// First loop through the zones to build up a list of unique values across all zones to determine sink fields list
QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
if ( zones->sourceCrs() != mCrs )
{
request.setDestinationCrs( mCrs, context.transformContext() );
@@ -77,7 +77,7 @@ static bool sanitizeDifferenceResult( QgsGeometry &geom )
void QgsOverlayUtils::difference( const QgsFeatureSource &sourceA, const QgsFeatureSource &sourceB, QgsFeatureSink &sink, QgsProcessingContext &context, QgsProcessingFeedback *feedback, int &count, int totalCount, QgsOverlayUtils::DifferenceOutput outputAttrs )
{
QgsFeatureRequest requestB;
requestB.setSubsetOfAttributes( QgsAttributeList() );
requestB.setNoAttributes();
if ( outputAttrs != OutputBA )
requestB.setDestinationCrs( sourceA.sourceCrs(), context.transformContext() );
QgsSpatialIndex indexB( sourceB.getFeatures( requestB ), feedback );
@@ -108,7 +108,7 @@ void QgsOverlayUtils::difference( const QgsFeatureSource &sourceA, const QgsFeat

QgsFeatureRequest request;
request.setFilterFids( intersects );
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
if ( outputAttrs != OutputBA )
request.setDestinationCrs( sourceA.sourceCrs(), context.transformContext() );

@@ -180,7 +180,7 @@ void QgsOverlayUtils::intersection( const QgsFeatureSource &sourceA, const QgsFe
int attrCount = fieldIndicesA.count() + fieldIndicesB.count();

QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
request.setDestinationCrs( sourceA.sourceCrs(), context.transformContext() );

QgsFeature outFeat;
@@ -261,14 +261,14 @@ void QgsOverlayUtils::resolveOverlaps( const QgsFeatureSource &source, QgsFeatur
QgsWkbTypes::GeometryType geometryType = QgsWkbTypes::geometryType( QgsWkbTypes::multiType( source.wkbType() ) );

QgsFeatureRequest requestOnlyGeoms;
requestOnlyGeoms.setSubsetOfAttributes( QgsAttributeList() );
requestOnlyGeoms.setNoAttributes();

QgsFeatureRequest requestOnlyAttrs;
requestOnlyAttrs.setFlags( QgsFeatureRequest::NoGeometry );

QgsFeatureRequest requestOnlyIds;
requestOnlyIds.setFlags( QgsFeatureRequest::NoGeometry );
requestOnlyIds.setSubsetOfAttributes( QgsAttributeList() );
requestOnlyIds.setNoAttributes();

// make a set of used feature IDs so that we do not try to reuse them for newly added features
QgsFeature f;
@@ -64,7 +64,7 @@ void QgsGeometryFollowBoundariesCheck::collectErrors( const QMap<QString, QgsFea
searchBounds.grow( mContext->tolerance );
QgsFeatureIds refFeatureIds = mIndex->intersects( searchBounds ).toSet();

QgsFeatureRequest refFeatureRequest = QgsFeatureRequest().setFilterFids( refFeatureIds ).setSubsetOfAttributes( QgsAttributeList() );
QgsFeatureRequest refFeatureRequest = QgsFeatureRequest().setFilterFids( refFeatureIds ).setNoAttributes();
QgsFeatureIterator refFeatureIt = mCheckLayer->getFeatures( refFeatureRequest );

if ( refFeatureIds.isEmpty() )
@@ -485,7 +485,7 @@ QgsGeometry QgsGeometrySnapper::snapGeometry( const QgsGeometry &geometry, doubl
QgsFeatureIds refFeatureIds = mIndex.intersects( searchBounds ).toSet();
mIndexMutex.unlock();

QgsFeatureRequest refFeatureRequest = QgsFeatureRequest().setFilterFids( refFeatureIds ).setSubsetOfAttributes( QgsAttributeList() );
QgsFeatureRequest refFeatureRequest = QgsFeatureRequest().setFilterFids( refFeatureIds ).setNoAttributes();
mReferenceLayerMutex.lock();
QgsFeature refFeature;
QgsFeatureIterator refFeatureIt = mReferenceSource->getFeatures( refFeatureRequest );
@@ -314,7 +314,7 @@ int QgsGeometrySnapperSingleSource::run( const QgsFeatureSource &source, QgsFeat
QgsSpatialIndex index;
QVector<AnchorPoint> pnts;
QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
QgsFeatureIterator fi = source.getFeatures( request );
buildSnapIndex( fi, index, pnts, feedback, count, totalCount );

@@ -209,7 +209,7 @@ int QgsZonalStatistics::calculateStatistics( QgsFeedback *feedback )

//iterate over each polygon
QgsFeatureRequest request;
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
request.setDestinationCrs( mRasterCrs, QgsProject::instance()->transformContext() );
QgsFeatureIterator fi = vectorProvider->getFeatures( request );
QgsFeature f;
@@ -7670,7 +7670,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget *parent, bool checkFea
if ( checkFeaturesVisible )
{
QgsFeature feat;
QgsFeatureIterator it = vlayer->getSelectedFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator it = vlayer->getSelectedFeatures( QgsFeatureRequest().setNoAttributes() );
bool allFeaturesInView = true;
QgsRectangle viewRect = mMapCanvas->mapSettings().mapToLayerCoordinates( vlayer, mMapCanvas->extent() );

@@ -379,7 +379,7 @@ void QgsGeometryValidationService::triggerTopologyChecks( QgsVectorLayer *layer

QMap<QString, QgsFeatureIds> layerIds;

QgsFeatureRequest request = QgsFeatureRequest( affectedFeatureIds ).setSubsetOfAttributes( QgsAttributeList() );
QgsFeatureRequest request = QgsFeatureRequest( affectedFeatureIds ).setNoAttributes();
QgsFeatureIterator it = layer->getFeatures( request );
QgsFeature feature;
QgsRectangle area;
@@ -86,7 +86,7 @@ void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

if ( vlayer->selectedFeatureCount() == 0 )
{
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setNoAttributes() );

//find the closest feature
QgsGeometry pointGeometry = QgsGeometry::fromPointXY( layerCoords );
@@ -131,7 +131,7 @@ void QgsMapToolMoveFeature::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

mRubberBand = createRubberBand( vlayer->geometryType() );
QgsFeature feat;
QgsFeatureIterator it = vlayer->getSelectedFeatures( QgsFeatureRequest().setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator it = vlayer->getSelectedFeatures( QgsFeatureRequest().setNoAttributes() );

bool allFeaturesInView = true;
QgsRectangle viewRect = mCanvas->mapSettings().mapToLayerCoordinates( vlayer, mCanvas->extent() );
@@ -91,7 +91,7 @@ bool QgsMapToolReshape::isBindingLine( QgsVectorLayer *vlayer, const QgsRectangl
const QgsPointXY beginPoint = points().first();
const QgsPointXY endPoint = points().last();

QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( bbox ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( bbox ).setNoAttributes() );
QgsFeature f;

// check that extremities of the new line are contained by features
@@ -126,7 +126,7 @@ void QgsMapToolReshape::reshape( QgsVectorLayer *vlayer )
reshapeLineString.addZValue( defaultZValue() );

//query all the features that intersect bounding box of capture line
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( bbox ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( bbox ).setNoAttributes() );
QgsFeature f;
int reshapeReturn;
bool reshapeDone = false;
@@ -235,7 +235,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )

if ( vlayer->selectedFeatureCount() == 0 )
{
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setNoAttributes() );

//find the closest feature
QgsGeometry pointGeometry = QgsGeometry::fromPointXY( layerCoords );
@@ -243,7 +243,7 @@ QgsFeatureIds QgsMapToolSelectUtils::getMatchingFeatures( QgsMapCanvas *canvas,
if ( r )
request.setSubsetOfAttributes( r->usedAttributes( context ), vlayer->fields() );
else
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();

QgsFeatureIterator fit = vlayer->getFeatures( request );

@@ -218,7 +218,7 @@ bool QgsMapToolShowHideLabels::selectedFeatures( QgsVectorLayer *vlayer,
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest()
.setFilterRect( selectGeomTrans.boundingBox() )
.setFlags( QgsFeatureRequest::NoGeometry | QgsFeatureRequest::ExactIntersect )
.setSubsetOfAttributes( QgsAttributeList() ) );
.setNoAttributes() );

QgsFeature f;
while ( fit.nextFeature( f ) )
@@ -424,7 +424,7 @@ void QgsMapToolSimplify::selectOneFeature( QPoint canvasPoint )
double r = QgsTolerance::vertexSearchRadius( vlayer, mCanvas->mapSettings() );
QgsRectangle selectRect = QgsRectangle( layerCoords.x() - r, layerCoords.y() - r,
layerCoords.x() + r, layerCoords.y() + r );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fit = vlayer->getFeatures( QgsFeatureRequest().setFilterRect( selectRect ).setNoAttributes() );

QgsGeometry geometry = QgsGeometry::fromPointXY( layerCoords );
double minDistance = std::numeric_limits<double>::max();
@@ -459,7 +459,7 @@ void QgsMapToolSimplify::selectFeaturesInRect()
QgsFeatureRequest request;
request.setFilterRect( rect );
request.setFlags( QgsFeatureRequest::ExactIntersect );
request.setSubsetOfAttributes( QgsAttributeList() );
request.setNoAttributes();
QgsFeatureIterator fit = vlayer->getFeatures( request );
while ( fit.nextFeature( f ) )
mSelectedFeatures << f;
@@ -554,7 +554,7 @@ void QgsMergeAttributesDialog::createRubberBandForFeature( QgsFeatureId featureI
mSelectionRubberBand = new QgsRubberBand( mMapCanvas, mVectorLayer->geometryType() );
mSelectionRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
QgsFeature featureToSelect;
mVectorLayer->getFeatures( QgsFeatureRequest().setFilterFid( featureId ).setSubsetOfAttributes( QgsAttributeList() ) ).nextFeature( featureToSelect );
mVectorLayer->getFeatures( QgsFeatureRequest().setFilterFid( featureId ).setNoAttributes() ).nextFeature( featureToSelect );
mSelectionRubberBand->setToGeometry( featureToSelect.geometry(), mVectorLayer );
}

@@ -74,7 +74,7 @@ void QgsSelectByFormDialog::zoomToFeatures( const QString &filter )

QgsFeatureRequest request = QgsFeatureRequest().setFilterExpression( filter )
.setExpressionContext( context )
.setSubsetOfAttributes( QgsAttributeList() );
.setNoAttributes();

QgsFeatureIterator features = mLayer->getFeatures( request );

@@ -122,7 +122,7 @@ void QgsSelectByFormDialog::flashFeatures( const QString &filter )

QgsFeatureRequest request = QgsFeatureRequest().setFilterExpression( filter )
.setExpressionContext( context )
.setSubsetOfAttributes( QgsAttributeList() );
.setNoAttributes();

QgsFeatureIterator features = mLayer->getFeatures( request );
QgsFeature feat;
@@ -485,7 +485,7 @@ void QgsVertexTool::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

QgsRectangle layerRect = toLayerCoordinates( vlayer, map_rect );
QgsFeature f;
QgsFeatureIterator fi = vlayer->getFeatures( QgsFeatureRequest( layerRect ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fi = vlayer->getFeatures( QgsFeatureRequest( layerRect ).setNoAttributes() );
while ( fi.nextFeature( f ) )
{
bool isFeatureSelected = vlayer->selectedFeatureIds().contains( f.id() );
@@ -994,7 +994,7 @@ QgsGeometry QgsVertexTool::cachedGeometry( const QgsVectorLayer *layer, QgsFeatu
if ( !layerCache.contains( fid ) )
{
QgsFeature f;
layer->getFeatures( QgsFeatureRequest( fid ).setSubsetOfAttributes( QgsAttributeList() ) ).nextFeature( f );
layer->getFeatures( QgsFeatureRequest( fid ).setNoAttributes() ).nextFeature( f );
layerCache[fid] = f.geometry();
}

@@ -1488,7 +1488,7 @@ QgsPointXY QgsVertexTool::matchToLayerPoint( const QgsVectorLayer *destLayer, co
if ( match && match->hasVertex() && match->layer() && match->layer()->crs() == destLayer->crs() )
{
QgsFeature f;
QgsFeatureIterator fi = match->layer()->getFeatures( QgsFeatureRequest( match->featureId() ).setSubsetOfAttributes( QgsAttributeList() ) );
QgsFeatureIterator fi = match->layer()->getFeatures( QgsFeatureRequest( match->featureId() ).setNoAttributes() );
if ( fi.nextFeature( f ) )
return f.geometry().vertexAt( match->vertexIndex() );
}
@@ -254,7 +254,7 @@ std::unique_ptr<QgsAbstractGeometry> QgsGeometryEditUtils::avoidIntersections( c

QgsFeatureIterator fi = currentLayer->getFeatures( QgsFeatureRequest( geom.boundingBox() )
.setFlags( QgsFeatureRequest::ExactIntersect )
.setSubsetOfAttributes( QgsAttributeList() ) );
.setNoAttributes() );
QgsFeature f;
while ( fi.nextFeature( f ) )
{

0 comments on commit 6fc36dc

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