[Qgis-developer] Version number in plugin path?

Martin Dobias wonder.sk at gmail.com
Tue Nov 11 07:15:27 EST 2008


On Tue, Nov 11, 2008 at 12:19 PM, Borys Jurgiel <borys at wolf.most.org.pl> wrote:
> Hi list,
>
> I see our discussion has died. But one thing is absolutely essential -
> introducing the qgisMinVersion() method (or apiVersion(), however I believe
> the former is just much clearer).

Agreed. I'm going to implement support for qgisMinVersion method
(you're right, it's clearer) to distinguish which plugins can be
loaded safely.

> QgsPythonUtilsImpl::loadPlugin should reject the incompatible plugins. Martin
> what do you think? Would you like to implement it? I don't know if is there
> any _good_ function for version comparision? (for Python I haven't found any
> sufficient so I had to write my own).

QGIS versioning scheme is "x.y.z" where x,y,z are numbers, sometimes
'z' can be omitted and is considered as zero. So I think there
shouldn't be a problem comparing the versions.


> Now I'm going to implement it in Installer. Uncompatible plugins in repository
> will be masked while installed uncompatible plugins will be marked red.

This sounds like there's need to add minimal version tag also to
repository's XML.


> So if nobody object, I'm introducing the following metadata:
> qgisMinVersion
> qgisMaxVersion
>
> They are of course optional. If missing, the plugin will be loaded anyway.

I prefer to be strict and require qgisMinVersion in every plugin.
However I don't know whether we really need qgisMaxVersion as max.
version can't be usually predicted and I suppose that developers will
ignore it or put some arbitrary high version numbers.

Martin


More information about the Qgis-developer mailing list