summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-05-03 15:03:44 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2011-05-03 15:46:24 -0300
commit9b793705feae3da73230198d61cb29627b558e6a (patch)
treedb04f5a7ec34a8e5c46975875046e69ec04d4ef0 /tests
parentf5669ba34268dc9ca39c11cbc1b1cf893457deb0 (diff)
downloadpyside-9b793705feae3da73230198d61cb29627b558e6a.tar.gz
pyside-9b793705feae3da73230198d61cb29627b558e6a.tar.xz
pyside-9b793705feae3da73230198d61cb29627b558e6a.zip
Fix bug 844 - "Crash in QGraphicsItem::toGraphicsObject when printing obj reference"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_844.py19
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index ff0ce68..db6b19c 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -55,6 +55,7 @@ PYSIDE_TEST(bug_778.py)
PYSIDE_TEST(bug_793.py)
PYSIDE_TEST(bug_811.py)
PYSIDE_TEST(bug_836.py)
+PYSIDE_TEST(bug_844.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
diff --git a/tests/QtGui/bug_844.py b/tests/QtGui/bug_844.py
new file mode 100644
index 0000000..e01d7ea
--- /dev/null
+++ b/tests/QtGui/bug_844.py
@@ -0,0 +1,19 @@
+from PySide.QtGui import *
+from PySide.QtCore import *
+
+class QtKeyPressListener(QObject):
+ def __init__(self, obj):
+ QObject.__init__(self)
+ obj.installEventFilter(self)
+ self.fConnections = {}
+
+ def eventFilter(self, obj, event):
+ # This used to crash here due to a misbehaviour of type discovery!
+ return QObject.eventFilter(self, obj, event)
+
+app = QApplication([])
+key_listener = QtKeyPressListener(app)
+w = QLabel('Hello')
+w.show()
+QTimer.singleShot(0, w.close)
+app.exec_()