52519 Commits

Author SHA1 Message Date
Alessandro Pasotti
1ff3ddc61c
Merge pull request #8676 from elpaso/bugfix-20674-dbmanager-aliased-2
fix spatialite aliased, nested, joined queries
2018-12-15 14:54:55 +01:00
Alessandro Pasotti
e83e794016 spatialite: Add more test cases for table names with spaces 2018-12-15 11:08:05 +01:00
Alessandro Pasotti
8a0a745677
Merge pull request #8677 from troopa81/hidden_column
Correct the column hide/show status that was not saved anymore
2018-12-15 09:26:33 +01:00
Nyall Dawson
13e7186493 Wording 2 2018-12-15 11:28:56 +10:00
Nyall Dawson
63a5ebf57c Wording update 2018-12-15 11:28:56 +10:00
Nyall Dawson
8d7e21fc6d Test mask updates 2018-12-15 11:28:56 +10:00
Nyall Dawson
cd762da817 Doxygen 2018-12-15 11:28:56 +10:00
Nyall Dawson
d8eac4797e [FEATURE][API] Add method to QgsMapSettings for specifying label blocking regions
These represent areas of the map where NO labels should be placed
2018-12-15 11:28:56 +10:00
Nyall Dawson
ed25a3e2ee [FEATURE][layouts] Add setting for label margin for map items
This setting allows per-map control of how close labels are permitted
to be placed to the map item's edges.

Sizes can be set using mm/inches/pixels/etc, and data defined
label margins are allowed.

Fixes #10314
2018-12-15 11:28:56 +10:00
Nyall Dawson
35855b88e1 [FEATURE][API] Add API to set a margin for labels for layout map items
This controls how close labels are permitted to the edges of the map
item. The labeling engine will then try other candidate positions
in order to avoid placing labels within this margin.
2018-12-15 11:28:56 +10:00
Nyall Dawson
4252aabe00 [FEATURE][API] Add option to specify a custom boundary geometry
in QgsMapSettings to restrict where labels are allowed to be placed
within.

If set, this overrides the default behavior of allowing labels to
be placed anywhere inside the rendered map extent.
2018-12-15 11:28:56 +10:00
Nyall Dawson
abc7b037d8 [needs-docs][processing] Output count of retained and duplicate features from
Delete duplicate geometries algorithm.

This matches the output of the delete duplicates by attribute
algorithm
2018-12-15 10:44:33 +10:00
Nyall Dawson
82c13bdde0 [processing] Fix error when running delete duplicate geometries and
some input features have null geometries

Fixes #20788
2018-12-15 10:44:33 +10:00
Nyall Dawson
5c2f68e769 [processing] Throw error when attempting to use Distance Matrix with
multipoint datasets

There's no single approach to use for multi-point inputs, so instead
of overloading this algorithm with extra options to control how these
are handled, we raise a helpful error and push the reponsibility back
to the user to get the data into the right format before running the
tool.

Fixes #20799
2018-12-15 10:36:44 +10:00
Nyall Dawson
1285a01c64 Correctly test processing auth widget with real authentication setup 2018-12-15 08:23:10 +10:00
Nyall Dawson
56bd682d96 Avoid duplicate changed signals thrown by QgsAuthConfigSelect 2018-12-15 08:23:10 +10:00
Nyall Dawson
11ea28a5b3 [FEATURE][processing] Add a new parameter type for authentication config
This adds a new available parameter type for processing algorithms,
QgsProcessingParameterAuthConfig, allowing selection from available
authentication configurations (and creation of new ones).

It allows creation of processing algorithm which can fully take
advantage of QGIS' mature authentication handling, avoiding the
need to use insecure string parameters for users to input
sensitive logon credentials.

QgsProcessingParameterAuthConfig parameters are evaluated using
QgsProcessingAlgorithm.parameterAsString(), which returns the
selected authentication configuration ID.
2018-12-15 08:23:10 +10:00
Nyall Dawson
8f06b5a996 [ux] Remove custom group box styling and option for QGIS styled group boxes
This setting is causing issues on newer operating systems, e.g. MacOS
on dark themes. It's a 6 year old workaround for styling issues
which have likely since been fixed in Qt and the DEs themselves.
2018-12-15 08:22:42 +10:00
Nyall Dawson
0ca9777755 [api] Raises ValueError and TypeError exceptions when QgsGeometry.asPoint()
is called on non-single-point geometries

Previously we would just return QgsPointXY(0,0) when geometries of invalid
type were used, but this is dangerous and we are safer to explicitly
raise errors preventing use of asPoint() with incompatible geometry types.
2018-12-15 07:40:33 +10:00
Julien Cabieces
8446119aaa Correct the column hide/show status that was not saved anymore 2018-12-14 15:56:47 +01:00
Alessandro Pasotti
d4439b25c0 Fix spatialite exotic query layers (aliased, nested, joined ...)
Fixes #20674 (again)

