19 #include <QtConcurrentMap>
23 static void getFeaturesForProvider(
const QPair< QgsVectorDataProvider *, QgsFeatureRequest > &pair )
35 constexpr
int JOBS_TO_RUN = 100;
36 QList< QPair< QgsVectorDataProvider *, QgsFeatureRequest > > jobs;
37 jobs.reserve( JOBS_TO_RUN );
38 for (
int i = 0; i < JOBS_TO_RUN; ++i )
40 jobs.append( qMakePair( provider, request ) );
45 QtConcurrent::blockingMap( jobs, getFeaturesForProvider );
Wrapper for iterator of features from vector data provider or vector layer.
bool nextFeature(QgsFeature &f)
This class wraps a request for features to a vector layer (or directly its vector data provider).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
This is the base class for vector data providers.