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:
parent
4f873e6f79
commit
f918fdb490
5 changed files with 84 additions and 17 deletions
|
|
@ -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
17
tests/QtGui/bug_941.py
Normal 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()
|
||||
|
|
@ -4,30 +4,23 @@
|
|||
<load-typesystem name="typesystem_gui.xml" generate="no"/>
|
||||
<object-type name="TestObject" />
|
||||
|
||||
<inject-code>
|
||||
<inject-code position="end">
|
||||
Shiboken::TypeResolver::createObjectTypeResolver< ::PySideCPP2::TestObjectWithoutNamespace>("TestObjectWithoutNamespace*");
|
||||
Shiboken::TypeResolver::createValueTypeResolver< ::PySideCPP2::PySideLong>("PySideLong");
|
||||
Shiboken::TypeResolver::createObjectTypeResolver< ::PySideCPP::TestObjectWithNamespace>("TestObjectWithNamespace*");
|
||||
Shiboken::TypeResolver::createValueTypeResolver< ::PySideInt>("PySideInt");
|
||||
qRegisterMetaType<PySideInt>("PySideInt");
|
||||
qRegisterMetaType<PySideCPP2::PySideLong>("PySideLong");
|
||||
</inject-code>
|
||||
|
||||
<namespace-type name="PySideCPP">
|
||||
<object-type name="TestObjectWithNamespace" >
|
||||
<modify-function signature="emitSignal(PySideCPP::TestObjectWithNamespace*)">
|
||||
<modify-argument index="1">
|
||||
<replace-type modified-type="TestObjectWithNamespace*"/>
|
||||
</modify-argument>
|
||||
</modify-function>
|
||||
</object-type>
|
||||
<object-type name="TestObjectWithNamespace" />
|
||||
</namespace-type>
|
||||
|
||||
<namespace-type name="PySideCPP2" generate="no">
|
||||
<enum-type name="Enum1" />
|
||||
<object-type name="TestObjectWithoutNamespace" >
|
||||
<enum-type name="Enum2" />
|
||||
<modify-function signature="emitSignalWithNamespace(PySideCPP2::TestObjectWithoutNamespace*)">
|
||||
<modify-argument index="1">
|
||||
<replace-type modified-type="PySideCPP2::TestObjectWithoutNamespace*"/>
|
||||
</modify-argument>
|
||||
</modify-function>
|
||||
</object-type>
|
||||
</namespace-type>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue