Skip to content
Permalink
Browse files
In QgsPluginManager: test if function type() is present instead of te…
…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 a7c840462b832bf4b7fb79fce1e402f58fe7a85d
Showing with 9 additions and 2 deletions.
  1. +5 −1 src/gui/qgspluginmanager.cpp
  2. +4 −1 src/providers/ogr/qgsogrprovider.cpp
@@ -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");
@@ -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.
{

0 comments on commit a7c8404

Please sign in to comment.