[QGIS-Developer] QGis3: QgsLayerMetadata usage from QgsDataProvider to QgsMapLayer ?

Mark Johnson mj10777 at googlemail.com
Fri Nov 10 00:15:08 PST 2017


My assumption is that it a Provider would be a major source to gather the
needed information an set QgsLayerMetadata.
I am doing this now for the new QgsSpatiaLiteProvider.

QgsDataProvider does not contain (at present) a mMetadata; member as
QgsMapLayer does.

So when setDataProvider runs in QgsVectorLayer and QgsRasterLayer, any
Metadata gathered by a provider (in the form of QgsLayerMetadata) cannot be
set.

So the practical usage of QgsLayerMetadata is not quite complete.

https://github.com/qgis/QGIS-Enhancement-Proposals/issues/91

---
Also there seems to be, alternative and different, 'metadata' still in
place - preventing an unified way of dealing with metadata:

QgsRasterDataProvider has a QString based  metadata() function
-     virtual QString metadata() = 0;
QgsVectorDataProvider has a  QVariantMap metadata() function
-     virtual QVariantMap metadata() const { return QVariantMap(); }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171110/b445a780/attachment.html>


More information about the QGIS-Developer mailing list