Skip to content

Commit

Permalink
In QgsPluginManager: test if function type() is present instead of te…
Browse files Browse the repository at this point in the history
…sting if the function isProvider() is not present. Like this, it is also possible to create plugins linking to a data provider (which i need for work)

git-svn-id: http://svn.osgeo.org/qgis/trunk@5643 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 27, 2006
1 parent 4015a6f commit a7c8404
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/gui/qgspluginmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ sharedLibExtension = "*.so*";
{
std::cout << "Loaded " << myLib->library().toLocal8Bit().data() << std::endl;
// Don't bother with libraries that are providers
if (!myLib->resolve("isProvider"))
//if(!myLib->resolve("isProvider"))

//MH: Replaced to allow for plugins that are linked to providers
//type is only used in non-provider plugins
if(myLib->resolve("type"))
{
name_t *pName = (name_t *) myLib->resolve("name");
description_t *pDesc = (description_t *) myLib->resolve("description");
Expand Down
5 changes: 4 additions & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,10 @@ int QgsOgrProvider::capabilities() const
{
ability |= DeleteFeatures;
}


//seems to work with newer ogr versions
//ability |= ChangeAttributeValues;

if (ogrLayer->TestCapability("RandomWrite"))
// TRUE if the SetFeature() method is operational on this layer.
{
Expand Down

0 comments on commit a7c8404

Please sign in to comment.