Skip to content

Commit c90349d

Browse files
author
wonder
committedApr 22, 2010
Marked updateFeatureCount() in QgsVectorLayer and QgsVectorDataProvider as meaningless functions.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13346 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed
 

‎src/core/qgsvectordataprovider.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
107107
bool useIntersect = false ) = 0;
108108

109109
/**
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
112112
*/
113113
virtual long updateFeatureCount();
114114

‎src/core/qgsvectorlayer.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
911911
mRendererV2->setVertexMarkerAppearance( currentVertexMarkerType(), currentVertexMarkerSize() );
912912
}
913913

914-
// TODO: really needed?
915-
updateFeatureCount();
916-
917914
QgsAttributeList attributes;
918915
foreach( QString attrName, mRendererV2->usedAttributes() )
919916
{
@@ -973,7 +970,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
973970
mVertexMarkerOnlyForSelection = settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool();
974971
}
975972

976-
updateFeatureCount();
977973
int totalFeatures = pendingFeatureCount();
978974
int featureCount = 0;
979975
QgsFeature fet;
@@ -1374,12 +1370,7 @@ long QgsVectorLayer::featureCount() const
13741370

13751371
long QgsVectorLayer::updateFeatureCount() const
13761372
{
1377-
if ( !mDataProvider )
1378-
{
1379-
QgsDebugMsg( "invoked with null mDataProvider" );
1380-
return 0;
1381-
}
1382-
return mDataProvider->updateFeatureCount();
1373+
return -1;
13831374
}
13841375

13851376
void QgsVectorLayer::updateExtents()
@@ -3451,7 +3442,6 @@ bool QgsVectorLayer::commitChanges()
34513442
}
34523443

34533444
mDataProvider->updateExtents();
3454-
mDataProvider->updateFeatureCount();
34553445

34563446
triggerRepaint();
34573447

‎src/core/qgsvectorlayer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
228228
*/
229229
virtual long featureCount() const;
230230

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
233233
*/
234234
virtual long updateFeatureCount() const;
235235

0 commit comments

Comments
 (0)
Please sign in to comment.