[Qgis-developer] attributeMap vs. attributes

Etienne Tourigny etourigny.dev at gmail.com
Tue Feb 19 12:17:02 PST 2013


Another approach is to test qgis version and use appropriate API. Many
plugins do this. e.g. value tool

        if QGis.QGIS_VERSION_INT >= 10900:
            mapCanvasSrs = self.iface.mapCanvas().mapRenderer().destinationCrs()
        else:
            mapCanvasSrs = self.iface.mapCanvas().mapRenderer().destinationSrs()

I have updated the wiki page with that information.

Of course this may not be practical if there are many places to do
this. Other solution is to call a function which uses appropriate api
calls.


On Tue, Feb 19, 2013 at 5:53 AM, Victor Olaya <volayaf at gmail.com> wrote:
> The ideas in the document that Richard mentions, about how to make it
> compatible for both versions, are maybe a better idea. I do not know
> if a maximum version can be set in the plugin metadata. :-(
>
> Regards
> Victor
>
> 2013/2/19 Sandro Santilli <strk at keybit.net>:
>> On Tue, Feb 19, 2013 at 11:36:13AM +0100, Victor Olaya wrote:
>>> I faced the same problem with SEXTANTE (and there were a large number
>>> of calls to replace), and decided to go ahead and break compatibility
>>> with 1.8. Should be better in the mid-term, but it's true that it is
>>> not nice to leave a plugin depending now on an yet-unreleased
>>> version...
>>>
>>> If it is not a big work, maybe you can keep two versions, more or less
>>> synchronized
>>
>> 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 ?
>>
>> --strk;
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list