diff options
-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() |