aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore/bug_1019.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore/bug_1019.py')
-rw-r--r--tests/QtCore/bug_1019.py32
1 files changed, 32 insertions, 0 deletions
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()