6268 Commits

Author SHA1 Message Date
Matthias Kuhn
cdc7d39a14 Refactor QgsFeaturePool
QgsFeaturePool is now an abstract baseclass, with a new inherited class QgsVectorDataProviderFeaturePool. This allows creating other subclasses, most notably a QgsVectorLayerFeaturePool subclass, that is able to also work on uncommitted features.

Critical calls to methods which are not threadsafe have been protected by executing them on the main thread.
2018-09-05 16:22:53 +02:00
Peter Petrik
c89b7722a3 fix review items from Nyall 2018-09-05 09:00:30 +02:00
Matthias Kuhn
63630410fd qgsvectorlayer.h includes 2018-09-05 08:54:32 +02:00
Matthias Kuhn
17279a42e2 Only include qgsvectorlayer.h where required 2018-09-05 08:54:11 +02:00
Matthias Kuhn
f875bb77b4
Merge pull request #7792 from m-kuhn/threadsafefeaturesource
Add threadsafe method to get featuresource from layer
2018-09-05 08:13:44 +02:00
Matthias Kuhn
26626ea3d8 Fix test 2018-09-05 06:42:51 +02:00
Matthias Kuhn
e23167ee3d
Fix some test issues 2018-09-05 05:32:37 +02:00
Nyall Dawson
f79d86edab [processing] Port string widget wrapper to new c++ class 2018-09-05 13:14:50 +10:00
Nyall Dawson
e10d16e1da
Merge pull request #7659 from lbartoletti/reverseLine
[needs-docs][FEATURE] Add reverse line maptools AKA swap direction
2018-09-05 08:59:49 +10:00
Nyall Dawson
d449d41503 Don't crash when writing invalid variants via QgsXmlUtils 2018-09-05 08:11:48 +10:00
Nyall Dawson
0b4694fbee More efficient case insensitive string comparison 2018-09-05 07:54:35 +10:00
Matthias Kuhn
75bb5c40a7 Add test for QgsVectorLayerUtils::getFeatureSource 2018-09-04 22:07:33 +02:00
Nyall Dawson
8af1c3f9f0 Respect nodata values in ::sample() for gdal provider 2018-09-05 05:24:51 +10:00
Luigi Pirelli
580ecafa32
Merge pull request #7396 from luipir/rastercalculator_model_fix
[processing] Rebirth RasterCalculator in Modeler. Fixes #19302
2018-09-04 18:13:04 +02:00
Nyall Dawson
d563034583 Address review comments 2018-09-04 19:06:07 +10:00
Nyall Dawson
e76b761dd0 Correctly associate layer with dynamic properties 2018-09-04 19:06:07 +10:00
Nyall Dawson
70c1680754 Automatically handle adding data defined button for dynamic properties
Also exposes this capability to modeler - so that model algorithms
can use data defined parameters within their child algorithms.

TODO:
- tests
- setting the associated vector layer
2018-09-04 19:06:07 +10:00
Nyall Dawson
a717b85e2e [FEATURE][processing] New modeler parameter widget
A new widget which handles parameter values for child algorithms
within a model. Instead of the previous approach of requiring
individual widget wrappers to handle creation of a suitable
model widget, we do all this automatically for them.

