[PyKDE] Re: Auto-disconnection of signals broken?

Giovanni Bajo rasky at develer.com
Sat Mar 18 15:52:03 GMT 2006

Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

>>> Phil, the testcase is indeed fixed, but not the original bug in my
>>> application. I will try reducing a new testcase for the problem,
>> That was faster than expected:
> Hopefully fixed this time.

Uhm, but you broke the original testcase again! For reference, here it is

from qt import *

app = QApplication([])

o = QObject(None)
w = QWidget(None)

QObject.connect(o, PYSIGNAL("FOO"), w.update)
o.emit(PYSIGNAL("FOO"), ())

o.emit(PYSIGNAL("FOO"), ())

app.sendPostedEvents(w, QEvent.DeferredDelete)
o.emit(PYSIGNAL("FOO"), ())
Traceback (most recent call last):
  File "D:\pyqtbug9.py", line 17, in ?
    o.emit(PYSIGNAL("FOO"), ())
RuntimeError: underlying C/C++ object has been deleted

This is with PyQt snapshot-20060314, SIP snapshot-20060317.

BTW: don't you have a regression testsuite for PyQt?
Giovanni Bajo

More information about the PyQt mailing list