[Qgis-developer] QgsPluginLayer.writeStyle() must be overridden?

Minoru Akagi akaginch at gmail.com
Wed Jul 6 22:01:12 PDT 2016


Hi devs,

I'm looking forward to the next wonderful release, and now testing
TileLayerPlugin with qgis-dev (OSGeo4W64), I sometimes encounter the
following error message while loading a project with a plugin layer.

NotImplementedError: QgsPluginLayer.writeStyle() is abstract and must
be overridden

According to the API doc [1], QgsMapLayer.writeStyle() has been added
in 2.16 and is reimplemented in QgsVectorLayer and QgsRasterLayer, but
does not seem to be reimplemented in QgsPluginLayer.

Can QGIS core avoid raising this error? Or should all the subclasses
of QgsPluginLayer override writeStyle()?

[1] https://qgis.org/api/classQgsMapLayer.html

Regards,
Minoru


More information about the Qgis-developer mailing list