This widget uses a stacked widget with a toolbutton to select
the parameter's source, instead of the previous combo box approach
(which didn't scale well for large models). I.e. users select
first whether the value is taken from a static value, a
model input, or an output from a different child algorithm. The
widget then changes appearance and behavior based on this
choice.

Additionally, a new option is present for all parameters
of using a "precalculated expression". This expression is
evaluated once before the child algorithm is executed
and used during the execution of that algorithm.
2018-09-04 19:06:07 +10:00
Nyall Dawson
644ef6a752 [processing] Initial work on porting base GUI classes to c++
- Add abstract base class for Processing widget wrappers to c++
- Add wrapper factory interface to c++
- Make QgsProcessingGuiRegistry also register widget wrapper
factories, and be responsible for creation of new c++
processing widget wrapper instances
- Start on private c++ implementation of boolean widget wrapper,
including unit tests
2018-09-04 19:06:07 +10:00
nirvn
5cd28034bd address comments, fix test 2018-09-04 10:07:07 +07:00
nirvn
48b18d4c6c [processing] add parameterAsInts function 2018-09-04 10:07:07 +07:00
nirvn
13ecaa4190 [needs-docs][processing] Add a multiple selection mode to the band parameter 2018-09-04 10:07:07 +07:00
Stéphane Brunner
b49485839f
Merge pull request #7776 from pvalsecc/empty_filter
[Server] Add support for empty OGC WMS filters
2018-09-03 16:36:35 +02:00
Peter Petrik
6ee9a47463 [mesh] [feature] allow render vectors/arrows on the user-defined grid 2018-09-03 16:31:35 +02:00
Patrick Valsecchi
da58c1d7cf Add support for empty OGC WMS filters
The FILTER query parameter can now look like that:
`(<Filter>...</Filter>)()`

That means that the second layer has no filter. This is compliant with
waht MapServer supports:
https://mapserver.org/development/rfc/ms-rfc-118.html#examples
2018-09-03 15:36:43 +02:00
Luigi Pirelli
6068c199e4 added check for outputChildId 2018-09-03 13:58:02 +02:00
Hugo Mercier
a80117b8b9
Merge pull request #7724 from agiudiceandrea/patch-fix-19636
Fix "Filter on joined fields": add geometry for spatial layer and handle special field/layer names
2018-09-03 13:57:29 +02:00
nirvn
9af405c9ae [layout] Set default legend item title to an empty string 2018-09-03 17:37:46 +07:00
Peter Petrik
199f4effb6 fix tests for mesh layer 2018-09-03 19:41:07 +10:00
Nyall Dawson
74e6e15d9e [processing] Add test to ensure that model child algorithm parameters
which are set to dynamic values are preserved across save/restore
2018-09-03 05:47:12 +10:00
Nyall Dawson
3572ea80bd Make QgsXmlUtils handle storing/retrieving QgsProperty values 2018-09-03 05:47:12 +10:00
Alessandro Pasotti
d0026d1a23
Merge pull request #7769 from elpaso/bugfix-19695-qlocale-permissive-input
Bugfix 19695 qlocale permissive input
2018-09-02 10:16:23 +02:00
Alessandro Pasotti
069dc1b6d9 Fix test 2018-09-02 09:42:16 +02:00
Alessandro Pasotti
bb01ef3456 Add qgsPermissiveToLongLong 2018-09-01 18:01:23 +02:00
Alessandro Pasotti
0b35147a92 Fields: be permissive when parsing formatted numbers 2018-09-01 17:59:56 +02:00
Alessandro Pasotti
3a0899dbcd Add os import 2018-09-01 19:47:59 +10:00
Alessandro Pasotti
6d6871ca55 Skip test on travis and fix test case 2018-09-01 19:47:59 +10:00
Alessandro Pasotti
e8ca9a24ca Add spellok 2018-09-01 19:47:59 +10:00
Alessandro Pasotti
4ad0bbb1d1 [test] Add ParentDependsOnSubTask subtask test case 2018-09-01 19:47:59 +10:00
Nyall Dawson
e0fa9eb9cf Add QStringLiteral(), QStringLiteral( "" ) and QLatin1String( "" )
to banned keywords

And replace use with QString()
2018-08-31 12:31:27 +10:00
Nyall Dawson
d683550b88 Fix crash when tasks are canceled before starting
Avoids an attempt to unlock an already unlocked mutex,
which causes a crash. Should fix a number of crash report
tickets...
2018-08-31 06:52:23 +10:00
Loïc Bartoletti
a7b6bdba8c use epsg and fix circularstring test on linux 2018-08-30 10:01:50 +02:00
Nyall Dawson
e5e14dd680 Fix is_closed (and other expression functions) fail with multi* input geometries
Fixes #19704
2018-08-29 14:52:39 +10:00
rldhont
65f4bf1956
Merge pull request #7514 from rldhont/server-cache-manager
[Server][Feature][needs-docs] Server cache manager and WMTS service
2018-08-28 18:05:42 +02:00
Luigi Pirelli
6aa36166e4 adapted tests to new variables added in expressionContext 2018-08-28 17:06:10 +02:00
Andrea Giudiceandrea
1971f8accd
Fixing intentation 2018-08-27 14:58:06 +02:00
Andrea Giudiceandrea
05fda10363
Filter on joined fields: add geometry for spatial layer and handle sp…
…ecial field/layer names

Fixes #19636

"Filter on joined fields" does not work properly in the following two circumstances:

- when the (original) layer is a "spatial layer": the virtual layer created is an attribute only / non-spatial layer, instead of a spatial one

- when at least a field name or a layer name starts with a digit or contains white spaces (or probably also other special characters): the virtual layer is not created at all (actually is created and instantly deleted) without warning the user

This fixes both and also updates the related tests accordingly and adds another test.* Enclose field/layer names in double quotes.

See also [QGIS-Developer] "Filter on joined fields" and Virtual layers not working as expected

More details: https://issues.qgis.org/issues/19636#note-13
Projects and layers to test the bugs: https://issues.qgis.org/attachments/download/13196/test_filter_qgis.zip
2018-08-27 14:33:10 +02:00
Nyall Dawson
ff9e3890e0 [needs-docs] Rename map_layers_ids to map_layer_ids
It's more natural grammar
2018-08-27 14:43:02 +10:00
Nyall Dawson
820c40ac9d [FEATURE] map_layers variable for layout map items
Just like map_layers_ids, but returns direct layer values instead
of ids
2018-08-27 14:43:02 +10:00
lbartoletti
87fb27fddb
Merge branch 'master' into reverseLine 2018-08-27 06:30:16 +02:00