[Qgis-developer] QgsVectorLayer's attributeValueChanged SIGNAL emitted when it should not

2016-07-12 Thread Germán Carrillo
Hi All,

I'm working on a plugin and trying to connect a SLOT to
layer.attributeValueChanged SIGNAL. However, I found that such SIGNAL is
(weirdly) emitted in the following scenario:

1. Load a vector file (I've tested this with a Shapefile and an SQLITE
file) with a numeric (int or real) field, whose value for the first feature
is NULL.
2. Open the attribute table of the vector layer.
3. Start an edit session cliking on "Toggle Edit Mode" button from the
Attribute table window.

As soon as the edit session starts, the SIGNAL is emitted. Now, if I click
on the "Toggle Edit Mode" button from the Attribute table window, I have to
choose among Save, Cancel, or Close Without Saving options, even without
changing any attribute value at all. Once I choose Close Without Saving,
the layer.attributeValueChanged SIGNAL is emitted once more.

Such behavior is hampering my plugin, which will depend on the
aforementioned SIGNAL.

Is this a bug? Do you know why layer.attributeValueChanged is being emitted
in such scenario? I've noticed that sometimes a blockSignals() method is
used in QGIS source code; couldn't we use blockSignals() to avoid emitting
the SIGNAL in this case?

##
Note: I use this code snippet in the QGIS Python console to be notified
when layer.attributeValueChanged is emitted:

##
def f(fid, idx, value):
  print fid,idx,value

l = iface.activeLayer()
l.attributeValueChanged.connect( f )
##

I'm getting these messages printed (4 is the index of the numeric field
whose value for the first feature is NULL):

0 4 NULL # When I open the edit session.
0 4 NULL # When I close the edit session.

If you want to reproduce the problem, you can use a sample Shapefile from
here: http://downloads.tuxfamily.org/tuxgis/tmp/test.zip
##


Regards,

Germán


-- 
---
   |\__
(:>__)(
   |/
Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
http://about.me/germancarrillo


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Number of arguments for processing gdalogr:warpreproject

2016-07-12 Thread Tom Chadwin
OK, Travis seems to be installing GDAL 1.10. Is that the issue? 

Get:60 http://us-central1.gce.archive.ubuntu.com/ubuntu/ trusty/universe
gdal-bin amd64 1.10.1+dfsg-5ubuntu1 [208 kB]

What version is 2.16 hoping for, specifically for calling warp via
processing? Am I right in presuming 2.x? If so, is there a PPA I can
specify? 

Thanks

Tom



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Number-of-arguments-for-processing-gdalogr-warpreproject-tp5273308p5276030.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Adding symbols through API needs QGIS restarts to show up

2016-07-12 Thread Akbar Gumbira
Hi Martin,

Thanks, seems to work. I read a bit the cpp code in Style Manager DIalog
that it will load the default style when showing up the dialog. So I
thought once it's written correctly to the database, it will not have this
problem. Thanks for the explanation, it's clear now what the API's are
meant to do.

On Tue, Jul 12, 2016 at 7:57 PM, Martin Dobias  wrote:

> Hi Akbar
>
> On Tue, Jul 12, 2016 at 7:49 PM, Akbar Gumbira 
> wrote:
> > Hi,
> >
> > I am trying to add symbols/colorramps through Python API and I have a
> > problem that after adding symbol/colorramps, the added symbols/colorramps
> > don't show up in Style Manager right away. The symbols are added in the
> > symbology-ng-style.db, but the added symbols show up once I restart QGIS
>
> Try this instead:
>
> style = QgsStyleV2.defaultStyle()
> style.addSymbol("ABC", my_symbol)
>
> The default style is the one loaded on start and used throughout QGIS
> application, so if you modify it, the changes will be immediately
> visible in the GUI and will be saved automatically.
>
> Cheers
> Martin
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com *
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Adding symbols through API needs QGIS restarts to show up

2016-07-12 Thread Martin Dobias
Hi Akbar

On Tue, Jul 12, 2016 at 7:49 PM, Akbar Gumbira  wrote:
> Hi,
>
> I am trying to add symbols/colorramps through Python API and I have a
> problem that after adding symbol/colorramps, the added symbols/colorramps
> don't show up in Style Manager right away. The symbols are added in the
> symbology-ng-style.db, but the added symbols show up once I restart QGIS

Try this instead:

style = QgsStyleV2.defaultStyle()
style.addSymbol("ABC", my_symbol)

The default style is the one loaded on start and used throughout QGIS
application, so if you modify it, the changes will be immediately
visible in the GUI and will be saved automatically.

Cheers
Martin
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Adding symbols through API needs QGIS restarts to show up

2016-07-12 Thread Akbar Gumbira
Hi,

I am trying to add symbols/colorramps through Python API and I have a
problem that after adding symbol/colorramps, the added symbols/colorramps
don't show up in Style Manager right away. The symbols are added in the
symbology-ng-style.db, but the added symbols show up once I restart QGIS

This is more or less the code:

style_manager = QgsStyleV2()
> style_manager.load(QgsApplication.userStyleV2Path())
> # Adding symbols here
> style_manager.addSymbol(symbol_name, symbol, True)
> # Perhaps this works, load the db again
> style_manager.load(QgsApplication.userStyleV2Path())


Is there something in the API that I could call to trigger the dialog to
show up the changes after adding the symbols?


-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com *
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] [Qgis-community-team] QGIS Hackfest in Bonn

