The current approach of testing !vl || vl->geometryType() != NoGeometry
is not intuitive and has been the source of 2 recent bugs.
Replacing these tests with the new isSpatial() function makes it
immediately obvious what is being tested. It also allows for
non-spatial plugin layers to be correctly handled by overriding
this method.
Failure is odd.
c = r.stops()[0].color
self.assertEqual(c, QColor(100, 100, 40))
fails, but
s = r.stops()
self.assertEqual(s[0].color, QColor(100, 100, 40))
passes!
* pyqtwrappers update (add QtNetwork, QtXml, QtSql, QtTest, uic)
* 2to3 updates
* move QPyNullVariant/NULL to PyQt.QtCore
* add global unicode/basestring/long for Python3
* expand QtGui, QtCore module and star exports
* Qscintilla2
* replace Set import with set builtin
- add public getters and setters for variables, will make variables
private in QGIS 3.0
- avoid some memory leaks and potential crashes
- move calculation of referenced fields to diagram classes, out
of QgsVectorLayerDiagramProvider
This makes it possible to change SVG fill/outline color and outline
width when using parameterised SVG files such as those included
with QGIS (fix#10542)
- test that fetching subset of attributes results in nulls for
all other fields
- test that geometry is fetched by default, but empty when
NoGeometry flag is passed
Also includes handy function for converting a string to a QgsFeatureList
or QgsFields by using OGR to parse the string. This allows eg conversion
of GeoJSON to QgsFeatures.
In the OGR provider, we can read:
```
Some ogr drivers (e.g. GML) are not able to determine the geometry type of a layer like this.
In such cases, we use virtual sublayers for each geometry if the layer contains
multiple geometries (see subLayers) otherwise we guess geometry type from first feature
```
It means that in DescribeFeatureType Geometry element can be describe as simple and the GML contains
simple and multi. It's not XML valid.
To fix it, for OGR provider Geometry element type is set to `gml:GeometryPropertyType`
For the next release, it will be interesting to allow users to specify whether the geometries are multi.