“It does not matter how slowly you go as long as you do not stop.”
― Confucius
2018-12-14 15:10:01 +01:00
Alessandro Pasotti
3618d63ca6 Show an error message when a query yields an invalid layer
... instead of failing silently
2018-12-14 15:09:46 +01:00
Denis Rouzaud
9e5bb360f9
make QgsGeometry::isNull Q_INVOKABLE (#8667) 2018-12-14 07:41:57 -04:00
Juergen E. Fischer
d2c5864618 typo fix 2018-12-14 12:05:15 +01:00
Nyall Dawson
32e484c7e0 Apply suggestion.
Co-Authored-By: nirvn <nirvn.asia@gmail.com>
2018-12-14 15:14:44 +07:00
nirvn
c714652e30 Disable in-session change of UI theme for Qt < 5.12
Random crasher associated with UI theme change is an
upstream bug, in the meantime let's make sure people don't
lose data crashing QGIS with an unsaved project.
2018-12-14 15:14:44 +07:00
nirvn
36d363317f Pass on the theme style data directly instead of a file:///...
Benefit: remove requirement to have write permission for the
theme directory.
2018-12-14 15:14:44 +07:00
Alessandro Pasotti
e58abfd0d6
Merge pull request #8666 from elpaso/opencl-rastercalc-float-cast
opencl rastercalc fix int input rasters and cast to float
2018-12-14 09:04:10 +01:00
Luigi Pirelli
5b7f808c1b
Merge pull request #8665 from hareldunn/patch-1
fix function call in example
2018-12-13 18:51:04 +01:00
Alessandro Pasotti
b71a668a08 opencl rastercalc fix int input rasters and cast to float
Cast to float all math operations because when the
input is not a float or a double opencl raises
an error regarding which override should pick.

By casting to float we are sure that the right
function will be called.

This patch also fixes the buffer sizes for short (16bit)
and int (32bit) and asserts that siexe of float is 32bit.
2018-12-13 18:36:47 +01:00
Harel Dan
1c74e0b04d
fix function call in example 2018-12-13 18:18:04 +02:00
Alessandro Pasotti
8c07c994fc
Merge pull request #8657 from elpaso/bugfix-20743-badlayers-dirty
Decent workaround to dirty a project after bad layer handling
2018-12-13 14:58:32 +01:00
Alessandro Pasotti
0042cc0f33 Mark project dirty when bad layers have changed
Fixes #20743
2018-12-13 11:39:42 +01:00
Alessandro Pasotti
a395affff8
Merge pull request #8660 from elpaso/bugfix-20789-QgsReadWriteLocker-moab-2
Fix QgsReadWriteLocker changeMode
2018-12-13 08:15:12 +01:00
Nyall Dawson
44bbf1f137 Dox++ 2018-12-13 10:11:24 +10:00
Nyall Dawson
591bb756dc [layouts] Fix first background map render can never be canceled
and must always complete

This fixes an issue where map items appear to get "stuck" showing the
"Rendering map" text while the very first render of the map
item completes. If the map render is lengthy (e.g. due to
complex labeling and an initially too small map scale), then
it can appear as if the map item has got stuck.

Instead, we now correctly support cancelation of this initial
map render job, just like we do subsequent ones.
2018-12-13 08:35:45 +10:00
Alessandro Pasotti
b0d1506b72 Fix QgsReadWriteLocker changeMode
since mMode was never updated, the lock
was never toggled from read to write or
vice-versa.

This was leading to crashes because the
paths that were meant to be serialized
and thread safe were not.

Fixes #20789 and probably many more
random crashes where QgsFeaturePool
was used.
2018-12-12 18:51:22 +01:00
Denis Rouzaud
6d34089a82
avoid freeze with multiple layers locator search (#8650)
* avoid freeze with multiple layers locator search

if the project had many searchable layers, a freeze occured when running the all features locator filter
the feature iterator was created in prepare (main thread) and the maximum number of connection was reached

* fix leak + clear former prepared layers

* avoid copy in loop

* declare ptr earlier
2018-12-12 11:00:09 -04:00
Alessandro Pasotti
969b7894de
Merge pull request #8658 from elpaso/bugfix-20783-crash-when-unzipping-corrupted-zip
Do not crash when zipped project is not a valid zip
2018-12-12 15:28:37 +01:00
Alessandro Pasotti
9ca85f72c3 Do not crash when zipped project is not a valid zip
Fixes #20783 - Crash when opening qgz project
2018-12-12 13:48:00 +01:00
Alessandro Pasotti
6de0160fb5
Merge pull request #8647 from elpaso/opencl-options-opt-in
Defer opencl initialization after user has opted-in in settings
2018-12-11 20:49:01 +01:00
Matthias Kuhn
4e38193bf3
Merge pull request #8627 from m-kuhn/represent_class_values
Use represention values for classified renderers [FEATURE]
2018-12-11 16:44:17 +01:00
Alessandro Pasotti
2d63f24e31 Defer opencl initialization after user has opted-in in settings
Prevents a crash from #20363, actually deferring the crash
after the user has opted-in, btw the options is not stored
unless the user close the dialog, so a QGIS restart would
restore the status prior to the crash.

I've not been able to reproduce the crash on my windows
machines so I could not really get to the bottom of it,
this is just a workaround that should prevent the immediate
crash when opening the settings dialog.
2018-12-11 12:25:05 +01:00
nirvn
c21597a327 [ui] Better visual queue for non-visible layers in the tree 2018-12-11 17:35:59 +07:00
Matthias Kuhn
ad2a5cb626
Code styling 2018-12-11 10:42:44 +01:00
Matthias Kuhn
1d3e7d46d9
Add test for QgsCategorizedSymbolRenderer::createCategories 2018-12-11 09:48:16 +01:00
Matthias Kuhn
bec04c1e44
Merge pull request #8600 from signedav/fix_gpkg_order
Offline editing to GPKG attribute order. Fixes #20276
2018-12-11 08:55:51 +01:00
nirvn
54f28dfbb9 [afs] Basic parsing capacity for label expressions 2018-12-11 12:54:00 +07:00
nirvn
9d5a221ee9 [afs] Fix parsing of multi-field unique value renderer 2018-12-11 12:54:00 +07:00
Nyall Dawson
0659427ff7 Dox++ 2018-12-11 12:28:29 +10:00