diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-03-21 18:08:49 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:04 -0300 |
commit | 080dafd0e50f63943bcf7f0b9e8cdd11b37a4230 (patch) | |
tree | a2813564684ae40ab9391f378c5b9930852a3ba5 | |
parent | 3c50d09ddac8738e57c629a729448a41bce15659 (diff) |
Fix bug 736 - "Signal/Slot is not working at all"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r-- | libpyside/pysidesignal.cpp | 2 | ||||
-rw-r--r-- | tests/QtGui/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/QtGui/bug_736.py | 19 |
3 files changed, 21 insertions, 1 deletions
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp index 1fe4b7f86..515b1a94a 100644 --- a/libpyside/pysidesignal.cpp +++ b/libpyside/pysidesignal.cpp @@ -736,7 +736,7 @@ QString getCallbackSignature(const char* signal, QObject* receiver, PyObject* ca numArgs = objCode->co_flags & CO_VARARGS ? -1 : objCode->co_argcount; } else if (PyCFunction_Check(callback)) { functionName = ((PyCFunctionObject*)callback)->m_ml->ml_name; - useSelf = ((PyCFunctionObject*)callback)->m_self; + useSelf = 0;//((PyCFunctionObject*)callback)->m_self; // commented out to fix bug 736 int flags = ((PyCFunctionObject*)callback)->m_ml->ml_flags; if (receiver) { diff --git a/tests/QtGui/CMakeLists.txt b/tests/QtGui/CMakeLists.txt index 76f3e06f6..ef9b9ac8b 100644 --- a/tests/QtGui/CMakeLists.txt +++ b/tests/QtGui/CMakeLists.txt @@ -45,6 +45,7 @@ PYSIDE_TEST(bug_696.py) PYSIDE_TEST(bug_693.py) PYSIDE_TEST(bug_714.py) PYSIDE_TEST(bug_728.py) +PYSIDE_TEST(bug_736.py) PYSIDE_TEST(customproxywidget_test.py) PYSIDE_TEST(deepcopy_test.py) PYSIDE_TEST(float_to_int_implicit_conversion_test.py) diff --git a/tests/QtGui/bug_736.py b/tests/QtGui/bug_736.py new file mode 100644 index 000000000..49a954ccc --- /dev/null +++ b/tests/QtGui/bug_736.py @@ -0,0 +1,19 @@ +import unittest +from PySide.QtCore import * +from PySide.QtGui import * + +class TestBug736 (unittest.TestCase): + + def testIt(self): + app = QApplication([]) + slider = QSlider(Qt.Horizontal) + slider2 = QSlider(Qt.Horizontal) + + slider2.setMaximum(10) + slider.valueChanged[int].connect(slider2.setMaximum) + slider.valueChanged[int].emit(100) + self.assertEqual(slider2.maximum(), 100) + + +if __name__ == '__main__': + unittest.main() |