Hi, <div><br></div><div>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.</div>
<div><br></div><div>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... :-)</div>
<div><br></div><div>So, I second your adding the addMapLayer() call back in, if only to keep my code clutter down :-)</div><div><br></div><div>Cheers,</div><div>Angus Carr.<br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 4:37 PM, Etienne Tourigny <span dir="ltr"><<a href="mailto:etourigny.dev@gmail.com" target="_blank">etourigny.dev@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Jan 24, 2013 at 10:40 AM, Martin Dobias <<a href="mailto:wonder.sk@gmail.com">wonder.sk@gmail.com</a>> wrote:<br>

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