aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-02-02 19:21:16 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:53:52 -0300
commita54d0181bdcd3dfbd3e1df2814a23124acc95ee1 (patch)
tree2b256dfe07707094575eb9ea6d5cd295d5994d3f
parentfac9507d3eccfe6c46462496be1e9991312ea644 (diff)
Fix bug 653 - "Crash after calling QWizardPage.wizard()"
Reviewer: Renato Araújo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml8
-rw-r--r--tests/QtGui/CMakeLists.txt1
-rw-r--r--tests/QtGui/bug_653.py17
3 files changed, 25 insertions, 1 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index 5a69a11ff..fd83b8fb2 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -1632,7 +1632,13 @@
</modify-argument>
</modify-function>
</object-type>
- <object-type name="QWizardPage" />
+ <object-type name="QWizardPage">
+ <modify-function signature="wizard()const">
+ <modify-argument index="this">
+ <parent index="return" action="add"/>
+ </modify-argument>
+ </modify-function>
+ </object-type>
<object-type name="QFocusFrame">
<modify-function signature="setWidget(QWidget*)">
<modify-argument index="1">
diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt
index 9ed86d683..83af1e610 100644
--- a/tests/QtGui/CMakeLists.txt
+++ b/tests/QtGui/CMakeLists.txt
@@ -33,6 +33,7 @@ PYSIDE_TEST(bug_589.py)
PYSIDE_TEST(bug_617.py)
PYSIDE_TEST(bug_640.py)
PYSIDE_TEST(bug_652.py)
+PYSIDE_TEST(bug_653.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_653.py b/tests/QtGui/bug_653.py
new file mode 100644
index 000000000..fdca31a66
--- /dev/null
+++ b/tests/QtGui/bug_653.py
@@ -0,0 +1,17 @@
+import unittest
+from PySide.QtCore import *
+from PySide.QtGui import *
+
+class TestBug653(unittest.TestCase):
+ """Crash after calling QWizardPage.wizard()"""
+ def testIt(self):
+ app = QApplication([])
+
+ wizard = QWizard()
+ page = QWizardPage()
+ wizard.addPage(page)
+ page.wizard() # crash here if the bug still exists due to a circular dependency
+ wizard.show()
+
+if __name__ == "__main__":
+ unittest.main() \ No newline at end of file