[PyQt] Regressions on destruction of objects?

Phil Thompson phil at riverbankcomputing.co.uk
Thu Oct 29 07:56:42 GMT 2009


On Thu, 29 Oct 2009 00:37:14 +0100, Giovanni Bajo <rasky at develer.com>
wrote:
> On Wed, 28 Oct 2009 22:14:41 +0000, Phil Thompson
> <phil at riverbankcomputing.co.uk> wrote:
>> On Wed, 28 Oct 2009 19:35:44 +0100, Giovanni Bajo <rasky at develer.com>
>> wrote:
>>> Hi Phil,
>>> 
>>> I'm testing PyQt 4.6.1 and SIP 4.9.1 over my small regression testsuite
>>> (it contains testcases for bugs that I have reported to you over the
>>> years and that you have fixed).
>>> 
>>> There are 4 testcases failing with the new SIP/PyQt pair, but they all
>>> seem related to the same issue. Try this one:
>>> 
>>> =====================================================================
>>> #!/usr/bin/env python
>>> from PyQt4.Qt import *
>>> 
>>> a = QObject(None)
>>> 
>>> called = []
>>> def myslot():
>>>     called.append(True)
>>> 
>>> QObject.connect(a, SIGNAL("destroyed()"), a, SIGNAL("QUIT()"))
>>> QObject.connect(a, SIGNAL("destroyed()"), myslot)
>>> QObject.connect(a, SIGNAL("QUIT()"), myslot)
>>> 
>>> del a
>>> assert len(called) == 2, len(called)
>>> =====================================================================
>>> 
>>> I would say this should work, right?
>> 
>> Fixed in tonight's PyQt snapshot (and test added to the test suite).
> 
> Can you send me the patch please?

Attached.

Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: destroyed.diff
Type: text/x-diff
Size: 755 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091029/8bd31019/destroyed.bin


More information about the PyQt mailing list