diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-02-04 15:32:55 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:53:54 -0300 |
commit | 34529760f4766a84a7dbb8f32c776abfe9c4fdda (patch) | |
tree | 5deea14a833ffb571250335a2b80a4fc383df549 | |
parent | 93bd129cfb95aefb1fbbfbaeb4da614c95dce1d6 (diff) |
Fix bug 643 - "QTabWidget.insertTab not taking ownership"
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 2 | ||||
-rw-r--r-- | tests/QtGui/qtabwidget_test.py | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index fd83b8fb2..7dea272e0 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -3841,7 +3841,7 @@ <parent index="this" action="add"/> </modify-argument> </modify-function> - <modify-function signature="insertTab(int, QWidget*, const QIcon&, const QString&)"> + <modify-function signature="insertTab(int, QWidget*, const QString&)"> <modify-argument index="2"> <parent index="this" action="add"/> </modify-argument> diff --git a/tests/QtGui/qtabwidget_test.py b/tests/QtGui/qtabwidget_test.py index 143f99cab..421d02f91 100644 --- a/tests/QtGui/qtabwidget_test.py +++ b/tests/QtGui/qtabwidget_test.py @@ -1,9 +1,13 @@ import unittest -from PySide.QtGui import QTabWidget +from PySide.QtGui import * from helper import TimedQApplication +def makeBug643(tab): + button = QPushButton('Foo') + tab.insertTab(0, button, 'Foo') + class RemoveTabMethod(TimedQApplication): def setUp(self): TimedQApplication.setUp(self) @@ -17,5 +21,9 @@ class RemoveTabMethod(TimedQApplication): def testRemoveTabPresence(self): self.assert_(getattr(self.tab, 'removeTab')) + def testInsertTab(self): + makeBug643(self.tab) + self.assertEqual(self.tab.count(), 1) + if __name__ == '__main__': unittest.main() |