Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-21 Thread Radim Blazek
On Fri, Jun 2, 2017 at 1:50 AM, Nyall Dawson wrote: > I think copy should definitely be the ONLY behavior here. Otherwise > there's data loss - user's styling and layer settings will be lost, > and dragging memory layers will lose all features (admittedly dragging > memory layers doesn't copy any

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-19 Thread Radim Blazek
On Fri, Jun 2, 2017 at 11:02 AM, Radim Blazek wrote: > On Fri, Jun 2, 2017 at 10:48 AM, Nyall Dawson wrote: >> QgsBrowserItem::handleDrop just gets a layer URI in the mime data - >> that's enough for the other providers to be able to open a new copy of >> the layer to grab the features from, but

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-02 Thread Radim Blazek
On Fri, Jun 2, 2017 at 10:48 AM, Nyall Dawson wrote: > On 2 June 2017 at 18:32, Radim Blazek wrote: >> On Fri, Jun 2, 2017 at 1:50 AM, Nyall Dawson wrote: >>> I think copy should definitely be the ONLY behavior here. Otherwise >>> there's data loss - user's styling and layer settings will be los

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-02 Thread Nyall Dawson
On 2 June 2017 at 18:32, Radim Blazek wrote: > On Fri, Jun 2, 2017 at 1:50 AM, Nyall Dawson wrote: >> I think copy should definitely be the ONLY behavior here. Otherwise >> there's data loss - user's styling and layer settings will be lost, >> and dragging memory layers will lose all features (ad

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-02 Thread Radim Blazek
On Fri, Jun 2, 2017 at 1:50 AM, Nyall Dawson wrote: > I think copy should definitely be the ONLY behavior here. Otherwise > there's data loss - user's styling and layer settings will be lost, > and dragging memory layers will lose all features (admittedly dragging > memory layers doesn't copy any

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-01 Thread Nyall Dawson
On 2 June 2017 at 03:31, Radim Blazek wrote: > On Tue, May 30, 2017 at 11:39 PM, Nyall Dawson wrote: >>> DD works within the browser now but not for layer with measures. >> I guess this has never been implemented. Looking at ... > > I added Z, M and ZM types to postgres provider output and allowe

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-06-01 Thread Radim Blazek
On Tue, May 30, 2017 at 11:39 PM, Nyall Dawson wrote: >> DD works within the browser now but not for layer with measures. > I guess this has never been implemented. Looking at ... I added Z, M and ZM types to postgres provider output and allowed AddFeatures for layers with measures (user should b

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-30 Thread Nyall Dawson
On 31 May 2017 at 03:07, Radim Blazek wrote: > DD works within the browser now but not for layer with measures. I guess this has never been implemented. Looking at QgsPostgresConn::postgisWkbType, it's only got support for a very limited range of WKB types (no curves, no m values, won't handle z

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-30 Thread Radim Blazek
On Tue, May 30, 2017 at 10:01 AM, Sandro Santilli wrote: >> Calling QgsPostgresConn::connectDb with shared=false should be OK, right? > > I guess, given the assertion was only added in the shared=true case.. It is called from many places where it is difficult to pass shared param. I have forced n

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-30 Thread Sandro Santilli
On Tue, May 30, 2017 at 09:55:49AM +0200, Radim Blazek wrote: > > Calling QgsPostgresConn::connectDb with shared=false should be OK, right? I guess, given the assertion was only added in the shared=true case.. --strk; ___ QGIS-Developer mailing list QG

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-30 Thread Radim Blazek
On Tue, May 30, 2017 at 9:40 AM, Sandro Santilli wrote: > On Tue, May 30, 2017 at 04:39:01PM +1000, Nyall Dawson wrote: >> On 30 May 2017 at 16:30, Radim Blazek wrote: >> > Hi, >> > >> > QGIS3 crashes when a vector is dragged and drop to PostGIS in browser >> > in qgspostgresconn.cpp on >> > >> >

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-30 Thread Sandro Santilli
On Tue, May 30, 2017 at 04:39:01PM +1000, Nyall Dawson wrote: > On 30 May 2017 at 16:30, Radim Blazek wrote: > > Hi, > > > > QGIS3 crashes when a vector is dragged and drop to PostGIS in browser > > in qgspostgresconn.cpp on > > > > // sharing connection between threads is not safe > > //

Re: [QGIS-Developer] Drag and drop to PostGIS crash

2017-05-29 Thread Nyall Dawson
On 30 May 2017 at 16:30, Radim Blazek wrote: > Hi, > > QGIS3 crashes when a vector is dragged and drop to PostGIS in browser > in qgspostgresconn.cpp on > > // sharing connection between threads is not safe > // See https://issues.qgis.org/issues/13141 > Q_ASSERT( QApplication::instanc

[QGIS-Developer] Drag and drop to PostGIS crash

2017-05-29 Thread Radim Blazek
Hi, QGIS3 crashes when a vector is dragged and drop to PostGIS in browser in qgspostgresconn.cpp on // sharing connection between threads is not safe // See https://issues.qgis.org/issues/13141 Q_ASSERT( QApplication::instance()->thread() == QThread::currentThread() ); the issue ment