File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
107
107
bool useIntersect = false ) = 0;
108
108
109
109
/* *
110
- * Update the feature count based on current spatial filter. If not
111
- * overridden in the data provider this function returns -1
110
+ * This function does nothing useful, it's kept only for compatibility.
111
+ * @todo to be removed
112
112
*/
113
113
virtual long updateFeatureCount ();
114
114
Original file line number Diff line number Diff line change @@ -911,9 +911,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
911
911
mRendererV2 ->setVertexMarkerAppearance ( currentVertexMarkerType (), currentVertexMarkerSize () );
912
912
}
913
913
914
- // TODO: really needed?
915
- updateFeatureCount ();
916
-
917
914
QgsAttributeList attributes;
918
915
foreach ( QString attrName, mRendererV2 ->usedAttributes () )
919
916
{
@@ -973,7 +970,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
973
970
mVertexMarkerOnlyForSelection = settings.value ( " /qgis/digitizing/marker_only_for_selected" , false ).toBool ();
974
971
}
975
972
976
- updateFeatureCount ();
977
973
int totalFeatures = pendingFeatureCount ();
978
974
int featureCount = 0 ;
979
975
QgsFeature fet;
@@ -1374,12 +1370,7 @@ long QgsVectorLayer::featureCount() const
1374
1370
1375
1371
long QgsVectorLayer::updateFeatureCount () const
1376
1372
{
1377
- if ( !mDataProvider )
1378
- {
1379
- QgsDebugMsg ( " invoked with null mDataProvider" );
1380
- return 0 ;
1381
- }
1382
- return mDataProvider ->updateFeatureCount ();
1373
+ return -1 ;
1383
1374
}
1384
1375
1385
1376
void QgsVectorLayer::updateExtents ()
@@ -3451,7 +3442,6 @@ bool QgsVectorLayer::commitChanges()
3451
3442
}
3452
3443
3453
3444
mDataProvider ->updateExtents ();
3454
- mDataProvider ->updateFeatureCount ();
3455
3445
3456
3446
triggerRepaint ();
3457
3447
Original file line number Diff line number Diff line change @@ -228,8 +228,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
228
228
*/
229
229
virtual long featureCount () const ;
230
230
231
- /* * Update the feature count
232
- * @return long containing the number of features in the datasource
231
+ /* * This function does nothing useful, it's kept only for compatibility.
232
+ * @todo to be removed
233
233
*/
234
234
virtual long updateFeatureCount () const ;
235
235
You can’t perform that action at this time.
0 commit comments