[Qgis-developer] OpenLayers plugin release and Python API breaks

Angus Carr angus.carr at gmail.com
Fri Feb 1 06:40:01 PST 2013


Hi,

I am a plugin developer who was bitten by this API change. It's easily
worked around with a try...except... structure, but that becomes unneeded
clutter. I am working on a plugin that I want to work in the future API and
the stable API at version 1.8, so right now I need that clutter to make it
work in both versions.

I also have the opposite problem, that there are features in the dev API
that I want to use, but they are not in the stable API. I am thinking of
the QgsLayer.diagramRenderer() call, which is not found in the older API,
even though it is in the docs... :-)

So, I second your adding the addMapLayer() call back in, if only to keep my
code clutter down :-)

Cheers,
Angus Carr.

On Thu, Jan 31, 2013 at 4:37 PM, Etienne Tourigny
<etourigny.dev at gmail.com>wrote:

> On Thu, Jan 24, 2013 at 10:40 AM, Martin Dobias <wonder.sk at gmail.com>
> wrote:
> > On Thu, Jan 24, 2013 at 1:32 PM, Alexander Bruy
> > <alexander.bruy at gmail.com> wrote:
> >> Hi Pirmin,
> >>
> >> as I can see in API docs (using your link) there is a note:
> >>
> >> Note:
> >>     This method is deprecated since QGIS 1.8, you should use
> >> addMapLayers rather.
> >
> > A bit off-topic, but I find it weird that addMapLayer() method has
> > been marked as deprecated: even if now we have the possibility to
> > specify more layers at once, it is always good to have a convenience
> > call that accepts just one layer (as that's what most users will do).
>
> I also think that this method should be brought back to the api, see
> all the errors that are popping up in both mailing list about
> QgsMapRegistry::addMapLayer().
>
> Why break things like this when there is no real gain?
>
> Unless someone objects, I will restore QgsMapRegistry::addMapLayer()
>
> Etienne
>
> >
> > Martin
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130201/4ec19291/attachment.html>


More information about the Qgis-developer mailing list