[Qgis-developer] API break
denis.rouzaud at gmail.com
Mon Mar 17 07:47:43 PDT 2014
Thanks for the feedback.
I did get an error in a python plugin using startRenderer with the
I fixed this using a check on QGIS version.
On 17. 03. 14 15:28, Martin Dobias wrote:
> Hi Denis
> On Mon, Mar 17, 2014 at 8:52 PM, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
>> Hi all,
>> I noticed an API break has been introduced after 2.2:
>> 2.2: void QgsSingleSymbolRendererV2::startRender( QgsRenderContext& context,
>> const QgsVectorLayer *vlayer );
>> 2.3: void QgsSingleSymbolRendererV2::startRender( QgsRenderContext &
>> context, const QgsFields & fields );
>> I was using this in a plugin to determine if a feature was rendered or not.
>> This was introduced by Martin for multi-threading
> The prototype with QgsVectorLayer as an argument is still available in
> master and it calls the other version with QgsFields argument, so in
> theory you should be still able to use the version with
> QgsVectorLayer. If not, it is a bug (supposedly related to shadowing
> of virtual methods with the same name).
> The change should only matter to implementations of renderers, which I
> believe are very rare in third-party code, and therefore somewhat a
> bit more acceptable to break if there is no chance to fix it without a
>> Although I believe that for such a change, some breaks were acceptable.
>> Anyway, it would be nice to have this documented at some place. If it is, I
>> did not find it.
> I have a list of such changes which I would like to document with more
> in-depth docs of the MTR implementation. I hope to get it ready for/at
More information about the Qgis-developer