2016-07-12 Thread Tim Sutton
Hi



> On 12 Jul 2016, at 2:06 PM, Yves Jacolin  wrote:
> 
> 
> Y.
> [1] https://wiki.osgeo.org/wiki/FOSS4G_2016_Code_Sprint
> [2] http://www.bonnox.de/en/
> _

Thanks Yves - I have added the links you provided to the wiki page.

Regards

Tim




---

Tim Sutton
QGIS Project Steering Committee Chair
t...@qgis.org




___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Bug in Redmine issue reports form?

2016-07-12 Thread DelazJ
Hi devs

Trying to report issue at
http://hub.qgis.org/projects/quantum-gis/issues/new, in the Target version
option, releases that are proposed are not only QGIS's. I have options from
plugins like BLN Exporter, Transectizer, QMarxan...
This might be a bug, I suppose.
Given that I don't know to whom I should report this

Thanks,
Harrissou
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] How to hide the icons over the Layer Panels ?

2016-07-12 Thread DelazJ
Hi,
menu Settings --> Customize is supposed to help you remove icons from QGIS
interface. That said, I don't know if these buttons are available in the
list nor if there's an easier way to find them (except source code). There
are some issues reports with this dialog  at
http://hub.qgis.org/projects/quantum-gis/issues (category== customisation
framework)

Regards,
Harrissou

2016-07-12 11:49 GMT+02:00 Geo DrinX :

> Hello All,
>
> as in object,  I need to hide the function icons on the "Layer Panel".
>
> There is an on/off setting to hide them ?
>
>
> Thank you for any info
>
> Roberto
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Number of arguments for processing gdalogr:warpreproject

2016-07-12 Thread Tom Chadwin
This problem remains now that 2.16 has been released:

https://travis-ci.org/tomchadwin/qgis2web/jobs/144186976

Can anyone help fix this error?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Number-of-arguments-for-processing-gdalogr-warpreproject-tp5273308p5275981.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Marco Bernasocchi
Arg, I think I didn't sleep enough last night, sorry,. here the full bt:


