PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 655 - bad re-implementations of QApplication.notify result in a SystemError
: bad re-implementations of QApplication.notify result in a SystemError
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P3 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-01-31 12:44 EET by Farsmo
Modified: 2011-02-02 15:46 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farsmo 2011-01-31 12:44:30 EET
from PySide.QtCore import *
from PySide.QtGui import *

class App(QApplication):
    def __init__(self,*args):
        super(App,self).__init__(*args)
    def notify(self,r,e):
        QApplication.notify(self,r,e)
        return None  # deliberately wrong

import sys
app = App(sys.argv)
QWidget()


results in exceptions:

Traceback (most recent call last):
  File "<stdin>", line 8, in notify
TypeError: Invalid return value in function QApplication.notify, expected bool,
got NoneType.
Traceback (most recent call last):
  File "<stdin>", line 13, in <module>
SystemError: NULL result without error in PyObject_Call


This isn't as bad as it looks because the first exception already explains what
the user should fix, but the second exception doesn't look good.
Comment 1 Hugo Parente Lima 2011-02-01 10:17:12 EET
Fixed in commit:
shiboken/5132ceaac226b604ba02d335fa10d95a0bda6d5b
Comment 2 renato filho 2011-02-02 15:46:13 EET
released on beta 5