[Kde-bindings] [Bug 219787] krosspython: crash when PyQt signal is connected to C++ method that calls a function in the script

Daniel Calviño Sánchez danxuliu at gmail.com
Wed Dec 23 06:28:02 UTC 2009


https://bugs.kde.org/show_bug.cgi?id=219787





--- Comment #1 from Daniel Calviño Sánchez <danxuliu gmail com>  2009-12-23 07:27:59 ---
Created an attachment (id=39277)
 --> (http://bugs.kde.org/attachment.cgi?id=39277)
Patch for unittest.py and TestObject showing the bug

Here it is a unit test showing the problem.

I have added some attributes and slots to TestObject. There is a slot to
connect the Python signal from C++, connectCallTestFunction. It adapts the pure
signal name to a name understood by connect (signals start by "2").

The signal is connected to another slot, callTestFunction, which calls the
function in the script (managed by the Kross Action stored in the attribute)
named "testFunction" with parameter "42".

Finally, another slot returns the value returned by "testFunction" when it was
called, that should be a QVariantList with just one integer element, 42 (as
testFunction returns the argument it received). This isn't needed to show the
crash, as it happens when the function is called, but I added it to have
something to assert once the crash was fixed.

The test method in unittest.py first checks that PyQt is installed and its
version is 4.5 or greater. Otherwise, the test is skipped.

Then it just sets the scenario that triggers the crash, as explained before.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kde-bindings mailing list