Thread 1 "qgis.bin" received signal SIGSEGV, Segmentation fault.
0x75b3a265 in QString::remove(QChar, Qt::CaseSensitivity) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
(gdb) bt
#0  0x75b3a265 in QString::remove(QChar, Qt::CaseSensitivity) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x7fff91c6d8d2 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x7fff9226e789 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x7fff9226e8f4 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#4  0x7fff922a8205 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#5  0x7fff922a559d in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#6  0x7fff9228c8b6 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#7  0x7fff9228b98f in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#8  0x7fff9225e615 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#9  0x7fff922785b8 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#10 0x7fff9227862e in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#11 0x7fff92293c28 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#12 0x7fff9229b3f3 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#13 0x7fff91c78cb1 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#14 0x7fff92299d71 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#15 0x7fff9227975d in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#16 0x7fff922799ac in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#17 0x7fff9227a1b1 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#18 0x7fff91c292e5 in QWebFrame::load(QNetworkRequest const&,
QNetworkAccessManager::Operation, QByteArray const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#19 0x7fff91c2a36b in QWebFrame::load(QUrl const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#20 0x7fff91c2a51b in QWebFrame::setUrl(QUrl const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#21 0x7fff93d567e5 in ?? () from
/usr/lib/python2.7/dist-packages/PyQt4/QtWebKit.so
---Type  to continue, or q  to quit---
#22 0x7fff9d4f75b9 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#23 0x7fff9d4f5c69 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#24 0x7fff9d62027c in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#25 0x7fff9d584060 in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#26 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#27 0x7fff9d5bd7ec in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#28 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#29 0x7fff9d569fad in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#30 0x7fff9d52b18f in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#31 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#32 0x7fff9d4f3f7c in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#33 0x7fff9d62027c in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#34 0x7fff9d584060 in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#35 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#36 0x7fff9d5bd7ec in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#37 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#38 0x7fff9d61f6a7 in PyEval_CallObjectWithKeywords () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#39 0x7fff9d5cb7ac in PyInstance_New () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#40 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#41 0x7fff9d4f3f7c in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#42 0x7fff9d4f5c69 in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#43 0x7fff9d62027c in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
---Type  to continue, or q  to quit---
#44 0x7fff9d4f5b3d in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#45 0x7fff9d62027c in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#46 0x7fff9d4f5b3d in PyEval_EvalFrameEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#47 0x7fff9d62027c in PyEval_EvalCodeEx () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#48 0x7fff9d584060 in ?? () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#49 0x7fff9d556f03 in PyObject_Call () from
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
#50 0x7fff9d5bd7ec in ?? () from

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Marco Bernasocchi
marco@placebo:~$ gdb qgis.bin
run
bt


Thread 1 "qgis.bin" received signal SIGSEGV, Segmentation fault.
0x75b3a265 in QString::remove(QChar, Qt::CaseSensitivity) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
(gdb) bt
#0  0x75b3a265 in QString::remove(QChar, Qt::CaseSensitivity) ()
from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#1  0x7fff91c6d8d2 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x7fff9226e789 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x7fff9226e8f4 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#4  0x7fff922a8205 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#5  0x7fff922a559d in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#6  0x7fff9228c8b6 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#7  0x7fff9228b98f in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#8  0x7fff9225e615 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#9  0x7fff922785b8 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#10 0x7fff9227862e in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#11 0x7fff92293c28 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#12 0x7fff9229b3f3 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#13 0x7fff91c78cb1 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#14 0x7fff92299d71 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#15 0x7fff9227975d in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#16 0x7fff922799ac in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#17 0x7fff9227a1b1 in ?? () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#18 0x7fff91c292e5 in QWebFrame::load(QNetworkRequest const&,
QNetworkAccessManager::Operation, QByteArray const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#19 0x7fff91c2a36b in QWebFrame::load(QUrl const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#20 0x7fff91c2a51b in QWebFrame::setUrl(QUrl const&) () from
/usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#21 0x7fff93d567e5 in ?? () from
/usr/lib/python2.7/dist-packages/PyQt4/QtWebKit.so


On 12.07.2016 13:45, Matthias Kuhn wrote:
> gdb qgis
> run
> 
> bt
> 
> Ciao
> 
> On 12/07/16 13:36, Marco Bernasocchi wrote:
>> $ qgis --noplugins
>> yields the same error.
>>
>> ciao
>>
>> On 12.07.2016 12:59, matteo wrote:
>>> I installed QGIS with the ubuntu.debian repo, but it happens also with
>>> the compilation with debian rules.. same error
>>>
>>> in this case the plugin is QuickOSM
>>>
>>> Thanks
>>>
>>> Matteo
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch



