Skip to content
Permalink
Browse files

Marked updateFeatureCount() in QgsVectorLayer and QgsVectorDataProvid…

…er as meaningless functions.

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13346 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Apr 22, 2010
1 parent 0e3045f commit c90349d7bcd2d029ef0c1c97f65fe177a9f6ad7d
Showing with 5 additions and 15 deletions.
  1. +2 −2 src/core/qgsvectordataprovider.h
  2. +1 −11 src/core/qgsvectorlayer.cpp
  3. +2 −2 src/core/qgsvectorlayer.h
@@ -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();

@@ -911,9 +911,6 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
mRendererV2->setVertexMarkerAppearance( currentVertexMarkerType(), currentVertexMarkerSize() );
}

// TODO: really needed?
updateFeatureCount();

QgsAttributeList attributes;
foreach( QString attrName, mRendererV2->usedAttributes() )
{
@@ -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;
@@ -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()
@@ -3451,7 +3442,6 @@ bool QgsVectorLayer::commitChanges()
}

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

triggerRepaint();

@@ -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;

0 comments on commit c90349d

Please sign in to comment.
You can’t perform that action at this time.