53340 Commits

Author SHA1 Message Date
Blottiere Paul
1b6ed5f45e Update expected files for unit tests 2019-01-28 11:42:14 +00:00
Blottiere Paul
7f19cb81e6 Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
eee940dc8f Export aliases is an option 2019-01-28 11:42:14 +00:00
Blottiere Paul
3b452869ea Add unit test for application/geo+json format 2019-01-28 11:42:14 +00:00
Blottiere Paul
80f33343f6 Add application/geo+json format 2019-01-28 11:42:14 +00:00
Blottiere Paul
f841681c06 Some cleaning 2019-01-28 11:42:14 +00:00
Blottiere Paul
8db9ab1563 Fix comment 2019-01-28 11:42:14 +00:00
Blottiere Paul
dee73c623f Add QStringLiteral 2019-01-28 11:42:14 +00:00
Blottiere Paul
0f24e72bd5 Some cleaning 2019-01-28 11:42:14 +00:00
Blottiere Paul
8e3f7b131b Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
5da6004b78 Update method's name and add doc 2019-01-28 11:42:14 +00:00
Blottiere Paul
03447f8034 Add unit test for raster layers and json export 2019-01-28 11:42:14 +00:00
Blottiere Paul
2d8f3d1e93 Add json export for raster layers 2019-01-28 11:42:14 +00:00
Blottiere Paul
9eed93b169 Add an expected file 2019-01-28 11:42:14 +00:00
Blottiere Paul
2f683fc544 Add unit test with multiple layers and features for json 2019-01-28 11:42:14 +00:00
Blottiere Paul
5ef11399aa Update testdata with layers' names 2019-01-28 11:42:14 +00:00
Blottiere Paul
f9eba37b10 Add layers tag and their names in exported json 2019-01-28 11:42:14 +00:00
Blottiere Paul
e4cdd7c254 Add unit test for GetFeatureInfo on raster layer in xml 2019-01-28 11:42:14 +00:00
Blottiere Paul
45399d72b4 Add unit test for with_geometry and json export 2019-01-28 11:42:14 +00:00
Blottiere Paul
ebd1022214 Do not add geometry if not necessary in json export 2019-01-28 11:42:14 +00:00
Blottiere Paul
101cd73125 Add unit test for excluded attributes 2019-01-28 11:42:14 +00:00
Blottiere Paul
332f78bbf6 Export json without excluded attributes 2019-01-28 11:42:14 +00:00
Blottiere Paul
62f77629b0 Add unit test for getfeatureinfo with alias in json 2019-01-28 11:42:14 +00:00
Blottiere Paul
3f38365d4d Add unit test for json exporter and alias 2019-01-28 11:42:14 +00:00
Blottiere Paul
7e414b0677 Json exporter use the field's alias if necessary 2019-01-28 11:42:14 +00:00
Blottiere Paul
562215c4cd Add unit test 2019-01-28 11:42:14 +00:00
Blottiere Paul
f921f82f09 Add GetFeatureInfo in JSON for vector layers 2019-01-28 11:42:14 +00:00
Blottiere Paul
f6bfc9858c Add JSON format in WMS parameters 2019-01-28 11:42:14 +00:00
Peter Petrik
42413ce193 add mesh layer in app>layers>add layer 2019-01-28 09:17:26 +01:00
Peter Petrik
e78e0be570 add 3d renderer icon to mesh properties panel too 2019-01-28 08:22:32 +01:00
Alessandro Pasotti
1f8708f270
Merge pull request #8985 from elpaso/bugfix-21091-ogr-protocol-download
OGR: add a download option to the protocol data source [needs-docs]
2019-01-28 08:11:28 +01:00
Harrissou Sant-anna
bc4efc9908 [ui] Add Help button to the "Load Layer Style" dialog (#8986) 2019-01-28 12:34:14 +07:00
nirvn
b3a48b6be9 [ui] Add min. height to the layout label item widget text box 2019-01-28 12:29:22 +07:00
Nyall Dawson
838214bfc2 Avoid string to int conversion 2019-01-28 15:21:40 +11:00
Nyall Dawson
f453a76ce5 Fix doxygen warning 2019-01-28 15:21:40 +11:00
Nyall Dawson
18f04fb4c3 Refactor to simply and avoid QObject based QgsSslErrorHandler 2019-01-28 15:21:40 +11:00
Nyall Dawson
610d865ada Seriously, just f*** off american spell checker 2019-01-28 15:21:40 +11:00
Nyall Dawson
54d6a6cffe Review comments 2019-01-28 15:21:40 +11:00
Nyall Dawson
0f0ee9bd51 More SSL error handling tests 2019-01-28 15:21:40 +11:00
Nyall Dawson
b23f08f270 Test ssl errors in background thread 2019-01-28 15:21:40 +11:00
Nyall Dawson
c707df7d15 Improve QgsNetworkAccessManager tests 2019-01-28 15:21:40 +11:00
Nyall Dawson
2e3a717e44 Make SSL error handling thread safe, avoid races and crashes when
SSL error occurs in non-main thread

This commit reworks how SSL errors are handled in QGIS. Previously,
ssl errors emitted by non-main thread QgsNetworkAccessManager instances
were handled by the main thread in QgisApp on next event loop. But
app (in the main thread) tried to pause the timeout timer for the
QNetworkReply containing the error, which doesn't work, because you
can't stop a timer in the main thread for a timer object created
in another thread. This meant that the reply could get deleted in
the background thread while the main thread was still using it
and waiting for users to respond to the SSL error. Now the timer
handling is done in the background thread's network access manager
instance, so in the thread matching the reply's timeout timer. We
then have to do some fancy thread locking using QWaitCondition,
because we need to "pause" that thread until the SSL error
is handled in the main thread -- if we don't pause the background
thread, Qt immediately resumes the QNetworkReply without ever
giving us the change to ignore ssl errors in the reply. Phew!

Additionally, the previous approach had a shortcoming in that
there was no way to notify background threads that ssl errors
had actually be handled. To do this we need a new signal which
can be fired after app has shown the ssl dialog and given users
a chance to respond. BUT... we can't safely do this -- if we
add a method to notify background threads when ssl errors have
been handled, then it CANNOT safely reside in app -- doing so
would break for QGIS server and QField etc, where theres no
app instance around to provide this notification. As a result
I've abstracted out the ssl error handling. By default there's
a simple error handler which just logs errors and returns
without ignoring them (i.e. default Qt behavior, an ssl error
cancels the request). App has a specific subclass of the ssl
error handler which presents the nice dialog and asks users to
choose what to do. Potentially server could decide to make
its own subclass too, which could e.g. ignore SSL warnings
if an environment variable is present (but at the moment
the behavior is effectively unchanged for server).

The end result is that SSL error handling should now be
totally thread safe, and we shouldn't hit any more deadlocks
and crashes when ssl errors occur in background threads.

I've also taken the opportunity to add a new signal which
is always emitted by the main thread QgsNetworkAccessManager
instance, which is emitted whenever ANY request on any
thread encounters an SSL error, and contains the requestId
so that the ssl error can be linked back to the originating
request. This is for debugging, and for use by the
network monitoring plugin to show ssl errors encountered
by requests.
2019-01-28 15:21:40 +11:00
Nyall Dawson
c44f8f0a15 Fix build 2019-01-28 07:16:33 +11:00
Nyall Dawson
9b2e39cef8 Fix more icon sizes on hidpi 2019-01-28 07:16:33 +11:00
Nyall Dawson
7b739f196d Fix some clazy warnings 2019-01-28 07:16:33 +11:00
Nyall Dawson
27bb2c156f Fix undersized layertree icons on hidpi displays 2019-01-28 07:16:33 +11:00
Alexander Bruy
fc9796f52a fix saving/restoring proxy excluded URLs (fix #20933) 2019-01-28 07:14:57 +11:00
Alexander Bruy
3c2a20a948 show pixel size in the raster layer properties with 19 significant
digits (fix #21023)
2019-01-28 07:14:21 +11:00
Alessandro Pasotti
6be9f14f0f Better UX when loading remote layers in the main thread
"loading ..." message and busy cursor
2019-01-27 18:23:53 +01:00
Alessandro Pasotti
65bf2ceb9d Size hints for the embedded message bar widget 2019-01-27 18:23:18 +01:00