signature.asc
Description: OpenPGP digital signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Matthias Kuhn
gdb qgis
run

bt

Ciao

On 12/07/16 13:36, Marco Bernasocchi wrote:
> $ qgis --noplugins
> yields the same error.
>
> ciao
>
> On 12.07.2016 12:59, matteo wrote:
>> I installed QGIS with the ubuntu.debian repo, but it happens also with
>> the compilation with debian rules.. same error
>>
>> in this case the plugin is QuickOSM
>>
>> Thanks
>>
>> Matteo
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Marco Bernasocchi
$ qgis --noplugins
yields the same error.

ciao

On 12.07.2016 12:59, matteo wrote:
> I installed QGIS with the ubuntu.debian repo, but it happens also with
> the compilation with debian rules.. same error
> 
> in this case the plugin is QuickOSM
> 
> Thanks
> 
> Matteo
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch



signature.asc
Description: OpenPGP digital signature
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread matteo
I installed QGIS with the ubuntu.debian repo, but it happens also with
the compilation with debian rules.. same error

in this case the plugin is QuickOSM

Thanks

Matteo
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Matthias Kuhn
Looks like it's compiled with -DWITH_QTWEBKIT=OFF
I don't think that should be required on Ubuntu...
But it shouldn't crash anyway, which plugin?

On 07/12/2016 12:46 PM, matteo wrote:
> right, sorry.. here it is
>
>
> Warning: Object::connect: No such signal QWebPage::loadProgress(int)
> Warning: Object::connect: No such signal
> QWebPage::unsupportedContent(QNetworkReply*)
> Warning: Object::connect: No such signal QWebFrame::titleChanged(QString)
> Warning: Object::connect: No such signal QWebPage::loadProgress(int)
> Warning: Object::connect: No such signal QWebFrame::titleChanged(QString)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebFrame::iconChanged()
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebFrame::urlChanged(QUrl)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::loadStarted()
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::loadProgress(int)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::loadFinished(bool)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::statusBarMessage(QString)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::linkClicked(QUrl)
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::selectionChanged()
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Warning: Object::connect: No such signal QWebPage::microFocusChanged()
> Warning: Object::connect:  (receiver name: 'webBrowser')
> Segmentation fault (core dumped)
>
>
> Thanks
>
> Matteo
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] compiling 2.16

2016-07-12 Thread Richard Duivenvoorde

Matthias/we pinned it down to probably a race condition when running
make in 1 thread (not using -j4 or so), AND therefor not having a
__init_.py in qgis dir...

Matthias did a fix, I've just tested and seems to work:
https://github.com/qgis/QGIS/commit/ae3db0a1bf9504b432e4553b94a56051576c053f

(and cherry picked to other branches)

Note: only if you run make without a -j4 option in a clean build/output
directory you hit this on,
else __init__.py is just available...

Regards,

Richard

