[Qgis-developer] Re: [work] [Qgis-community-team] Re: Python
plugins and C++ plugins: using different terms
Mateusz Loskot
mateusz at loskot.net
Mon Sep 1 08:56:02 EDT 2008
Borys Jurgiel wrote:
> I see no way to simplify the C++ plugins installation. We can't expect that
> authors will provide their plugins for every platform and every QGIS release.
Borys,
Just my 5 low-level eurocents to this issue.
I think that plugins developers writing in C++ language should provide
1. At least two compile-time tests (preprocessor directive #ifdef):
a) Supported platform - on what platforms a plugin can be built.
IOW, a plugin is neither built nor installed on unsupported platforms.
b) Minimal QGIS version required to use a plugin
2. One run-time check to confirm minimal required version of QGIS.
IMO, it would be nice to add a small reflection to plugin base class -
QgsPlugin:
class QgsPlugin
{
// Returns min. required version of QGIS supported by plugin
virtual unsigned int qgisVersion() const = 0;
};
// somewhere in plugins loader (pseudo-code)
ver = currentQgisVersion
for plugin in plugins:
if ver >= plugin.qgisVersion():
load plugin
This way, plugins for which minimal requirements are not satisfied
won't get loaded.
I'm a newbie regarding qgis plugins development, so perhaps I'm
suggestion what has been implemented already. If I am, please forget.
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
More information about the Qgis-community-team
mailing list