Skip to content

Commit ee1e738

Browse files
committedMar 13, 2019
Add dox
1 parent 60512e9 commit ee1e738

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed
 

‎python/analysis/auto_generated/vector/geometry_checker/qgsfeaturepool.sip.in

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ Creates a new feature pool for ``layer``.
3333
%End
3434
virtual ~QgsFeaturePool();
3535

36-
bool getFeature( QgsFeatureId id, QgsFeature &feature, QgsFeedback *feedback = 0 );
36+
bool getFeature( QgsFeatureId id, QgsFeature &feature );
3737
%Docstring
3838
Retrieves the feature with the specified ``id`` into ``feature``.
39-
It will be retrieved from the cache or from the underlying layer if unavailable.
40-
If the feature is neither available from the cache nor from the layer it will return ``False``.
41-
If ``feedback`` is specified, the call may return if the feedback is canceled.
39+
It will be retrieved from the cache or from the underlying feature source if unavailable.
40+
If the feature is neither available from the cache nor from the source it will return ``False``.
4241
%End
4342

4443

@@ -80,6 +79,12 @@ The coordinate reference system of this layer.
8079
%End
8180

8281
QString layerName() const;
82+
%Docstring
83+
Returns the name of the layer.
84+
85+
Should be preferred over layer().name() because it can directly be run on
86+
the background thread.
87+
%End
8388

8489
protected:
8590

‎src/analysis/vector/geometry_checker/qgsfeaturepool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QgsFeaturePool::QgsFeaturePool( QgsVectorLayer *layer )
3636

3737
}
3838

39-
bool QgsFeaturePool::getFeature( QgsFeatureId id, QgsFeature &feature, QgsFeedback *feedback )
39+
bool QgsFeaturePool::getFeature( QgsFeatureId id, QgsFeature &feature )
4040
{
4141
// Why is there a write lock acquired here? Weird, we only want to read a feature from the cache, right?
4242
// A method like `QCache::object(const Key &key) const` certainly would not modify its internals.

‎src/analysis/vector/geometry_checker/qgsfeaturepool.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,19 @@ class ANALYSIS_EXPORT QgsFeaturePool : public QgsFeatureSink SIP_ABSTRACT
4747

4848
/**
4949
* Retrieves the feature with the specified \a id into \a feature.
50-
* It will be retrieved from the cache or from the underlying layer if unavailable.
51-
* If the feature is neither available from the cache nor from the layer it will return FALSE.
52-
* If \a feedback is specified, the call may return if the feedback is canceled.
50+
* It will be retrieved from the cache or from the underlying feature source if unavailable.
51+
* If the feature is neither available from the cache nor from the source it will return FALSE.
5352
*/
54-
bool getFeature( QgsFeatureId id, QgsFeature &feature, QgsFeedback *feedback = nullptr );
53+
bool getFeature( QgsFeatureId id, QgsFeature &feature );
5554

5655
/**
5756
* Gets features for the provided \a request. No features will be fetched
5857
* from the cache and the request is sent directly to the underlying feature source.
5958
* Results of the request are cached in the pool and the ids of all the features
60-
* are returned. This can be used to warm the cache for a particular area of interest
59+
* are returned. This is used to warm the cache for a particular area of interest
6160
* (bounding box) or other set of features.
61+
* This will get a new feature source from the source vector layer.
62+
* This needs to be called from the main thread.
6263
* If \a feedback is specified, the call may return if the feedback is canceled.
6364
*/
6465
QgsFeatureIds getFeatures( const QgsFeatureRequest &request, QgsFeedback *feedback = nullptr ) SIP_SKIP;
@@ -124,6 +125,12 @@ class ANALYSIS_EXPORT QgsFeaturePool : public QgsFeatureSink SIP_ABSTRACT
124125
*/
125126
QgsCoordinateReferenceSystem crs() const;
126127

128+
/**
129+
* Returns the name of the layer.
130+
*
131+
* Should be preferred over layer().name() because it can directly be run on
132+
* the background thread.
133+
*/
127134
QString layerName() const;
128135

129136
protected:

‎src/analysis/vector/geometry_checker/qgsgeometrymissingvertexcheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void QgsGeometryMissingVertexCheck::processPolygon( const QgsCurvePolygon *polyg
151151
if ( fid == currentFeature.id() )
152152
continue;
153153

154-
if ( featurePool->getFeature( fid, compareFeature, feedback ) )
154+
if ( featurePool->getFeature( fid, compareFeature ) )
155155
{
156156
if ( feedback && feedback->isCanceled() )
157157
break;

0 commit comments

Comments
 (0)
Please sign in to comment.