On 12-07-16 12:04, Akbar Gumbira wrote:
> Got the same problem here too. This was the same problem that I
> encountered in master some time ago
> (https://gist.github.com/akbargumbira/4221338b4b3042dcc144cd78aeb6ca69)
> 
> On Tue, Jul 12, 2016 at 10:47 AM, Richard Duivenvoorde
> > wrote:
> 
> 
> Clean checkout for branche release-2_16, and normal compile:
> 
> [ 82%] Generating ui_dialogAbout.py
> Traceback (most recent call last):
>   File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
> import qgis.PyQt.uic.pyuic
> ImportError: No module named qgis.PyQt.uic.pyuic
> 
> python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:117:
> recipe for target 'python/plugins/GdalTools/tools/ui_dialogAbout.py'
> failed
> make[2]: *** [python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
> CMakeFiles/Makefile2:5074: recipe for target
> 'python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all'
> failed
> make[1]: ***
> [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all]
> Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
> 
> is this an ordering problem?
> 
> Regards,
> 
> Richard
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> 
> 
> -- 
> 
> *---*
> 
> *Akbar Gumbira *
> *www.akbargumbira.com *
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread matteo
right, sorry.. here it is


Warning: Object::connect: No such signal QWebPage::loadProgress(int)
Warning: Object::connect: No such signal
QWebPage::unsupportedContent(QNetworkReply*)
Warning: Object::connect: No such signal QWebFrame::titleChanged(QString)
Warning: Object::connect: No such signal QWebPage::loadProgress(int)
Warning: Object::connect: No such signal QWebFrame::titleChanged(QString)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebFrame::iconChanged()
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebFrame::urlChanged(QUrl)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::loadStarted()
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::loadProgress(int)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::loadFinished(bool)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::statusBarMessage(QString)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::linkClicked(QUrl)
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::selectionChanged()
Warning: Object::connect:  (receiver name: 'webBrowser')
Warning: Object::connect: No such signal QWebPage::microFocusChanged()
Warning: Object::connect:  (receiver name: 'webBrowser')
Segmentation fault (core dumped)


Thanks

Matteo
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Matthias Kuhn
Stacktrace?

On 07/12/2016 12:28 PM, Marco Bernasocchi wrote:
> Sorry, was encrypted by default
> 
> On 12.07.2016 12:24, Marco Bernasocchi wrote:
>> Hi I just updated all my packages in ubuntu 16.04. I don't use ubuntugis.
>>
>> when starting QGIS I get a core dmp, anybody else gets this?
>>
>> ciao
>>
>>
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> 
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread matteo
Hi Marco,

on Ubuntu 16.04 and no ubuntugis. Same here..

But, after a second and a third attempt the core dump disappeared..

Another problem I'm experiencing is with all the plugins that use
QtWebKit; by activating them, I get a segmentation fault..

Cheers

Matteo
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Marco Bernasocchi
Sorry, was encrypted by default

On 12.07.2016 12:24, Marco Bernasocchi wrote:
> Hi I just updated all my packages in ubuntu 16.04. I don't use ubuntugis.
> 
> when starting QGIS I get a core dmp, anybody else gets this?
> 
> ciao
> 
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch


0x39FB985A.asc
Description: application/pgp-keys
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] ubuntu 2.16 packages core dump

2016-07-12 Thread Marco Bernasocchi


biniRQSyQwuX5.bin
Description: PGP/MIME version identification


encrypted.asc
Description: OpenPGP encrypted message
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] compiling 2.16

