6559 Commits

Author SHA1 Message Date
Nyall Dawson
ed35ad9ca7 Unify sqlite string quoting functions to a single QgsSqliteUtils::quoteString
function, with tests
2018-10-07 17:36:40 +10:00
rldhont
bc7cea2e3e [Server][Cache] Extending and enhancing cache manager tests 2018-10-06 10:25:20 +02:00
Nyall Dawson
81db0052ff [mssql] Fix single geometry types are added to multi geometry type layers
Fixes #10793
2018-10-06 06:06:05 +10:00
Alessandro Pasotti
29c4970f8a [processing] In-place add layer name to dlg title and store active layer 2018-10-05 10:10:20 +02:00
Alessandro Pasotti
ca1c65d07a [processing] In place editing triggers editing and select all
If the active layer is not editable, the executor will
try to switch editing on.

If there are no selected features, the executor will
select all features before running.
2018-10-05 08:53:30 +02:00
Alessandro Pasotti
223a87fbc5
Merge pull request #8121 from nyalldawson/no_boundary
Boundary alg cannot run in-place mode
2018-10-05 08:51:05 +02:00
Nyall Dawson
2f89139ce3 Fix up test 2018-10-05 16:00:36 +10:00
Nyall Dawson
3fc0e69fb3 [mssql] Add unit test for #15305 2018-10-05 16:00:36 +10:00
Nyall Dawson
a6ae6c1702 Add a provider test for a crash experienced in SQL Server provider 2018-10-05 16:00:36 +10:00
Nyall Dawson
57fcf439ba Boundary alg cannot run in-place mode 2018-10-05 15:44:51 +10:00
Nyall Dawson
10095ce0ef [mssql] Compile some simple expression functions
Should speed up lots of querying operations on sql server layers
2018-10-05 11:34:49 +10:00
Nyall Dawson
1d9086c75d [mssql] Allow compilation of int div expressions 2018-10-05 11:34:49 +10:00
Nyall Dawson
3df8c75db8 [mssql] Update list of uncompilable expressions 2018-10-05 11:34:49 +10:00
Nyall Dawson
234985b59d [needs-docs][labeling] Fix substitutions don't play well with wrapped labels
Fixes an issue identified in the upcoming QGIS Map Design 2nd ed
(spoiler alert!) where it's impossible to utilise label text
substitutions if you also want to use word wrapping.

This isn't possible to directly fix, because we need to evaluate
the full label expression (including the word wrapping component)
in order to actually HAVE text to substitute into.

So, a new setting has been added to the label formatting tab
allowing users to directly set an auto-wrapping line ideal
line size. This is applied AFTER label text evaluation, substitutions,
and the 'wrap text on' character, so it can play correctly well with
all these other settings. This also has the nice side-effect
of making auto label text wrapping more accessible to new
users/those unfamiliar with the wordwrap expression function.

Fixes #20007, and cleans up a chapter of QMD 2ed ;)
2018-10-05 06:58:56 +10:00
Nyall Dawson
dce8673d21 Move guts of wordwrap expression function to QgsStringUtils::wordWrap
To allow use outside of expressions
2018-10-05 06:58:56 +10:00
Nyall Dawson
f3779589c6 [mssql] Fix conversion of time values
At least using the linux sql server driver, time fields are not
correctly automatically converted to QTime variants. Instead
they are returned as a raw byte array containing the value.

Add special handling to ensure that these time values are
read regardless.

(there's already a test in place for this, which was failing
on Linux)
2018-10-04 12:46:28 +10:00
Philipe Borba
e375d1ddd7 [BUG FIX][Split Tool] Bug fix for split features tool
Fixes #19936 by prioritising existing attributes over provider side defaults in some circumstances
2018-10-04 06:19:55 +10:00
Nyall Dawson
14b6843293 Update expected test results 2018-10-04 06:15:38 +10:00
Nyall Dawson
297dbe0786 Fix ellipsoidal area calculation 2018-10-04 06:15:38 +10:00
Larry Shaffer
a74d797517
Merge pull request #8072 from dakcarto/opencl-clhpp
[opencl] Add FindOpenCLhpp CMake module; vendor cl2.hpp; fixup includes
2018-10-03 13:38:47 -06:00
Matthias Kuhn
0319e36c63
Merge pull request #8054 from m-kuhn/geometryCheckPyBindings
Python bindings for QgsGeometryCheck and co
2018-10-03 14:36:48 +02:00
Nyall Dawson
72432246a1 [mssql] Fix test data creation script 2018-10-03 04:50:05 +10:00
Matthias Kuhn
b3f36dc22f
Merge pull request #8056 from qgis/3nids-patch-3
use float precision for screen coordinates
2018-10-02 14:04:50 +02:00
Alessandro Pasotti
b48a429c63 Remove redundant test 2018-10-01 15:09:49 +02:00
Alessandro Pasotti
a68a82cb60 qgsVariantEqual second iteration 2018-10-01 14:59:19 +02:00
Alessandro Pasotti
90e2c45502 Add qgsVariantEqual for null-aware comparison 2018-10-01 14:02:09 +02:00
Alessandro Pasotti
6574e69292 Fixes value relation widget 0 indexed related items
Fixes #19981 - Value relation, value 0 = NULL
2018-10-01 10:41:20 +02:00
Julien Cabieces
ee4afe2db1 Fixes #19836
Keep layer order when using different way for passing layer (layer id or layer pointer for instance)
2018-10-01 14:17:04 +10:00
Larry Shaffer
81f9e6dfec
[opencl] Add FindOpenCLhpp CMake module; vendor cl2.hpp; fixup includes
CL/cl2.hpp, which the OpenCL support is based upon, is not always
included with OpenCL on some platforms, e.g. Mac, or not readily
available as a package. This work adds a CMake module specifically for
finding cl2.hpp, as installed by OpenCL-CLHPP project.

