[Qgis-developer] Corrections of QgsOgrProvider implementaion of GDAL 2.0

Mark Johnson mj10777 at googlemail.com
Mon Mar 20 16:01:35 PDT 2017


>
> The layer name can be stored in subLayers() for conveniency, since it has
>> usually a short life. And for subLayers() / askUserForOGRSublayers() make
>> the layer id what is used.
>
> subLayers is not used when read from a project, only when a new source is
added.

>
>> Not sure to what you are refering too, since I can see the layerName
>> returned here:
>
> Between  subLayers() and QgsOgrProvider the data runs through other
functions in other classes
- in one the layername is removed

void QgisApp::askUserForOGRSublayers( QgsVectorLayer *layer )
    Q_FOREACH ( const QgsSublayersDialog::LayerDefinition& def,
chooseSublayersDialog.selection() )
    {
      QString layerGeometryType = def.type;
 -    QString composedURI = uri + "|layerid=" + QString::number(
def.layerId );
 -
 +    QString composedURI = uri + "|layerid=" + QString::number(
def.layerId ) + "|layername=" + def.layerName;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170321/84717e2e/attachment.html>


More information about the Qgis-developer mailing list