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:
Marcelo Lira 2010-12-13 15:19:57 -03:00 • committed by Hugo Parente Lima
commit ee8d6262dc
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,7 @@
import unittest
from PySide.QtCore import QObject
from PySide.QtGui import QInputDialog
from helper import UsesQApplication
@ -17,7 +18,7 @@ class DynamicSignalTest(UsesQApplication):
self.assert_(len(lst))
obj = lst[0]
self._called = False
obj.destroyed.connect(self.cb)
obj.destroyed[QObject].connect(self.cb)
obj = None
del dlg
self.assert_(self._called)