Skip to content

Commit 2334518

Browse files
author
mhugent
committed
In QgsPluginManager: test if function type() is present instead of testing 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/qgis@5643 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b134c2d commit 2334518

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/gui/qgspluginmanager.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ sharedLibExtension = "*.so*";
122122
{
123123
std::cout << "Loaded " << myLib->library().toLocal8Bit().data() << std::endl;
124124
// Don't bother with libraries that are providers
125-
if (!myLib->resolve("isProvider"))
125+
//if(!myLib->resolve("isProvider"))
126+
127+
//MH: Replaced to allow for plugins that are linked to providers
128+
//type is only used in non-provider plugins
129+
if(myLib->resolve("type"))
126130
{
127131
name_t *pName = (name_t *) myLib->resolve("name");
128132
description_t *pDesc = (description_t *) myLib->resolve("description");

src/providers/ogr/qgsogrprovider.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,10 @@ int QgsOgrProvider::capabilities() const
12521252
{
12531253
ability |= DeleteFeatures;
12541254
}
1255-
1255+
1256+
//seems to work with newer ogr versions
1257+
//ability |= ChangeAttributeValues;
1258+
12561259
if (ogrLayer->TestCapability("RandomWrite"))
12571260
// TRUE if the SetFeature() method is operational on this layer.
12581261
{

0 commit comments

Comments
 (0)