diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-19 16:59:36 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:14 -0300 |
commit | 0e8b50c9b0bf48f068e35586830e2f98a56890d4 (patch) | |
tree | 3cbccf347c1a9114c6fd19945be6192b7286f26b /tests | |
parent | b7f593d99e2c02ddf8bde439df43b98c3d1caa0b (diff) |
Fix bug 1019 - "Overriding QWidget.show or QWidget.hide do not work"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtCore/bug_1019.py | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt index 398746d75..cdd260e0e 100644 --- a/tests/QtCore/CMakeLists.txt +++ b/tests/QtCore/CMakeLists.txt @@ -23,6 +23,7 @@ PYSIDE_TEST(bug_938.py) PYSIDE_TEST(bug_953.py) PYSIDE_TEST(bug_987.py) PYSIDE_TEST(bug_994.py) +PYSIDE_TEST(bug_1019.py) PYSIDE_TEST(blocking_signals_test.py) PYSIDE_TEST(classinfo_test.py) PYSIDE_TEST(child_event_test.py) diff --git a/tests/QtCore/bug_1019.py b/tests/QtCore/bug_1019.py new file mode 100644 index 000000000..b7f1f68f7 --- /dev/null +++ b/tests/QtCore/bug_1019.py @@ -0,0 +1,32 @@ +import unittest +from PySide.QtCore import * + +class MyTimer (QTimer): + def __init__(self): + QTimer.__init__(self) + self.startCalled = False + + @Slot() + def slotUsedToIncreaseMethodOffset(self): + pass + +class MyTimer2 (MyTimer): + + @Slot() + def slotUsedToIncreaseMethodOffset2(self): + pass + + def start(self): + self.startCalled = True + QCoreApplication.instance().quit() + +class TestBug1019 (unittest.TestCase): + def testIt(self): + app = QCoreApplication([]) + t = MyTimer2() + QTimer.singleShot(0, t.start) + app.exec_() + self.assertTrue(t.startCalled) + +if __name__ == "__main__": + unittest.main() |