<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
Sometimes there is quiet a lot of traffic on this list and some
questions get forgotten. Or simply nobody knows the answer. Don't
take it personal :-)<br>
<br>
I don't know if that's the reason, but you should use new-style
signals.<br>
<br>
iface.activeLayer().committedFeaturesRemoved.connect(listener)<br>
<br>
Maybe it helps.<br>
<br>
Best,<br>
Matthias<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/13/2015 09:18 AM, //./\\-/_.\\
wrote:<br>
</div>
<blockquote cite="mid:K2zvErr----0@tutanota.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
Hi <span style="background-color: rgba( 255 , 255 , 255 , 0 )">developers</span>,<br>
<br>
With OSX, QGIS 2.8.3 and higher, I found an error what appears to
be a regression (perhaps).<br>
And with QGIS 2.12, the problem persists.<br>
<br>
<span style="background-color: rgba( 255 , 255 , 255 , 0 )">So, if
you want to try to reproduce the error, open python console and
try (with any active layer on editing mode):<br>
<br>
</span><span style="background-color: rgba( 255 , 255 , 255 , 0 )">>>>
layer = iface.activeLayer()</span><br>
<span style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )">>>>
def listener(s, l):<br>
>>> </span></span><span style="background-color:
rgba( 255 , 255 , 255 , 0 )">print s, l<br>
</span><span style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><br>
Then,<br>
<br>
>>> </span></span>layer.committedFeaturesRemoved.connect(listener)<br>
<br>
Or<br>
</span><span style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><br>
>>> from PyQt4.QtCore import QObject<br>
>>> from PyQt4.QtCore import SIGNAL</span><br>
</span><span style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )">>>>
</span></span></span></span></span><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )">QObject.connect(layer,
SIGNAL(r"committedFeaturesRemoved(</span></span></span></span><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
style="background-color: rgba( 255 , 255 , 255 , 0 )"><span
class="pl-s">QString, QgsFeatureIds</span> )"),
listener)</span></span></span><br>
<br>
It returns this error: “TypeError: C++ type 'QgsFeatureIds' is
not supported as a signal argument type”<br>
<br>
My English is so bad that nobody wants to answer me?<br>
<br>
m431m</span><br>
<br>
<br>
<br>
1. Oct 2015 16:22 de <a moz-do-not-send="true"
href="mailto:m431m@tutanota.com" target="_blank">m431m@tutanota.com</a>:<br>
<br>
<blockquote class="tutanota_quote" style="border-left: 1px solid
#93A3B8; padding-left: 10px; margin-left: 5px;"> Hi,<br>
No Mac user able to reproduce the error? Am i the only one?<span
id="result_box" class="short_text" lang="en"><span class="hps"></span></span><br>
m431m<br>
<br>
25. Sep 2015 13:50 de <a moz-do-not-send="true" target="_blank"
href="mailto:m431m@tutanota.com">m431m@tutanota.com</a>:<br>
<br>
<blockquote class="tutanota_quote" style="border-left: 1px solid
#93A3B8; padding-left: 10px; margin-left: 5px;"> <span
style="background-color: rgba( 255 , 255 , 255 , 0 )">Hi
QGIS developers!<br>
<br>
I got strange error with the 'commitedFeaturesRemoved'
signal.<br>
See: <a moz-do-not-send="true" target="_blank"
href="http://www.qgis.org/api/classQgsVectorLayer.html#a520550b45603ed20d593b1050768bd97">http://www.qgis.org/api/classQgsVectorLayer.html#a520550b45603ed20d593b1050768bd97</a><br>
<br>
I try on python console (with any active layer on editing
mode):<br>
>>> layer = iface.activeLayer()<br>
>>> def listener(s, l):<br>
>>> print s, l<br>
>>>
layer.committedFeaturesRemoved.connect(listener)<br>
<br>
It returns `TypeError: C++ type 'QgsFeatureIds' is not
supported as a signal argument type`<br>
<br>
Now replace
`layer.commitedFeaturesRemoved.connect(listener)`by:<br>
>>> from PyQt4.QtCore import QObject<br>
>>> from PyQt4.QtCore import SIGNAL<br>
>>> QObject.disconnect(layer,
SIGNAL(r"committedFeaturesRemoved()"), listener)<br>
<br>
No error, but it returns `False`.<br>
<br>
If I delete some features and switch off editing mode, it
returns nothing! No print! The signal doesn't work(?)<br>
<br>
After exchanging a few message with some people on irc
#qgis, the error only appears with latest QGIS version on
OSX10.10.5. (it works well with 2.8.2). <br>
<br>
Maybe someone that has approached the same problem... and
solved it?<br>
<br>
</span>
<div>m431m</div>
</blockquote>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Matthias Kuhn
OPENGIS.ch - <a class="moz-txt-link-freetext" href="https://www.opengis.ch">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</body>
</html>