If not found, but standard OpenCL lib and headers are, the vendored
cl2.hpp in external/opencl-clhpp is used, as it needs no compilation.

- Only the cl2.hpp, license and README are vendored from OpenCL-CLHPP.

- Fix up referenced includes in other CMake targets, to ensure the
includes for OpenCL are specifically added (previously, they were
sometimes found in existing include directories of other dependencies).

- Fixup for standard FindOpenCL module not assinging proper framework
headers directory for Mac.
2018-09-30 20:05:12 -06:00
rldhont
ad7d03c64f
Merge pull request #7859 from rldhont/fix-server-sld-param-support
[Bugfix][Server] Add WMS SLD parameter support
2018-09-29 18:10:54 +02:00
Denis Rouzaud
157ba0f4be QgsMapToPixel API cleanup
* overload toMapCoordinates to also take double (use different PyName)
* deprecate toMapPoint which is strictly equivalent to toMapCoordinates
2018-09-29 11:05:54 -04:00
Alessandro Pasotti
b395488b4f
Merge pull request #8052 from elpaso/bugfix-19930-spatialite-query
Fix spatialite queries without pk
2018-09-29 08:02:47 +02:00
Nyall Dawson
6110931f8a Rename QgsSpatialIndex::insertFeature to ::addFeature, for consistency
with other classes

And make QgsSpatialIndex a QgsFeatureSink
2018-09-29 07:37:53 +10:00
Blottiere Paul
63f597f934
Merge pull request #8040 from pblottiere/server_highlight_line
[server] Fixes #19906 - GetMap request with line in the SLD is correctly rendered
2018-09-28 17:07:26 +02:00
Matthias Kuhn
bee5470e10
Python bindings for QgsGeometryCheck and co
Adds

 - python bindings
 - geometry check factory
 - geometry check registry
 - QgsFeedback for geometry checks (lots of potential still)
 - An IsValid geometry check
 - Splits classes into their own files
 - Decouples feature pools from the configuration context
2018-09-28 13:33:24 +02:00
Alessandro Pasotti
a02d448ba6 [spatialite] Fix pk-less queries cannot be retrieved by id
Fixes #1993 - Zoom to feature" does not work

This actually fixes many more bugs related with the
QGIS generated feature id (incremental) when using
queries that was not consistent when using
QgsFeature request with ids or bbox.

This is not a regression: the same error is in 2.18
2018-09-28 10:29:23 +02:00
Blottiere Paul
5496442ca1 Add mask image 2018-09-28 08:42:18 +01:00
Nyall Dawson
68426d641d Add missing file 2018-09-28 14:25:38 +10:00
Nyall Dawson
308d7136b4 [processing] More fixes to convertToCompatibleFormat, lots of unit
tests

Fixes #19938
2018-09-28 14:25:38 +10:00
Nyall Dawson
39d148612b Optimise conversion of geometry from OGR -> QGIS
Avoid conversion to/from WKB at OGR/QGIS side, and just directly
utilise OGR geometry API to construct QGIS geometries.

Shaves ~10% off rendering time for a large point layer (GPKG)
2018-09-28 13:17:12 +10:00
Nyall Dawson
2f214c66fa Fix qgis_bench 2018-09-28 13:17:12 +10:00
Harrissou Sant-anna
b478ee750c Fix "Array of offset lines" algorithm 2018-09-28 10:19:31 +10:00
Harrissou Sant-anna
9e5cc4b76b Fix array of translated features algorithms 2018-09-28 10:19:31 +10:00
rldhont
34009d3fb9 [Tests][Server] Add test for WMS SLD parameter and move SLD_BODY test 2018-09-27 21:08:33 +02:00
rldhont
c15f05b4c9 [Bugfix][Server] Add WMS SLD parameter support
Fixed #19795 QGIS Server 3 / WMS: the SLD parameter support has been removed

To reactivate SLD parameter support, we add a new conversion capability in server parameter `toUrl`. And the capabilty to load the content associted to an URL.

Then if the SLD parameter is defined, the content is loaded and the SLD_BODY is set.
2018-09-27 21:08:33 +02:00
Blottiere Paul
210a1fe1e7 Update unit test 2018-09-27 16:25:29 +01:00
Denis Rouzaud
bb81f71dcd
remove dependency on qgis_gui from native tests 2018-09-27 09:43:26 -04:00
Matthias Kuhn
2275853ce6
Merge pull request #8008 from m-kuhn/missingVertexCheck
Add QgsGeometryMissingVertexCheck
2018-09-27 10:50:27 +02:00
Matthias Kuhn
3c379d36e6
Fix test 2018-09-27 10:12:08 +02:00
Martin Dobias
8831f19b79 Fix missing indicators after they are moved to a different group
The issue was that during drag&drop, we first connect to layer's signal
for the second time, but then the disconnect() call on removal of the original
layer node would disconnect all connections (not just one). For that reason
now we only connect/disconnect when the layer is in the tree only once.
2018-09-27 00:46:37 +02:00