3300 Commits

Author SHA1 Message Date
Even Rouault
852f01b0f9 [WFS provider] Select GML3 output format for WFS 1.0 when available
Some WFS servers like QGIS servers can expose GML3 output format for GetFeature
requests, which enable to retrieve curve geometries, instead of linearized ones
with the default GML2 output format. So use GML3 when advertized, and that
no explicit outputFormat is passed in the URI.
2017-03-16 13:32:39 +01:00
Juergen E. Fischer
8bea742216 fix flake8 warnings 2017-03-13 20:13:51 +01:00
Nyall Dawson
a271199b0c When theme is removed, canvas falls back to default view 2017-03-13 15:03:07 +10:00
Nyall Dawson
2cba52846e If no project layer order set, use layer tree layer order
for QgsMapThemeCollection::masterVisibleLayers()
2017-03-13 14:42:22 +10:00
Nyall Dawson
0d0a81b00d Clearing map canvas theme falls back to project layers 2017-03-13 14:11:58 +10:00
Nyall Dawson
7f85169e30 Move test to correct location 2017-03-13 14:08:20 +10:00
Nyall Dawson
70bc526b6c Indentation 2017-03-13 14:04:40 +10:00
Nyall Dawson
452abb2484 Add method to QgsMapThemeCollection to retrieve ordered list of
visible layers for the project
2017-03-13 13:40:48 +10:00
Nyall Dawson
98eda3521c Auto-set GUI for custom layer order when API call to QgsProject::setLayerOrder
is made
2017-03-13 12:52:55 +10:00
Nyall Dawson
2c3c1f7fbb If no project layer order is set, fall back to stored layer order
when retrieving map theme layers

Since we don't ever want to return no layers in this situation
using the stored order is an acceptable last resort

Should only affect custom scripts run outside of QGIS app
in any case!
2017-03-13 12:52:55 +10:00
Nyall Dawson
5eccaf6020 Project layer order returns all layers in order, not just visible ones
Otherwise map themes with different visible layers cannot be
correctly ordered
2017-03-13 12:52:55 +10:00
Nyall Dawson
9faa628f8b Layer order in map themes must always respect project layer order 2017-03-13 12:52:55 +10:00
Nyall Dawson
6cfc6a1b98 Allow retrieval of project layer order through QgsProject
Previously this was only accessible through app
2017-03-13 12:52:55 +10:00
Nyall Dawson
9842fcbfc7 Add convience method to block while canvas is rendering
NOT to be called from anything but unit tests and standalone
scripts!!
2017-03-13 10:00:36 +10:00
Nyall Dawson
af532ecdf3 Improved docs for QgsMapCanvas::setTheme, handle setLayers and
setLayerStyleOverrides when canvas is following a map theme
2017-03-13 09:53:09 +10:00
Nyall Dawson
588a8fc9e9 Add unit test for changing appearance of style in a theme 2017-03-13 08:39:37 +10:00
Nyall Dawson
1e6bffe414 Allow setting map canvases to auto follow a map theme 2017-03-13 08:39:37 +10:00
Blottiere Paul
d10d67728a [BUGFIX] Embedded groups are empty 2017-03-12 12:50:27 +08:00
Juergen E. Fischer
7293c057fc windows test:
* skip options startup test (--help shows a message box on windows)
* avoid initial console help
2017-03-11 11:00:57 +01:00
Matthias Kuhn
fc92e2a63e Fix QgsXmlUtils reading list to variant and add test 2017-03-09 20:54:45 +01:00
Matthias Kuhn
0170580019 Save QgsProperty related objects via QVariants 2017-03-09 20:54:44 +01:00
Larry Shaffer
2af1e9f482 Skip WMS_GetPrint_SRS test in PyQgsServer, instead of commenting out
As per discussion with Alessandro Pasotti
2017-03-09 09:53:54 -07:00
Nyall Dawson
41d5f30961 [needs-docs] Attribute table "show selected features" shows no features
when none are selected

