52582 Commits

Author SHA1 Message Date
Matthias Kuhn
c72e99a3ed
Make expression parser output translatable 2018-12-20 09:15:40 +01:00
Matthias Kuhn
06354ef71e
Fix expression parser error reporting 2018-12-19 16:36:14 +01:00
Denis Rouzaud
30b55cc68f
[locator] split words to get more results in all features locator filter (#8704)
* [locator] split words to get more results in all features locator filter

* Update src/app/locator/qgsinbuiltlocatorfilters.cpp

Co-Authored-By: 3nids <denis.rouzaud@gmail.com>

* Update src/app/locator/qgsinbuiltlocatorfilters.cpp

Co-Authored-By: 3nids <denis.rouzaud@gmail.com>

* Update src/app/locator/qgsinbuiltlocatorfilters.cpp

Co-Authored-By: 3nids <denis.rouzaud@gmail.com>
2018-12-19 08:54:31 -04:00
Denis Rouzaud
0e7427f8a3
Merge pull request #8711 from 3nids/sipify_out_super
[sipify] enhanced SIP_OUT handling
2018-12-19 08:15:17 -04:00
Denis Rouzaud
166e952c33 run sipify 2018-12-19 08:04:27 -04:00
Denis Rouzaud
03f801738d fix missing \returns in source 2018-12-19 08:04:17 -04:00
Denis Rouzaud
bd32078635 [sipify] enhanced SIP_OUT handling
return an error if method with SIP_OUT arguments has no \return directive AND is not void
create list of outputs for better visualization
2018-12-19 08:03:47 -04:00
Denis Rouzaud
a753f8b0dd
[expression builder] clear fields values when changing field (#8703) 2018-12-19 06:38:06 -04:00
Matthias Kuhn
0f037daf47
Merge pull request #8649 from qgis/expression_function_decode_uri
Expression function `decode_uri`
2018-12-19 08:32:09 +01:00
Alessandro Pasotti
56ca46efa9
Merge pull request #8706 from elpaso/bugfix-20674-dbmanager-aliased-3
Fix views query tables in spatialite
2018-12-19 07:43:48 +01:00
Denis Rouzaud
6bb0720bb7
Merge pull request #8708 from 3nids/sipify_sip_out
[sipify] handles SIP_OUT arguments
2018-12-18 22:08:42 -04:00
Denis Rouzaud
c20b5b2f75 fix multine removal for SIP_PYARGREOMVEq 2018-12-18 21:54:38 -04:00
Denis Rouzaud
32e844f9f8 fix multiline comments on out params 2018-12-18 17:29:04 -04:00
Denis Rouzaud
edfb7e1465 run sipify 2018-12-18 17:17:25 -04:00
Denis Rouzaud
9b852fbf35 [sipify] handles SIP_OUT arguments
remove them from parameters list and add them to return values
2018-12-18 17:17:18 -04:00
Nyall Dawson
514c5e2ac5 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPolygon()
is called on non-single-polygon geometries

Previously we would just return an empty list when geometries of invalid
type were used, but this is dangerous and we are safer to explicitly
raise errors preventing use of asPolygon() with incompatible geometry types.
2018-12-19 05:22:11 +10:00
Nyall Dawson
06d5f924f6 More square brackets 2018-12-19 05:21:49 +10:00
nirvn
3490217209 [FEATURE][expression] Enable use of square brackets to access map and array elements
Allows expressions like:

- array(1,2,3)[0] -> 1
- array(1,2,3)[2] -> 3
- array(1,2,3)[-1] -> 3 (Python style, negative indices count from end of array)
- array(1,2,3)[-3] -> 1
- map('a',1,'b',2)['a'] -> 1
- map('a',1,'b',2)['b'] -> 2
2018-12-19 05:21:49 +10:00
Alessandro Pasotti
07d9d1dbb8 Fix views query tables in spatialite
There is still an old issue: views are only available
through DB manager.

Fixes #20674 - again

- Life is really simple, but we insist on making it complicated.
Confucius
2018-12-18 18:32:14 +01:00
Matthias Kuhn
08965487dd
Double escape for JSON and C++ 2018-12-18 17:04:50 +01:00
Matthias Kuhn
10140b1ed1
Fix JSON escaping 2018-12-18 14:57:23 +01:00
Matthias Kuhn
2b5830ec9c
Function help improvements 2018-12-18 14:54:58 +01:00
Matthias Kuhn
13de14a114
Merge pull request #8663 from qgis/m-kuhn-patch-1
Hint where to find select features method
2018-12-18 14:21:00 +01:00
Matthias Kuhn
7a8939442f
Fix typo 2018-12-18 14:20:11 +01:00
Matthias Kuhn
d3a1285f63
Function help improvements 2018-12-18 14:18:43 +01:00
Matthias Kuhn
65e60d17aa
Add path to layer_property expression function 2018-12-18 13:47:46 +01:00
Matthias Kuhn
7b876d81f8
Fix test 2018-12-18 13:47:46 +01:00
Matthias Kuhn
3cee54cf25
Fix function help json 2018-12-18 13:47:46 +01:00
Matthias Kuhn
84584012ec
Add docs and tests for decode_uri 2018-12-18 13:47:46 +01:00
Matthias Kuhn
47fe5068c2
[FEATURE] Add decode_uri expression function
This function takes a layer parameter and an optional uri part parameter.
It will return details about the data source of the layer. The available
details depend on the data provider.
If called with only a layer parameter, a map will be returned with all the
available information. If the part is also specified, only the value for
the requested part will be extracted from the map.
2018-12-18 13:47:46 +01:00
Matthias Kuhn
a12bc5f865
Merge pull request #8694 from m-kuhn/gap_check_implicit_sharing
More implicit sharing of geometries
2018-12-18 13:32:53 +01:00
Matthias Kuhn
d6f434550e
Merge pull request #8693 from m-kuhn/raii_qgscoordinatetransform
RAII for QgsCoordinateTransform locking
2018-12-18 13:32:42 +01:00
Matthias Kuhn
1e34e75de5
Merge pull request #8692 from m-kuhn/fixSingleLayerErrors
Allow saving a layer after fixing invalid geometries
2018-12-18 13:32:16 +01:00
Nyall Dawson
7c0b68a990 Fix broken select/identify by polygon when layer CRS <> canvas CRS
Fixes #20786
2018-12-18 18:11:52 +10:00
Nyall Dawson
7d648e5b51 Improve Python __repr__ handling for null geometries
Also avoid massive long __repr__ strings for complex geometries,
as these can flood the Python console (and first aid plugin),
and aren't useful for debugging anyway.

Refs #14640
2018-12-18 18:11:22 +10:00
Peter Petrik
d072a13234 add MDAL formats info to README 2018-12-18 08:27:51 +01:00
Nyall Dawson
089a2f1c17 [FEATURE][layouts] Add new setting to control whether map items
should show partial labels

Layout map items no longer respect the default project setting
for "show partial labels", and instead have their own, per map
setting for this option. (Under the map item properties,
labeling settings button).

The map item setting always defaults to off (unlike the canvas
setting, which defaults to true for a new project) as layouts
should always default to the settings which produce the highest
quality cartographic outputs.

In general I suspect that most users would always want to avoid
rendering partial labels in layouts, but this setting was
previously so deeply hidden that most are unaware of how to
change it. (And previous discussion about changing the canvas
setting to hide partial labels deemed this default undesirable
for the canvas, where showing even a small part of a label
on the map border can help identify what sits just on/off
the edges of the map)
2018-12-18 15:32:29 +10:00
Nyall Dawson
524bc797a7 Move labeling settings button to map item toolbar 2018-12-18 10:31:24 +10:00
nirvn
1b98247414 Create icons for layout map item toolbar actions 2018-12-18 10:31:24 +10:00
Nyall Dawson
75b7d141ea [FEATURE][layouts] Add actions in map item properties to set map item
scale to match main canvas scale, and to set main canvas scale to
match map's scale

These mirror the existing settings for setting the extent from
the canvas and pushing the extent TO the canvas.
2018-12-18 10:31:24 +10:00
Nyall Dawson
cdd23e663e [needs-docs][layouts] Move pushbutton actions for map items up to
a toolbar in the map item properties panel

This moves the
- refresh preview
- set to map canvas extent
- view extent in map canvas

buttons from being oversized push buttons within the item properties
panel up to a new toolbar at the top of this panel. Apart from looking
better, it means these important actions are always visible regardless
of the scroll position of the item properties panel itself.
Additionally, it makes it possible to add MORE actions here without
overloading the UI (e.g. "set canvas extent to item extent")

TODO: better icons
2018-12-18 10:31:24 +10:00
Nyall Dawson
5acd7ffaef [processing] Add API to set default unit to distance parameters
Otherwise the API forces use of a corresponding CRS parameter in
order to determine the relevant distance unit, but this is not
always desirable
2018-12-18 04:39:06 +10:00
Nyall Dawson
9e1bf68902 [processing] Fix pixel centroids along lines handling of null geometries 2018-12-18 04:38:42 +10:00
Nyall Dawson
d1e9ce1f69 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPolyline()
is called on non-single-line geometries

Previously we would just return an empty list when geometries of invalid
type were used, but this is dangerous and we are safer to explicitly
raise errors preventing use of asPolyline() with incompatible geometry types.
2018-12-18 04:38:42 +10:00
Nyall Dawson
e2c482e5b0 [FEATURE] Allow creation of boolean fields when creating a new GPKG table
Booleans are supported by GPKG, so we should expose this functionality
2018-12-18 04:37:57 +10:00
Nyall Dawson
0295d9ca3f Add icon field boolean field type 2018-12-18 04:37:57 +10:00
Nyall Dawson
645ca2b351 [ogr] Fix conversion of boolean values
Fixes #20290
2018-12-18 04:37:57 +10:00
Nyall Dawson
4131e0b303 [layouts] Fix selected items appear in bold in all widgets
instead of just the items list panel

E.g. we don't want selected items to show in bold in the item
combo boxes
2018-12-18 04:37:17 +10:00
Matthias Kuhn
d77c74a2a4
More implicit sharing of geometries
Because massive cloning preemptively only makes sense when you want to fight the universe like in star wars.
2018-12-17 17:41:58 +01:00
Matthias Kuhn
1730a40a82
RAII for QgsCoordinateTransform locking
I experienced a freeze where the main thread was stuck in QgsCoordinateTransformPrivate::freeProj(), waiting for a write lock.
None of the other threads had anything useful in their stack trace that would have explained why the lock was not available.
The only explanation I can come up with is that an exception or thread termination was messing with the lock, leaving it in a
locked state.
By using RAII we can avoid this scenario.
2018-12-17 17:26:57 +01:00