43907 Commits

Author SHA1 Message Date
Matthias Kuhn
48e8656f17 Code improvement 2017-11-15 08:51:17 +01:00
Matthias Kuhn
4d20a395f4 Avoid recreating spatialite handles 2017-11-15 08:51:17 +01:00
Matthias Kuhn
124f3df10d Use member functions over sqlite3 api 2017-11-15 08:51:17 +01:00
Matthias Kuhn
716ed6b7d9 Prevent memory leaks 2017-11-15 08:51:17 +01:00
Matthias Kuhn
447cd18a27 Improve chances for copy elision 2017-11-15 08:51:17 +01:00
Matthias Kuhn
2b6d1f8882 Move spatialite context management to deleter 2017-11-15 08:51:17 +01:00
Matthias Kuhn
43329f50d6 Const correctness for sqlite_database_unique_ptr 2017-11-15 08:51:17 +01:00
Matthias Kuhn
c5667db9f4 Switch geopackage dataitem to RAII sqlite3 2017-11-15 08:51:17 +01:00
Matthias Kuhn
a58ff72387 Switch QgsStyle to RAII sqlite3 2017-11-15 08:51:17 +01:00
Matthias Kuhn
cf1ace897b Switch map layer to RAII sqlite3 2017-11-15 08:51:17 +01:00
Matthias Kuhn
c713878a4e Switch new spatialite layer dialog to RAII spatialite 2017-11-15 08:51:17 +01:00
Matthias Kuhn
2aed700b16 Release spatialite context when a spatialite_database_unique_ptr scopes out 2017-11-15 08:51:17 +01:00
Matthias Kuhn
5c12430b04 Use sq/spatialite unique_ptrs in QgsMapLayer and QgsOfflineEditing 2017-11-15 08:51:17 +01:00
Matthias Kuhn
28f13778ee Switch more places to using spatialite_database_unique_ptr 2017-11-15 08:51:17 +01:00
Matthias Kuhn
4df65aca37 Use std::unique_ptr with custom deleter for spatialite and sqlite 2017-11-15 08:51:17 +01:00
Alessandro Pasotti
340f7abbb0
Merge pull request #5616 from boundlessgeo/datasource-manager-add-close
[gui] Datasource manager remove Ok and add Close
2017-11-15 08:47:23 +01:00
Salvatore Larosa
5a4ace10e9 [dbmanager] defines correctly super class 2017-11-15 08:30:58 +01:00
Alexander Bruy
b95588cf58
Merge pull request #5603 from medspx/ProcessingGrassFixDescR
[processing] GRASS7 provider: review and update all r.* description files.
2017-11-15 08:31:49 +02:00
matteo
c321700ada [processing] test for union algorithm 2017-11-15 11:27:30 +11:00
matteo
2d188e95cd processing Union fix 2017-11-15 11:27:30 +11:00
Nyall Dawson
b0c13da854 Fix exception in find projection algorithm 2017-11-15 11:27:30 +11:00
Nyall Dawson
dd15d4ef59 Cleanup layer options arrangement 2017-11-15 10:14:47 +11:00
Nyall Dawson
de7b33a373 [needs-docs] Remove option to show raster preview icons in layer tree
This option is not safe - see #16803, and generally undesirable
due to how slow generating the preview icons are
2017-11-15 10:14:47 +11:00
Salvatore Larosa
5d8963a4a8 Fixes #17466: DB Manager does not refresh correctly map in layer preview 2017-11-14 22:46:58 +01:00
Even Rouault
3b2b98b012 [GDAL provider] Use same underlying GDAL dataset for clone() (fixes #16006)
This will improve efficiency of GDAL block cache during raster rendering,
since the cached blocks are only valid during GDALDataset instance lifetime.
2017-11-14 21:03:22 +01:00
Alessandro Pasotti
b1eb6c0bc6 [auth] Moved the PEM/DER sniffing to a common private function 2017-11-14 19:07:51 +01:00
Alexander Bruy
d8398400f9 correctly create new function file (fix #16752) 2017-11-14 19:53:40 +02:00
Alessandro Pasotti
1a17b90026 Disable PG test 2017-11-14 17:58:37 +01:00
Alessandro Pasotti
14df327167 [auth][ogr] Added test cases for all supported drivers 2017-11-14 17:58:36 +01:00
Alessandro Pasotti
d163c01673 [ogr][auth] Add geojson username/password test 2017-11-14 17:58:36 +01:00
Alessandro Pasotti
dc6101a6da [auth] Add tests for Basic auth CAs on OGR and PG
providers
2017-11-14 17:58:36 +01:00
Alessandro Pasotti
276bd1bfe1 [auth] Add trusted root CAs to OGR PG connnections 2017-11-14 17:58:27 +01:00
Alessandro Pasotti
2c6367175a Always use expanded URI for connection pooling 2017-11-14 17:58:19 +01:00
Even Rouault
c09c96b03e Raster renderer: fix so that raster in projected CRS is not rendered in geographic CRS if the extent exceeds -180,-90,180,90 (fixes #14229) 2017-11-14 13:30:52 +01:00
Even Rouault
ec9e87d6f4 Fix compilation error likely due to 5d476e51dfcbf9a2d3634cf6b7a6d5b12e93f406 2017-11-14 12:41:53 +01:00
Borys Jurgiel
5f915a09db [Plugin manager] Don't truncate long names. Fixes #17451. 2017-11-14 12:31:59 +01:00
Even Rouault
b861db47f5 [Raster] Do not crash when displaying a raster with complex datatype (fixes #16405)
That said, complex datatypes are not handled, so QGIS cannot do anything useful
with such datasets.
2017-11-14 12:08:03 +01:00
Nyall Dawson
020972c291 Tweaks to automatic layer name logic 2017-11-14 21:53:31 +11:00
Nyall Dawson
15e15356b3 Show vector layer wkb types in tooltip in layer tree and layer combo boxes
This is very useful information to have readily visible (esp.
to see if a layer is multi* type, has z/m, when choosing it
as a source for a processing algorithm)

Remove redundant geometry type display from default layer name
2017-11-14 21:53:31 +11:00
Nyall Dawson
6e31fccc5d [needs-docs] Remove option to capitalize layer names, and make it always on
Doing this removes some work from our users - giving layers
a nicely generated name by default
2017-11-14 21:53:31 +11:00
Nyall Dawson
6f55e50a13 Remove QgsMapLayer::originalName()
Now QgsMapLayer::name() is guaranteed to return the same string
2017-11-14 21:53:31 +11:00
Nyall Dawson
1e4f6917de Cleanup fragile 'capitalize layer names' option
This option was being applied in the wrong place - within the
map layer classes themselves. This meant that depending on the
user's setting for this option, a plugin calling QgsMapLayer::setName
would not be guaranteed the same behaviour across installs.
(and the same with setDataSource)

Similarly, the option was re-applied on project load, so
moving projects between installs with different values for
this setting would affect the project layer names, breaking
expressions which relied on these...

Instead, move the formatting and capitalization of layer
names to the QgisApp add*Layer methods instead, so this option
only applies on adding new layers to a project.
2017-11-14 21:53:31 +11:00
Nyall Dawson
d14b8592f8 More efficient distance to vertex calculation in extract nodes alg
Instead of calculating the whole distance from the start of the
geometry to the vertex for EVERY vertex, we just keep a running
sum of the cumulative distance so far and add the length of
each segment as we go.

Stats:

Before:
- dataset 1: > 20 minutes, still going at 14%....
- dataset 2: 92 seconds

After:
- dataset 1: 3 seconds
- dataset 2: 1.7 seconds

BAM!
2017-11-14 21:52:28 +11:00
Nyall Dawson
fc6c69bedf Fix calculation of distance to vertex for multi part, multi ring
and curved geometries
2017-11-14 21:52:28 +11:00
Nyall Dawson
5d476e51df Use QVector where possible in geometry classes 2017-11-14 21:52:09 +11:00
Nyall Dawson
507a93c69b Drop the cached coordinate sequence from abstract geometries
This cache was added to speed up expensive QgsAbstractGeometry::coordinateSequence
calls, when we were relying on coordinateSequence() for a whole
bunch of stuff like counting the number of points in a geometry.

Now it's used almost no-where in the code, so this cache is unlikely
to get filled and just makes geometries more memory heavy than
they need to be.
2017-11-14 21:52:09 +11:00
Matthias Kuhn
0c35dde461 N:M Relations, support for linking table with default values 2017-11-14 11:08:37 +01:00
Matthias Kuhn
30eec2b392 Update buttons on referenced layer edit state change in N:M
Fix #16635
2017-11-14 11:08:37 +01:00
Nyall Dawson
3ba2254503 Fix broken sip casting of nested QVectors
Old code was always forcing casting to QgsPointXY, regardless
of actual type
2017-11-14 21:08:21 +11:00
Alexander Bruy
662c2cf801
another typo 2017-11-14 08:39:25 +02:00