57749 Commits

Author SHA1 Message Date
Even Rouault
79cb35166b
[Postgresql Provider] Fix crash in discoverRelations() on invalid layer (fixes #31213) 2019-09-14 22:15:26 +02:00
Even Rouault
97fab83eea
[WFS provider] Re-inject custom query parameters in DCP HTTP URLs (fixes #31026)
Since f1b59876344bf0c0f066c81bf8ef73ef25365023, we honour DCP HTTP endpoints
exposed in GetCapabilities.
But some (all?) servers fail to add in those endpoints the custom query parameters
the user might have injected in the GetCapabilities URL.
So re-add them manually.
2019-09-14 16:45:06 +02:00
Even Rouault
58a246008b
test_provider_wfs.py: fix tests so they pass with PROJ 6 2019-09-14 16:33:02 +02:00
Even Rouault
fdcca14f65
Make sure ellipsoid parameter and definition caches are cleared before app exit (related to #31762)
This should apply to both PROJ < 6 and >=6 builds.

Fixes the following error reported by Valgrind
```
==5848== Invalid read of size 4
==5848==    at 0xE5E4195: internal_pj_ctx_get_errno (in /home/even/proj/install-proj-master/lib/libproj.so.15.2.0)
==5848==    by 0xE5E16AE: internal_pj_free (in /home/even/proj/install-proj-master/lib/libproj.so.15.2.0)
==5848==    by 0xE5F4E78: internal_proj_destroy (in /home/even/proj/install-proj-master/lib/libproj.so.15.2.0)
==5848==    by 0x7F961A7: QgsProjUtils::ProjPJDeleter::operator()(PJconsts*) (qgsprojutils.cpp:76)
==5848==    by 0x7D2D44C: std::unique_ptr<PJconsts, QgsProjUtils::ProjPJDeleter>::~unique_ptr() (unique_ptr.h:239)
==5848==    by 0x7D2C9BD: QgsCoordinateReferenceSystemPrivate::~QgsCoordinateReferenceSystemPrivate() (qgscoordinatereferencesystem_p.h:94)
==5848==    by 0x7D2D6FA: QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate>::~QExplicitlySharedDataPointer() (qshareddata.h:165)
==5848==    by 0x7CDFA77: QgsCoordinateReferenceSystem::~QgsCoordinateReferenceSystem() (qgscoordinatereferencesystem.cpp:233)
==5848==    by 0x55CC0AF: QgsEllipsoidUtils::EllipsoidParameters::~EllipsoidParameters() (qgsellipsoidutils.h:39)
==5848==    by 0x7D8C40B: QHashNode<QString, QgsEllipsoidUtils::EllipsoidParameters>::~QHashNode() (qhash.h:149)
==5848==    by 0x7D8C43F: QHash<QString, QgsEllipsoidUtils::EllipsoidParameters>::deleteNode2(QHashData::Node*) (qhash.h:536)
==5848==    by 0x9BE3B78: QHashData::free_helper(void (*)(QHashData::Node*)) (in /opt/qt59/lib/libQt5Core.so.5.9.1)
==5848==    by 0x7D8C466: QHash<QString, QgsEllipsoidUtils::EllipsoidParameters>::freeData(QHashData*) (qhash.h:576)
==5848==    by 0x7D8CCED: QHash<QString, QgsEllipsoidUtils::EllipsoidParameters>::~QHash() (qhash.h:254)
==5848==    by 0xA60E369: __cxa_finalize (cxa_finalize.c:56)
==5848==    by 0x77BE742: ??? (in /home/even/qgis/QGIS/build/output/lib/libqgis_core.so.3.9.0)
==5848==    by 0x4010DF6: _dl_fini (dl-fini.c:235)
==5848==    by 0xA60DFF7: __run_exit_handlers (exit.c:82)
==5848==    by 0xA60E044: exit (exit.c:104)
==5848==    by 0xA5F4836: (below main) (libc-start.c:325)
==5848==  Address 0x45db80e0 is 0 bytes inside a block of size 136 free'd
==5848==    at 0x4C2F440: operator delete(void*) (vg_replace_malloc.c:586)
==5848==    by 0xE5F5A3A: internal_proj_context_destroy (in /home/even/proj/install-proj-master/lib/libproj.so.15.2.0)
==5848==    by 0x7F9617A: QgsProjContext::~QgsProjContext() (qgsprojutils.cpp:48)
==5848==    by 0xA60E5FE: __call_tls_dtors (cxa_thread_atexit_impl.c:155)
==5848==    by 0xA60DF26: __run_exit_handlers (exit.c:40)
==5848==    by 0xA60E044: exit (exit.c:104)
==5848==    by 0xA5F4836: (below main) (libc-start.c:325)
==5848==  Block was alloc'd at
==5848==    at 0x4C2E709: operator new(unsigned long, std::nothrow_t const&) (vg_replace_malloc.c:387)
==5848==    by 0xE5E445E: internal_pj_ctx_alloc (in /home/even/proj/install-proj-master/lib/libproj.so.15.2.0)
==5848==    by 0x7F96151: QgsProjContext::QgsProjContext() (qgsprojutils.cpp:39)
==5848==    by 0x7F970A9: __tls_init (qgsprojutils.cpp:31)
==5848==    by 0x7F970F3: TLS wrapper function for QgsProjContext::sProjContext (in /home/even/qgis/QGIS/build/output/lib/libqgis_core.so.3.9.0)
==5848==    by 0x7F96186: QgsProjContext::get() (qgsprojutils.cpp:57)
==5848==    by 0x7D86B13: QgsEllipsoidUtils::definitions() (qgsellipsoidutils.cpp:351)
==5848==    by 0x7D863FE: QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1}::operator()() const (qgsellipsoidutils.cpp:173)
==5848==    by 0x7D87EE1: void std::_Bind_simple<QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) (functional:1531)
==5848==    by 0x7D87BC5: std::_Bind_simple<QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1} ()>::operator()() (functional:1520)
==5848==    by 0x7D879A2: void std::__once_call_impl<std::_Bind_simple<QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1} ()> >() (mutex:706)
==5848==    by 0x10A6AA98: __pthread_once_slow (pthread_once.c:116)
==5848==    by 0x7D863CE: __gthread_once(int*, void (*)()) (gthr-default.h:699)
==5848==    by 0x7D8787F: void std::call_once<QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1}>(std::once_flag&, QgsEllipsoidUtils::ellipsoidParameters(QString const&)::{lambda()#1}&&) (mutex:738)
==5848==    by 0x7D86476: QgsEllipsoidUtils::ellipsoidParameters(QString const&) (qgsellipsoidutils.cpp:174)
==5848==    by 0x7E8D572: QgsMapSettings::setEllipsoid(QString const&) (qgsmapsettings.cpp:322)
==5848==    by 0x6A4E5F1: QgsMapCanvas::QgsMapCanvas(QWidget*) (qgsmapcanvas.cpp:143)
==5848==    by 0x5110841: QgisApp::QgisApp(QSplashScreen*, bool, bool, QString const&, QString const&, QWidget*, QFlags<Qt::WindowType>) (qgisapp.cpp:803)
==5848==    by 0x417DB9: main (main.cpp:1339)
==5848==
```
2019-09-14 15:19:02 +02:00
nirvn
738ced6488 Avoid qt warning when opening the raster properties dialog
(while visiting the function, remove use of  my* variable
names)
2019-09-14 15:38:26 +07:00
Matthias Kuhn
a8199c376a Add symbol scope to legend item
Fix #31756
2019-09-14 09:27:19 +02:00
Peter Petrik
cdd3a55e9e fix #30766, sip crash for QgsHighlight 2019-09-14 06:38:25 +10:00
Matthias Kuhn
0d26d64b2e Use range based for loop 2019-09-14 06:30:45 +10:00
Matthias Kuhn
ecdc0ea57a
Merge pull request #31393 from seralra96/fix_31292
Improve validation for QgsRelationAddDlg Fixes #31292
2019-09-13 21:12:44 +02:00
rldhont
b18cbc7d31 Use unique_ptr for QgsVectorLayerServerProperties in QgsVectorLayer 2019-09-13 20:37:44 +02:00
rldhont
ea0c1740d9 [Server] Define QgsWms::QgsRenderer::dimensionFilter method 2019-09-13 20:37:44 +02:00
rldhont
635e245143
Merge pull request #31746 from Gustry/combo_sql
fix combobox ID not having correct checked state when we update a SQL layer
2019-09-13 19:05:16 +02:00
Alessandro Pasotti
784fd1affd
Merge pull request #31741 from elpaso/bugfix-gh31732-datasource-manager-tabs-resize
Resize not-focused tabs for datasource and options dlgs
2019-09-13 18:27:45 +02:00
Etienne Trimaille
37803810eb
fix combobox ID not having correct checked state when we update a SQL layer 2019-09-13 17:46:38 +02:00
Juergen E. Fischer
99a525c513 translation string fixes [ci skip] 2019-09-13 13:35:40 +02:00
Alessandro Pasotti
81985a9ca4 Resize not-focused tabs for datasource and options dlgs
Moved logic into base class. I did not find any other
suclass affected.
2019-09-13 12:38:48 +02:00
Alessandro Pasotti
4f9e4f121a
Merge pull request #31734 from elpaso/bugfix-gh31428-text-formatting-enable-disable
Update bg and buffer status in text format widget
2019-09-13 11:01:17 +02:00
Alessandro Pasotti
8314aaece1
Merge pull request #31731 from elpaso/bugfix-gh31730-broken-gpkg-actions
fix  broken gpkg actions
2019-09-13 11:00:51 +02:00
Alessandro Pasotti
7ad9c00690 Bulletproof guarded ptr for collection item 2019-09-13 10:23:10 +02:00
Alexander Bruy
af77d68716 return only base URL as connection string
adopt ogrinfo and ogrtabletopostgis algorithms so they can work with WFS
2019-09-13 11:11:53 +03:00
Alessandro Pasotti
c5b5ec4b47 Update bg and buffer status in text format widget
Fixes #31428
2019-09-13 10:10:20 +02:00
Alessandro Pasotti
78b5e5b8e7 Fix browser action create new layer/table in GPKG
Fixes #31730
2019-09-13 08:32:37 +02:00
Alessandro Pasotti
f872c555f5 Fix GPKG vacuum action
Fixes #31730
2019-09-13 08:32:05 +02:00
Alexander Bruy
4b7eaa4b9c [processing] support for WFS layers in GDAL algorithms (fix #29663) 2019-09-13 09:14:04 +03:00
Nyall Dawson
d2f3f8b63c Fix build 2019-09-13 12:38:03 +10:00
Nyall Dawson
b4a7a352e3 Add unit test for GPS widget multipart layer type handling 2019-09-13 12:38:03 +10:00
Nyall Dawson
a0edee57ac [gps] Use messagebar instead of message boxes for feedback 2019-09-13 12:38:03 +10:00
Nyall Dawson
c7930cbc08 [gps] Fix incorrect initial enabled state of "Add Track Point" button 2019-09-13 12:38:03 +10:00
Nyall Dawson
dc2b209da3 [gps] Fix cannot use GPS panel to draw features in multi polygon/line
layer (e.g. shapefiles)

And cleanup and modernise a lot of code

Fixes #29144
2019-09-13 12:38:03 +10:00
Nyall Dawson
aa4a8da3a7 Fix loss of label background settings when restoring projects.
Fixes #31427 (master only)
2019-09-13 12:13:10 +10:00
Nyall Dawson
b3b3d7053a Don't try to load mssql data 2019-09-13 10:36:06 +10:00
Nyall Dawson
172b5d8a4c Disable mssql server docker use, it's down too often... 2019-09-13 10:36:06 +10:00
Nyall Dawson
587c011046 [layouts] Fix grids cannot be disabled, ui widgets for grids get incorrectly
disabled blocking the ability to re-enable grids (master only)
2019-09-13 10:36:06 +10:00
Nyall Dawson
f4d407d9ee Add fromBezierCurve method to QgsLineString
Returns a new QgsLineString as a segmentized version of a bezier curve.
2019-09-13 05:37:37 +10:00
Alessandro Pasotti
9b7a2cd5d1
Merge pull request #31673 from elpaso/server-api-wfs3-acl
Server api wfs3 acl
2019-09-12 15:07:28 +02:00
Alexander Bruy
8c4bc20a76
Merge pull request #31712 from alexbruy/fix-30878
[processing] quote field names in GDAL commands (fix #30878)
2019-09-12 13:57:17 +03:00
rldhont
1e4df22ce5
Merge Vector Layer Server Dimensions Dialog: use explicit connection instead of in the UI file
Use explicit connection instead of in the UI file in QgsWmsDimensionDialog
2019-09-12 12:07:42 +02:00
Alexander Bruy
3f54e1db9a use doublequotes for indentifiers as required by GDAL's RFC52 2019-09-12 12:09:29 +03:00
Daniele Viganò
04b2f4d696 [RPM] Update examples and documentation (#31623)
* [RPM] Update examples and documentation

* [RPM] Fix a typo
2019-09-12 10:52:39 +02:00
Nyall Dawson
3144425caf Fix invalid model warning when opening an attribute table which contains no columns 2019-09-12 18:30:36 +10:00
Nyall Dawson
044e0d2512 Fix another qt null connection warning 2019-09-12 18:30:36 +10:00
Alexander Bruy
e1c97dc5ba [processing] quote field names in GDAL commands (fix #30878) 2019-09-12 10:52:31 +03:00
Nyall Dawson
f56fb4bc4e Avoid qt warnings when opening layer tree group menu 2019-09-12 15:55:47 +10:00
Nyall Dawson
05b25d38d1 Cleanup code in graduated renderer widget 2019-09-12 13:02:33 +10:00
Harrissou Sant-anna
88b16b75e6 [needs-docs] Do not display graduated method combobox
when the layer is of polygon geometry type to avoid a single item combobox
2019-09-12 13:02:33 +10:00
Nyall Dawson
7043933ff2 Fix crash in point displacement renderer 2019-09-12 13:02:15 +10:00
Harrissou Sant-anna
8fcd17ddcd [3d][ui] Display Help button on the 3D configuration dialog 2019-09-12 09:54:30 +07:00
Nyall Dawson
1e51430317 [needs-docs] Address QGIS 2.x -> 3.x regression in offset features tool
In QGIS 2 it was possible to offset features from a non-active layer
which would result in an offset copy of these features being inserted
into the (editable) active layer

This behavior was lost in QGIS 3, which only permits offsetting
features within the active layer.

Resurrect this behavior, with some tweaks:
- the copy-and-offset mode is activated only when ctrl is held
while offsetting. In earlier 3.x versions this also resulted in
copy-and-offset, but only for features within the current layer.
Now, copy-and-offset respects the project's snapping configuration
and potentially copies from other layers
- We use refined logic to correctly map attributes across from
the source feature layer to the destination layer, and apply
default values and provider constraints on feature copy (also
applies to copy-and-offsets where the source and destination
layer are the same)
2019-09-12 11:41:57 +10:00
Nyall Dawson
5cb21a82f6 When copying features in offset tool, correctly QgsVectorLayerUtils::createFeature
to create new features

This ensures the newly created features are compatible with the destination layer,
e.g. converting single parts to multipart where required, and also ensures
that default values and provider-side constraints are correctly handled.
2019-09-12 11:41:57 +10:00
Nyall Dawson
4b6a413ad0 Rename variables for clarity 2019-09-12 11:41:57 +10:00