2016-07-12 Thread Akbar Gumbira
Got the same problem here too. This was the same problem that I encountered
in master some time ago (
https://gist.github.com/akbargumbira/4221338b4b3042dcc144cd78aeb6ca69)

On Tue, Jul 12, 2016 at 10:47 AM, Richard Duivenvoorde 
wrote:

>
> Clean checkout for branche release-2_16, and normal compile:
>
> [ 82%] Generating ui_dialogAbout.py
> Traceback (most recent call last):
>   File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
> import qgis.PyQt.uic.pyuic
> ImportError: No module named qgis.PyQt.uic.pyuic
>
> python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:117:
> recipe for target 'python/plugins/GdalTools/tools/ui_dialogAbout.py' failed
> make[2]: *** [python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
> CMakeFiles/Makefile2:5074: recipe for target
> 'python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all'
> failed
> make[1]: ***
> [python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all]
> Error 2
> Makefile:160: recipe for target 'all' failed
> make: *** [all] Error 2
>
> is this an ordering problem?
>
> Regards,
>
> Richard
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com *
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] How to hide the icons over the Layer Panels ?

2016-07-12 Thread Geo DrinX
Hello All,

as in object,  I need to hide the function icons on the "Layer Panel".

There is an on/off setting to hide them ?


Thank you for any info

Roberto
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QGIS Hackfest in Bonn

2016-07-12 Thread Yves Jacolin
On Tuesday, July 12, 2016 9:01:29 Tim Sutton wrote:
> Dear QGIS Lovers
> 
> Bonn is drawing close and we need to start getting organised for the
> hackfest.
> 
> Paolo has been petitioning to shut down the current wiki in anticipation of
> a future migration off Redmine and because the content there is not
> maintained. Thus for this hackfest I have started the wiki page on the QGIS
> GitHub wiki here:
> 
> https://github.com/qgis/QGIS/wiki/QGIS-Hackfest---Bonn---August-2016
> 
> 
> It is just a stub at the moment - I hope collaboratively we can get things
> organised. We really need a local organiser who can make sure everything is
> in place - are there any volunteers out there?
> 
> If you are not able to write to the wiki page, please contact me with your
> github name and I will see to it that you have the needed permissions.
> 
> Note that there are two FOSS4G2016 conference hacking sprints during Bonn -
> our plan was to make the first (Aug 21-23 2016) the 'official' QGIS one and
> if others wish to hack during the weekend after FOSS4G, you are welcome to
> do so.
> 
> @Astrid could you give us some help in terms of accommodation and hacking
> venue? I believe the camper van place is already full - can you recommend
> some other nearby and cheap places to stay?
> 
> Regards
> 
> Tim

Hello,

We (some camptocamp guys) booked at the Bonnox hotel [2], It should be ~ 10 mn 
to the hackfest place. This is one accomodation listed in the OSGeo Code 
sprint wiki page [1].

Y.
[1] https://wiki.osgeo.org/wiki/FOSS4G_2016_Code_Sprint
[2] http://www.bonnox.de/en/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Plugin [1052] Projestions approval notification.

2016-07-12 Thread noreply

Plugin Projestions approval by pcav.
The plugin version "[1052] Projestions 0.1.1 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/Projestions/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Plugin [1051] LinePlotter approval notification.

2016-07-12 Thread noreply

Plugin LinePlotter approval by pcav.
The plugin version "[1051] LinePlotter 0.1 Experimental" is now approved
Link: http://plugins.qgis.org/plugins/LinePlotter/
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Geo DrinX
Hi Minoru,


> Fixing the error would be easy for the relevant python devs. But if
> the change was introduced in 3.0 (`type(QGis.QGIS_RELEASE_NAME)` gives
> me `` in QGIS 2.14. Not sure that it was technically
> possible to keep str type for the constants), QGIS 2.16 users didn't
> have to wait for the relevant plugin devs to release a modified
> version.
>


I propose a new Olympic sport for athletes open source programmers: the
tracking of changes in the python code to get the new versions of QGIS.
The winner is who stays behind.

:)

You have my deepest sympathy.

A presto

Roberto
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Detect whether layer is from QGIS Server

2016-07-12 Thread Tom Chadwin
Perfect - thank you so much for the help!

Tom



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Detect-whether-layer-is-from-QGIS-Server-tp5275824p5275883.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Detect whether layer is from QGIS Server

2016-07-12 Thread Alessandro Pasotti
On Tue, Jul 12, 2016 at 10:31 AM, Tom Chadwin 
wrote:

> Thanks - I'll try it. What do I detect in the response to know it's QGIS
> Server? In fact, does someone have a publicly accessible QGIS Server I can
> issue that request to?
>
> Thanks
>
> Tom
>
>

I think that you could check that the server does not return an exception.

If REQUEST=GetProjectSettings does not return an exception it means that
it's QGIS.


Example:
QGIS:
http://demo.qgis.org/cgi-bin/qgis_mapserv.fcgi?map=/web/demos/south_perth/project.qgs=WMS=GetProjectSettings

Not QGIS:
http://demo.mapserver.org/cgi-bin/mapserv?map=/osgeo/mapserver/msautotest/world/world.map=WMS=GetProjectSettings

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Detect whether layer is from QGIS Server

2016-07-12 Thread Tom Chadwin
Thanks - I'll try it. What do I detect in the response to know it's QGIS
Server? In fact, does someone have a publicly accessible QGIS Server I can
issue that request to?

