Skip to content
Permalink
Browse files

Add missing capabilities strings to layer metadata

  • Loading branch information
nyalldawson committed Jun 14, 2016
1 parent b145080 commit d00020f99a57442e6b6d7416a8cdfed42c69379e
Showing with 24 additions and 0 deletions.
  1. +24 −0 src/core/qgsvectordataprovider.cpp
@@ -195,13 +195,25 @@ QString QgsVectorDataProvider::capabilitiesString() const
QgsDebugMsg( "Capability: Delete Attributes" );
}

if ( abilities & QgsVectorDataProvider::RenameAttributes )
{
abilitiesList += tr( "Rename Attributes" );
QgsDebugMsg( "Capability: Rename Attributes" );
}

if ( abilities & QgsVectorDataProvider::CreateSpatialIndex )
{
// TODO: Tighten up this test. See QgsOgrProvider for details.
abilitiesList += tr( "Create Spatial Index" );
QgsDebugMsg( "Capability: Create Spatial Index" );
}

if ( abilities & QgsVectorDataProvider::CreateAttributeIndex )
{
abilitiesList += tr( "Create Attribute Indexes" );
QgsDebugMsg( "Capability: Create Attribute Index" );
}

if ( abilities & QgsVectorDataProvider::SelectAtId )
{
abilitiesList += tr( "Fast Access to Features at ID" );
@@ -232,6 +244,18 @@ QString QgsVectorDataProvider::capabilitiesString() const
QgsDebugMsg( "Capability: change both feature attributes and geometry at once" );
}

if ( abilities & QgsVectorDataProvider::TransactionSupport )
{
abilitiesList += tr( "Transactions" );
QgsDebugMsg( "Capability: transactions" );
}

if ( abilities & QgsVectorDataProvider::CircularGeometries )
{
abilitiesList += tr( "Curved Geometries" );
QgsDebugMsg( "Supports circular geometry types (circularstring, compoundcurve, curvepolygon)" );
}

return abilitiesList.join( ", " );
}

0 comments on commit d00020f

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