[Qgis-developer] QGIS Server, my last improvements

René-Luc Dhont rldhont at gmail.com
Wed Oct 12 08:02:10 PDT 2016


Hi Devs,

I'm writting this email to inform you about my last QGIS Server 
improvements.

Firstly, when we fixed something in QgsMapLayerRegistry: [BUGFIX] Emit 
layerWillBeRemoved like layersWillBeRemoved (#3194) 
https://github.com/qgis/QGIS/commit/f6aad8bad6db72d0b1e573998ac7dcb2405dce55; 
we generated an issue in QGIS Server: Qgis Server doesnt' respect the 
styling from Desktop http://hub.qgis.org/issues/15522.

I investigated the issue 15522 and found that layersWillBeRemoved 
results in clearing vector layer join buffers. So layers in QGIS Server 
cache has empty join buffer. To fixed it, the only accessible method is 
QgsVectorLayer::readXML. But this method does not only reload joins, it 
also forces reload data and all other configuration stored in the qgis 
project. The uses of these method results it a memory leak. So the good 
solution is to add an accessor to the QgsVectorLayer::joinBuffer. 
https://github.com/qgis/QGIS/pull/3593

Following the advice of Nyall, I replace dynamic_cast by qobject_cast 
when it is usefull. I gained some performances with it.

I opened an other pull request about GetLegendGraphic and layer title, 
requested by a customer https://github.com/qgis/QGIS/pull/3595 And it 
needs some review
In this PR, I enhance the QGIS Server tests but a lot has to be done.

Regards,



More information about the Qgis-developer mailing list