Fix bug 941 - "Signals with QtCore.Qt types as arguments has invalid signatures"

Reviewer: Renato Araújo <renato.filho@openbossa.org>
          Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
Hugo Parente Lima 2011-07-27 19:24:54 -03:00
commit f918fdb490
5 changed files with 84 additions and 17 deletions

View file

@ -68,6 +68,7 @@ PYSIDE_TEST(bug_879.py)
PYSIDE_TEST(bug_882.py)
PYSIDE_TEST(bug_919.py)
PYSIDE_TEST(bug_921.py)
PYSIDE_TEST(bug_941.py)
PYSIDE_TEST(customproxywidget_test.py)
PYSIDE_TEST(deepcopy_test.py)
PYSIDE_TEST(event_filter_test.py)

17
tests/QtGui/bug_941.py Normal file
View file

@ -0,0 +1,17 @@
import unittest
from PySide.QtCore import *
from PySide.QtGui import *
def foo(a, b):
pass
class TestBug941 (unittest.TestCase):
def testIt(self):
app = QApplication([])
view = QHeaderView(Qt.Horizontal)
self.assertTrue(view.sortIndicatorChanged.connect(foo))
view.sortIndicatorChanged.emit(0, Qt.Vertical) # this can't raise an exception!
if __name__ == '__main__':
unittest.main()