This change is being driven by performance - the "show selected" mode
can be used to speed up the attribute table loading for large layers.
The current behaviour (showing ALL features when none are selected)
breaks this performance benefit, because if users accidently open
the table with no selection then they are forced to wait for the
entire table to load (sometimes takes hours on large tables/slow
connections).
2017-03-09 09:03:11 +10:00
Nyall Dawson
95040c1b42 Follow up addition of new units 2017-03-09 06:46:53 +10:00
Matthias Kuhn
8b2180f379 Unit tests for mm/cm units 2017-03-08 11:37:20 +01:00
Matthias Kuhn
56163e2810 Modularize distance and area formatting 2017-03-08 11:36:28 +01:00
Nyall Dawson
e0979046a4 Merge pull request #4233 from myarjunar/test-toMapPixel
add unit test for toMapPoint function
2017-03-08 20:11:24 +10:00
Nyall Dawson
74381b85fa Add signal when a map theme changes, add tests 2017-03-08 16:56:05 +10:00
myarjunar
7e546c0382 add unit test for toMapPoint function 2017-03-08 12:07:20 +07:00
Alessandro Pasotti
99f859e2ac QgsSettings: removed lower(), now it's case sensistive 2017-03-06 10:51:54 +01:00
rldhont
9bb7681b86 Merge pull request #4124 from pblottiere/security
add unit tests for sql injection
2017-03-06 08:55:08 +01:00
Juergen E. Fischer
5a962e8d4e translation string fixes 2017-03-05 11:37:57 +01:00
Juergen E. Fischer
c77172ed3d fix more flake8 warnings 2017-03-05 10:21:24 +01:00
Nyall Dawson
346bfe499f Update for QgsSettings 2017-03-05 12:45:30 +10:00
Nyall Dawson
ccf8e6cdcb Indentation 2017-03-05 12:14:58 +10:00
Nyall Dawson
e1d80b5bbb Unvert "Ensure that full cache flag is cleared when invalid"
This is required - when the cache is invalidated it requires
a full rebuild (eg due to a new attribute being added) in order
to have complete information.

Since this could be a very lengthy process, it's not safe to
immediately rebuild the full cache. Instead, clear the full
cache flag and require users of this class to handle
responsive cache rebuilding by listening to the invalidated()
signal from the cache.
2017-03-05 12:04:05 +10:00
Nyall Dawson
1d504ea376 Revert 38f4a6f 2017-03-05 12:02:48 +10:00
Nyall Dawson
8a050deda9 Fix attribute table always fetches geometries for features
On behalf of Faunalia, sponsored by ENEL
2017-03-05 12:01:47 +10:00
Nyall Dawson
36f190ca0b Ensure that full cache flag is cleared when invalid
On behalf of Faunalia, sponsored by ENEL
2017-03-05 12:01:47 +10:00
Nyall Dawson
acaf97c79c Add (failing) test to ensure that attribute table doesn't fetch
geometry by default

(because performance)

On behalf of Faunalia, sponsored by ENEL
2017-03-05 12:01:47 +10:00
Nyall Dawson
dadd6133e0 Ensure both attribute table cache & master model request respect
geometry fetching

If request needs geometry but cache isn't fetching it then cache
is bypassed. This is a performance hit, so ensure that cache
and request are always in sync wrt to fetching geoms.

On behalf of Faunalia, sponsored by ENEL
2017-03-05 12:01:46 +10:00
Nyall Dawson
11c444466c Clear existing cache when QgsVectorLayerCache is set to cache geom
Any features inside the cache must be cleared, because they
won't necessarily have the feature's geometry cached

On behalf of Faunalia, sponsored by ENEL
2017-03-05 11:53:24 +10:00
Matthias Kuhn
56b4976225 Make test database setup more quiet 2017-03-04 16:02:57 +01:00
Matthias Kuhn
9c1e61d539 Disable flaky test_wms_getprint_srs test
See https://travis-ci.org/qgis/QGIS/jobs/207575956 for an example of a
failing test.
2017-03-04 08:21:30 +01:00
Mathieu Pellerin
f11eb3dca8 enforce lower-case qgssettings keys (#4218)
* enforce lower-case qgssettings keys

* add QgsSettings::remove() unit test
2017-03-04 15:50:20 +10:00
Nyall Dawson
651b5c6f76 Add a unit test for destroying canvas while a job is canceling 2017-03-04 14:26:57 +10:00
Juergen E. Fischer
0a1517bfaa header cleanups 2017-03-04 02:38:15 +01:00
Juergen E. Fischer
ecc5bb508e pep8/pyflakes3 cleanups 2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383 More QgsSettings updates:
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Juergen E. Fischer
96c31a1f0e remove python version checks 2017-03-03 17:41:58 +01:00