Thanks

Tom



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Detect-whether-layer-is-from-QGIS-Server-tp5275824p5275880.html
Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] compiling 2.16

2016-07-12 Thread Richard Duivenvoorde

Clean checkout for branche release-2_16, and normal compile:

[ 82%] Generating ui_dialogAbout.py
Traceback (most recent call last):
  File "../../../../../scripts/pyuic-wrapper.py", line 26, in 
import qgis.PyQt.uic.pyuic
ImportError: No module named qgis.PyQt.uic.pyuic
python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/build.make:117:
recipe for target 'python/plugins/GdalTools/tools/ui_dialogAbout.py' failed
make[2]: *** [python/plugins/GdalTools/tools/ui_dialogAbout.py] Error 1
CMakeFiles/Makefile2:5074: recipe for target
'python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all'
failed
make[1]: ***
[python/plugins/GdalTools/tools/CMakeFiles/zzz-GdalTools-2-depend.dir/all]
Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

is this an ordering problem?

Regards,

Richard
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Minoru Akagi
Hi,

2016-07-12 16:59 GMT+09:00 Akbar Gumbira :
> 2016-07-12 16:35 GMT+09:00 Matthias Kuhn :
>> As a general rule of thumb: don't cast to other types if there is no
>> requirement, that will help to prevent such issues and make the upcoming
>> upgrade to python 3 much easier.
>
> Yes, this should be Python 2.xx's developer haiku: Bytes on the outside,
> unicode on the inside. Encode/decode at the edges.

Unicode type release name (str type in python 3) must be compatible
with the saying.

Fixing the error would be easy for the relevant python devs. But if
the change was introduced in 3.0 (`type(QGis.QGIS_RELEASE_NAME)` gives
me `` in QGIS 2.14. Not sure that it was technically
possible to keep str type for the constants), QGIS 2.16 users didn't
have to wait for the relevant plugin devs to release a modified
version.

Thanks,
Minoru
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] geometry().geometry() not stable ?

2016-07-12 Thread Gusthiot Christophe
Hi,
I'm on Windows 7 Entreprise.
Using Qgis 2.14.3 from OSGeo4W.

Christophe



De : Qgis-developer [qgis-developer-boun...@lists.osgeo.org] de la part de 
Matthias Kuhn [matth...@opengis.ch]
Envoyé : mardi 28 juin 2016 07:09
À : qgis-developer@lists.osgeo.org
Objet : Re: [Qgis-developer] geometry().geometry() not stable ?

Hi

On 06/27/2016 03:17 PM, Gusthiot Christophe wrote:
> Hello,
> I'm working on a Python plugin with 3D features. But I have some issues
> with the available methods.
>
> What I'm doing :
>
> - layer->startEditing, to set the layer editable if it's not yet the
> case (asking the user to do it)
> - feature->geometry->geometry, to have the 3D geometry for my feature
> - then I manipulate the geometry
> - layer->changeGeometry, to update the geometry of my feature
> Until the, It works fine...
> - I keep my layer editable, and try to do the same with another feature
> - but : I can do feature->geometry, but feature->geometry->geometry give
> me "Access violation - no RTTI data!"
> - and if I add updateExtents + commitChanges to save my layer, and try
> to do the same again, the feature->geometry->geometry leads to a mini dump

What operating system/distribution are you using? Where did you install
the package from?

Regards
Matthias
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Akbar Gumbira
>
> As a general rule of thumb: don't cast to other types if there is no
> requirement, that will help to prevent such issues and make the upcoming
> upgrade to python 3 much easier.

