kadas-albireo / kadas-albireo2

KADAS Albireo
GNU General Public License v2.0
67 stars 14 forks source link

Fix missing context for QgsMapLayerRenderer subclasses #77

Closed domi4484 closed 4 months ago

3nids commented 4 months ago

What is the reason to switch to a pointer? Looking in QGIS source code shows mainly the use of a const ref.

domi4484 commented 4 months ago

What is the reason to switch to a pointer? Looking in QGIS source code shows mainly the use of a const ref.

The constructor of QgsMapLayerRenderer needs a pointer. So I thought a class inheriting from it should use the same interface. But you are right looking in qgis its mainly passed by ref. Non const as it need to be modified. Ill change that!

domi4484 commented 4 months ago

@3nids done thanks

3nids commented 4 months ago

Thanks. Sorry, I misread, I would follow QGIS API and use the same signature in the subclass. So let's go with your first commit, it's good!

domi4484 commented 4 months ago

In the end in qgis it's the same, they change the signature in subclasses. So I'll keep the second commit to stay more close to that