Skip to content

Commit

Permalink
Add missing capabilities strings to layer metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 14, 2016
1 parent b145080 commit d00020f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/core/qgsvectordataprovider.cpp
Expand Up @@ -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" );
Expand Down Expand Up @@ -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( ", " );
}

Expand Down

0 comments on commit d00020f

Please sign in to comment.