Yes, this should be Python 2.xx's developer haiku: *Bytes on the outside,
unicode on the inside. Encode/decode at the edges. *It's a bad habit in
Python 2.xx to cast to str when the string probably could contain accented
chars (e.g doing *str(layer.source()*). But in Python 3, str is unicode,
most of problem would probably be gone. For some strategies, perhaps what
we did in InaSAFE could be useful, see the 3rd comment in this PR:
https://github.com/inasafe/inasafe/pull/1674

On Tue, Jul 12, 2016 at 9:35 AM, Matthias Kuhn  wrote:

> Hi Minoru
>
> On 07/12/2016 03:01 AM, Minoru Akagi wrote:
> > Hi,
> >
> > Just a quick note for python plugin devs.
> >
> > I received an error report related to QGis.QGIS_VERSION constant [1].
> > In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
> > have been changed to unicode type. I guess that the change is
> > necessary for unicode release name support.
>
> I don't think the type has changed. Before python just converted it
> silently because the conversion of a pure ascii unicode string was trivial.
> Compare:
>
> >>> str(u'Essen')
> 'Essen'
> >>> str(u'Nødebo')
> Traceback (most recent call last):
>   File "", line 1, in 
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in
> position 1: ordinal not in range(128)
>
> As a general rule of thumb: don't cast to other types if there is no
> requirement, that will help to prevent such issues and make the upcoming
> upgrade to python 3 much easier.
>
> Matthias
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 

*---*
*Akbar Gumbira *
*www.akbargumbira.com *
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Matthias Kuhn
Hi Minoru

On 07/12/2016 03:01 AM, Minoru Akagi wrote:
> Hi,
> 
> Just a quick note for python plugin devs.
> 
> I received an error report related to QGis.QGIS_VERSION constant [1].
> In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
> have been changed to unicode type. I guess that the change is
> necessary for unicode release name support.

I don't think the type has changed. Before python just converted it
silently because the conversion of a pure ascii unicode string was trivial.
Compare:

>>> str(u'Essen')
'Essen'
>>> str(u'Nødebo')
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf8' in
position 1: ordinal not in range(128)

As a general rule of thumb: don't cast to other types if there is no
requirement, that will help to prevent such issues and make the upcoming
upgrade to python 3 much easier.

Matthias
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Unicode type QGIS_RELEASE_NAME and QGIS_VERSION

2016-07-12 Thread Richard Duivenvoorde
On 12-07-16 03:01, Minoru Akagi wrote:
> Hi,
> 
> Just a quick note for python plugin devs.
> 
> I received an error report related to QGis.QGIS_VERSION constant [1].
> In QGIS 2.16, QGis.GIS_RELEASE_NAME and QGis.QGIS_VERSION constants
> have been changed to unicode type. I guess that the change is
> necessary for unicode release name support.
> 
> With QGIS 2.16, encoding GIS_RELEASE_NAME/QGIS_VERSION with no
> explicit character code specified causes UnicodeEncodeError (try
> `str(QGis.QGIS_VERSION)`) and a few plugins seem to be affected (e.g.
> profiletool, numericalVertexEdit, etc).
> 
> [1] https://github.com/minorua/TileLayerPlugin/issues/20

Hi Minoru,

this is probably done to handle 'Nødebo' name for 2.16...

though you could say it is a api-change... I think easiest is to fix it
in plugins? Which (while Python2) should maybe move all str() calls to
unicode() ones?

Not sure there is an easier solution now after 2.16.0 ?

Regards,

Richard



___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] Detect whether layer is from QGIS Server

2016-07-12 Thread Alessandro Pasotti
On Tue, Jul 12, 2016 at 12:32 AM, Tom Chadwin 
wrote:

> I need to detect whether a QGIS WMS layer is from QGIS Server, rather than
> another WMS server:
>
> https://github.com/tomchadwin/qgis2web/issues/306
>
> What's my best method? Search for "qgis_mapserv" in the layer's URL?
> Something else?
>
>
That's not robust, with a rewrite you can easily hide/alter that path.

I suggest you to rely on a WMS getProjectSettings call.

AFAIK that call is unique to QGIS Server.




>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Detect-whether-layer-is-from-QGIS-Server-tp5275824.html
> Sent from the Quantum GIS - Developer mailing list archive at Nabble.com.
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Alessandro Pasotti
w3:   www.itopen.it
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer