New version supports the following notation
class QgsOutClass : public QObject // SIP_ABSTRACT
MOC does not like lines like the following one and silently refuses to build the meta object for such classes
class QgsOutClass : public QObject SIP_ABSTRACT
when feature request specifies a filter rect
OGR sometimes returns a feature with empty geometry (e.g.
a multipolygon with a polygon child with no rings) even when
OGR_L_SetSpatialFilterRect has been set for the layer.
Refs #17365
This commit fixes a possible crash when the vector layer renderer
attempts to render a multipolygon containing a polygon without
an exterior ring.
The underlying cause of the creation of this invalid geometry is deeper,
but this commit hardens the renderer and makes it more robust for
handling bad geometries.
Fixes#17365
The tolerance option was not correctly calculated, resulting in
semi-random behavior for networks which relied on a non-zero
tolerance.
Also possible speed boost for complex networks by using
proper spatial index instead of custom sorting/filtering code.
Refs #17325
If file has been modified since the cache, regenerate a new cache
image.
We don't want to check the file modified time too often though,
(e.g., we don't want to check for every point render in a 100k
point file), so use a hardcoded 30 second minimum time between
consecutive file modified checks.
This means that file modifications occuring more often than
every 30 seconds won't be picked up till 30 seconds has elapsed
since the last modification. But at the same time it means that
if the render takes < 30 seconds we'll only check each svg
at most once (and if a render takes > 30 seconds, adding a few
more milliseconds won't hurt!).
Fixes#13565
- Remove QgsSvgCacheEntry from public API (is an internal detail only)
- Modernize code
- Make protected QgsSvgCache members private, since this class is not
designed to be subclassed
QgsSvgCache::svgAsPicture was rendering an implicitly shared copy when
the picture had already been cached. It turns out that rendering an
implicitly shared QPicture copy isn't thread safe, and rendering shared
copies simulataneously across different threads leads quickly to a crash.
Accordingly we always detach the QPicture objects returned by
svgAsPicture, so that the returned QPicture is safe to use across threads.
Also add unit tests for this, and a similar unit test to verify that
rendering of QImage based cached copies does *not* suffer the same
issue.
Fixes#17089, #17077