[Qgis-developer] attributeMap vs. attributes

Borys Jurgiel lists at borysjurgiel.pl
Wed Feb 20 08:22:29 PST 2013


> > I can try that. How do I encode that one version does NOT work
> > with a newer QGIS ?
> > 
> > I see there's a qgisMinimumVersion setting,
> > is there also a qgisMaximumVersion ? Would it be used by plugin fetcher ?

> This mechanism has to not been implemented yet - neither in the plugin
> repository nor in the plugin installer.

To be honest, it's implemented in the installer years ago. Anyway, AFAIK the 
repo doesn't uses it.

You can publish two versions, the higher with a higher qgisMinimumVersion:

version 1.0 for qgisMinimumVersion = 1.0
version 2.0 for qgisMinimumVersion = 1.9

The installer always fetches the highest available version sutiable for 
current QGIS.


The downside is that people having 1.8 and 2.0 side by side (what is quite 
common), need to set separate plugin directories for both versions.

Personally I implelent both APIs in my plugins:

    if QGis.QGIS_VERSION_INT >= 10900:
	foo()	
    else:
	bar()

even if it means almost duplicated big blocks of code (someday the old version 
will be removed anyway)


More information about the Qgis-developer mailing list