Fixed new style signal connection tests for the proper semantics.
One example to clarify: for the "destroyed(QObject* = 0)" signal, "obj.destroyed.connect(...)" connects to "destroyed()", and "obj.destroyed[QObject].connect(...)" connects to "destroyed(QObject*)". Reviewed by Lauro Moura <lauro.neto@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
154560c9c5
commit
4630f41f6a
2 changed files with 7 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ class Obj(QObject):
|
|||
def connectNotify(self, signal):
|
||||
self.signal = signal
|
||||
|
||||
def callback():
|
||||
def callback(arg=None):
|
||||
pass
|
||||
|
||||
class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
|
||||
|
|
@ -33,7 +33,11 @@ class TestConnectNotifyWithNewStyleSignals(UsesQCoreApplication):
|
|||
|
||||
def testNewStyle(self):
|
||||
sender = Obj()
|
||||
|
||||
sender.destroyed.connect(callback)
|
||||
self.assertEqual(sender.signal, SIGNAL('destroyed()'))
|
||||
|
||||
sender.destroyed[QObject].connect(callback)
|
||||
self.assertEqual(sender.signal, SIGNAL('destroyed(QObject*)'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue