summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-30 15:26:20 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:48:06 -0300
commit394cdb357d88e4c6968d3986ca7820756661fa35 (patch)
tree1b4057fa7f5a5d5344f1b5b6b5ad92df06db651b
parent9b02c46c03a3e246146ccd5b63fda8cb0335aac7 (diff)
Fix bug 546 - "Python crash on exit"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml4
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_546.py14
3 files changed, 17 insertions, 2 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index be38ca91..c7c8f17f 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -3152,8 +3152,8 @@
</modify-argument>
</modify-function>
<modify-function signature="setWidget(QWidget *)">
- <modify-argument index="1">
- <parent index="this" action="add"/>
+ <modify-argument index="this">
+ <parent index="1" action="add"/>
</modify-argument>
</modify-function>
</object-type>
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 65b10e81..4514731c 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -22,6 +22,7 @@ PYSIDE_TEST(bug_493.py)
PYSIDE_TEST(bug_500.py)
PYSIDE_TEST(bug_512.py)
PYSIDE_TEST(bug_525.py)
+PYSIDE_TEST(bug_546.py)
PYSIDE_TEST(bug_547.py)
PYSIDE_TEST(bug_549.py)
PYSIDE_TEST(bug_569.py)
diff --git a/tests/QtGui/bug_546.py b/tests/QtGui/bug_546.py
new file mode 100644
index 00000000..845b64ed
--- /dev/null
+++ b/tests/QtGui/bug_546.py
@@ -0,0 +1,14 @@
+import unittest
+from PySide.QtGui import *
+
+class TestBug546(unittest.TestCase):
+
+ """Test to check a crash at exit"""
+ def testIt(self):
+ app = QApplication([])
+ textEdit = QPlainTextEdit()
+ completer = QCompleter(("foo", "bar"), textEdit)
+ completer.setWidget(textEdit)
+
+if __name__=='__main__':
+ unittest.main()