Hi Nyall,

I like your proposition on QGIS Project and Layer Registry. Will you write a QEP about it ? Do you wait the grant vote ?

About the server part, we used QgsMapLayerRegistry because some widgets rely on map layer ids and not map layer pointers. We create our own Project parser because the QgsProject load segfault if the QgsApplication is instanciate without interface (GUIenabled to false). And QgsProject is too close to QGIS gui.

René-Luc

Le 27/09/2016 à 09:19, Nyall Dawson a écrit :
I'd really appreciate it if someone more familiar with the server
architecture could summarise what's missing in core's project/layer
handling. I may be missing something, but would a something like this
help?:

- add a QgsProjectRegistry, with an instance attached to
QgsApplication. Change all the use of QgsProject::instance to
QgsProjectRegistry::currentProject().
- move QgsMapLayerRegistry from an instance to a member within
QgsProject. Core code would then use
currentProject()->mapLayerRegistry() instead of
QgsMapLayerRegistry::instance()
- server could directly pull projects from the registry (via some form
of generated project id) as required and access their map layer
registries directly

Nyall

_______________________________________________
Qgis-developer mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to