4912 Commits

Author SHA1 Message Date
Nyall Dawson
0b2de85fe7 Check file modified time when retrieving svg images from cache
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
2017-10-31 12:12:24 +10:00
Nyall Dawson
a6eea7205c Fix crashes caused by concurrent rendering of cached QPictures from QgsSvgCache
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
2017-10-31 10:24:18 +10:00
Nyall Dawson
942f431f0f Fix crash when rendering with SVG based symbols and SVG cache is filled
When the svg cache was full, any attempt to render an svg from the
cache would crash QGIS.

Fixes #16643
2017-10-30 21:32:48 +10:00
Matthias Kuhn
e0025b65b1
Rename QgsGeometry::fromPoint to QgsGeometry::fromPointXY
Also introduces the from[Geometry]XY for QgsGeometryFactory
2017-10-30 09:14:06 +01:00
Matthias Kuhn
82e6d1219f
Rename from[GeometryType] to from[GeometryType]XY
- QgsGeometry::fromPoint() was renamed to fromPointXY()
- QgsGeometry::fromMultiPoint() was renamed to fromMultiPointXY()
- QgsGeometry::fromMultiPolyline() was renamed to fromMultiPolylineXY()
- QgsGeometry::fromPolygon() was renamed to fromPolygonXY()
- QgsGeometry::fromMultiPolygon() was renamed to fromMultiPolygonXY()
2017-10-30 09:14:06 +01:00
Matthias Kuhn
bde014ec7b
Adjust leftovers addPointsV2 to addPoints 2017-10-30 09:14:06 +01:00
Matthias Kuhn
ca74e391cd
Rename QgsGeometry.addPoints with XY / V2-less versions 2017-10-30 09:14:05 +01:00
Matthias Kuhn
750a54f8f6
More drop V2 suffix fixes 2017-10-30 09:14:05 +01:00
Matthias Kuhn
e19f6482ca
Various fixes to dropping V2 suffix 2017-10-30 09:14:05 +01:00
Matthias Kuhn
7f3ad76882
Rename QgsMultiPolygonV2 to QgsMultiPolygon 2017-10-30 09:14:04 +01:00
Matthias Kuhn
3fcdcd87af
Rename QgsMultiPointV2 to QgsMultiPoint 2017-10-30 09:14:04 +01:00
Matthias Kuhn
b6f46eae11
Rename QgsPolygonV2 to QgsPolygon 2017-10-30 09:14:04 +01:00
Matthias Kuhn
9a57bae6f4
Rename QgsMultiPolygon to QgsMultiPolygonXY 2017-10-30 09:14:04 +01:00
Matthias Kuhn
b7908744e3
Rename QgsMultiPolyline to QgsMultiPolylineXY 2017-10-30 09:14:03 +01:00
Matthias Kuhn
29e65ed087
Rename QgsMultiPoint to QgsMultiPointXY 2017-10-30 09:14:03 +01:00
Matthias Kuhn
becf86cf6c
Rename QgsPolygon to QgsPolygonXY 2017-10-30 09:14:03 +01:00
Matthias Kuhn
28f2722650 QgsTransaction.create expects layers, not ids 2017-10-29 13:31:17 +01:00
Matthias Kuhn
5dbeaf58c9 [postgres][test] Check QgsFeatureRequest.connectionTimeout flag 2017-10-29 13:31:17 +01:00
Matthias Kuhn
e6e6189180 We cannot test to insert NULL with NOT NULL constraints 2017-10-29 00:24:13 +02:00
Matthias Kuhn
76746e7d5e [postgres][test] Assert NULL insert behavior
0 != '' != NULL
2017-10-28 23:15:54 +02:00
Larry Shaffer
8032de8d06 [auth][api] Remove deprecated QSslCertificate::isValid()
Substitue QgsAuthCertUtils::certIsViable(cert), which checks similar
characteristics to old function, plus whether the cert is null.
2017-10-27 14:01:03 -06:00
Alessandro Pasotti
8ef715be15
Merge pull request #5480 from boundlessgeo/auth_get_removal
[api][auth] Removed get prefix from all getters in auth manager
2017-10-27 21:50:24 +02:00
mhugent
a843df8947 Merge pull request #5466 from mhugent/maptip_geometry_optional
[needs-docs] Make maptip and geometry attribute optional in featureinfo response
2017-10-27 16:13:20 +02:00
mhugent
26bd6d722e Merge pull request #5435 from mhugent/wms_print_layers
[needs-docs][feature] Wms print layers
2017-10-27 16:12:19 +02:00
Marco Hugentobler
52896f5545 Add test for maptip 2017-10-27 15:19:00 +02:00
Alessandro Pasotti
d64529f4ce [api][auth] Removed get prefix from all getters in auth manager 2017-10-27 14:27:29 +02:00
Marco Hugentobler
1592cccf60 Try to make travis indentation check happy 2017-10-27 14:18:05 +02:00
Blottiere Paul
98c05ade42 Add test 2017-10-27 12:58:32 +01:00
Blottiere Paul
c54299dcbb Merge pull request #5406 from pblottiere/bugfix_server_hex
[server][bugfix]  Fix parameter decoding with post method and urlencoded
2017-10-27 12:55:57 +01:00
Matthias Kuhn
6829a92e79 Merge pull request #5468 from m-kuhn/unobtrusiveConstraints
[FEATURE] Make constraint reporting less obtrusive
2017-10-27 12:47:21 +02:00
Matthias Kuhn
40955b24dd Merge pull request #5440 from m-kuhn/relrefthreadingv2
[feature] Relation Reference Widget : Threaded Version
2017-10-27 11:07:25 +02:00
Blottiere Paul
8562bfa9b9 Add some tests for GetPrint with OPACITIES 2017-10-27 09:48:14 +01:00
Marco Hugentobler
fd5a17cc6c Intendention 2017-10-27 10:39:22 +02:00
Alessandro Pasotti
89f62821a0 [auth] Added test cases for expired CAs and client certs 2017-10-27 09:35:24 +02:00
Marco Hugentobler
0eb7b4ebfc Intendention 2017-10-27 09:29:00 +02:00
Nyall Dawson
4372ac2658 [FEATURE][processing] Native c++ snap to grid algorithm
With support for snapping Z/M values, keeping curves
2017-10-27 15:16:15 +10:00
Nyall Dawson
c67e39812d Improvements to QgsAbstractGeometry::snappedToGrid
- Fix loss of coordinates when not rounding a particular dimension
- Don't segmentize curved geometries
- Add extra unit tests
- Make createEmptyWithSameType() protected and skip from Python bindings.
This method relies on low-level manipulation of the returned geometry
which we do not want to expose as public/fixed API
2017-10-27 14:37:35 +10:00
Martí Angelats i Ribera
3f5b11bffe Make asGridified and newSameType (helper function) 2017-10-27 11:22:47 +10:00
Larry Shaffer
99b1c74c4e [auth] Update test certs/keys and add README
* Add expired root/issuer CAs and client cert chains
* Add wildcard server *.qgis.test SSL cert

[ci skip]
2017-10-26 17:36:33 -06:00
Nyall Dawson
131b15f2a7 Merge pull request #5472 from nyalldawson/grid_renderer
Grid renderer
2017-10-27 10:23:21 +11:00
Nyall Dawson
b80160a628 Merge pull request #5464 from lbartoletti/improve_triangle
Improve triangle
2017-10-27 08:47:41 +11:00
Nyall Dawson
d4e8470ad4 Minor fixups, add tests 2017-10-27 07:45:40 +10:00
Matthias Kuhn
114a4ec243 Adjust tests 2017-10-26 23:04:32 +02:00
lbartoletti
a86800b7ff Fix tests forgotten in testqgsexpression.cpp 2017-10-26 22:37:52 +02:00
Larry Shaffer
8501053a0d Merge pull request #5463 from boundlessgeo/BD-2507-pki-bundle-validation
[auth] PKI bundle validation utility function
2017-10-26 13:52:57 -06:00
Marco Hugentobler
22a54fa647 Add Unit test 2017-10-26 21:40:16 +02:00
Larry Shaffer
3210f8546a Merge pull request #5401 from boundlessgeo/pkcs8-to-pkcs1
[auth] Convert PKCS8 to PKCS1 private keys (for macOS)
2017-10-26 12:42:12 -06:00
Matthias Kuhn
83a02eb534
Fix chained filters and tests 2017-10-26 20:30:06 +02:00
Alessandro Pasotti
89166a0d2e [auth] Add utility method to validate a PKI bundle 2017-10-26 18:26:47 +02:00
Alessandro Pasotti
287d1f751f [auth] Add test with client cert 2017-10-26 18:24:35 +02:00