Skip to content

Commit

Permalink
Marked updateFeatureCount() in QgsVectorLayer and QgsVectorDataProvid…
Browse files Browse the repository at this point in the history
…er as meaningless functions.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13346 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Apr 22, 2010
1 parent 0e3045f commit c90349d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsvectordataprovider.h
Expand Up @@ -107,8 +107,8 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
bool useIntersect = false ) = 0;

/**
* Update the feature count based on current spatial filter. If not
* overridden in the data provider this function returns -1
* This function does nothing useful, it's kept only for compatibility.
* @todo to be removed
*/
virtual long updateFeatureCount();

Expand Down
12 changes: 1 addition & 11 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -911,9 +911,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
mRendererV2->setVertexMarkerAppearance( currentVertexMarkerType(), currentVertexMarkerSize() );
}

// TODO: really needed?
updateFeatureCount();

QgsAttributeList attributes;
foreach( QString attrName, mRendererV2->usedAttributes() )
{
Expand Down Expand Up @@ -973,7 +970,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
mVertexMarkerOnlyForSelection = settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool();
}

updateFeatureCount();
int totalFeatures = pendingFeatureCount();
int featureCount = 0;
QgsFeature fet;
Expand Down Expand Up @@ -1374,12 +1370,7 @@ long QgsVectorLayer::featureCount() const

long QgsVectorLayer::updateFeatureCount() const
{
if ( !mDataProvider )
{
QgsDebugMsg( "invoked with null mDataProvider" );
return 0;
}
return mDataProvider->updateFeatureCount();
return -1;
}

void QgsVectorLayer::updateExtents()
Expand Down Expand Up @@ -3451,7 +3442,6 @@ bool QgsVectorLayer::commitChanges()
}

mDataProvider->updateExtents();
mDataProvider->updateFeatureCount();

triggerRepaint();

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.h
Expand Up @@ -228,8 +228,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
*/
virtual long featureCount() const;

/** Update the feature count
* @return long containing the number of features in the datasource
/** This function does nothing useful, it's kept only for compatibility.
* @todo to be removed
*/
virtual long updateFeatureCount() const;

Expand Down

0 comments on commit c90349d

Please sign in to comment.