PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 314 - Old-style signal connected to a class member function does not work
: Old-style signal connected to a class member function does not work
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P5 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-25 11:50 EEST by Matti Airas
Modified: 2011-07-12 01:24 EEST (History)
9 users (show)

See Also:


Attachments
Sample code (741 bytes, text/x-python)
2010-08-25 12:02 EEST, Matti Airas
Details
fixed example (751 bytes, text/x-python)
2010-08-25 14:03 EEST, renato filho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-08-25 11:50:26 EEST
When a signal is connected to a class member function, I get the following
error:

Error calling slot "output" 
TypeError: output() takes exactly 2 arguments (1 given)

See attachment for example.

The example works if I replace the old-style signal definitions with new-style
ones.
Comment 1 Matti Airas 2010-08-25 12:02:49 EEST
Created attachment 62 [details]
Sample code
Comment 2 renato filho 2010-08-25 14:02:53 EEST
Hi Matti,

I checked your examples and I found some confusions with signal connection, I
fixed this and I will upload this.

The problem here is: when you use the old style signal connection you need to
use the full signature of the singal to get this working. 

Maybe we can try to handle this problem with a more detailed error message.
Comment 3 renato filho 2010-08-25 14:03:27 EEST
Created attachment 65 [details]
fixed example
Comment 4 renato filho 2010-08-25 14:07:56 EEST
*** Bug 315 has been marked as a duplicate of this bug. ***
Comment 5 Matti Airas 2010-08-25 15:27:02 EEST
But the given sample DOES work on PyQt, even with the lacking signatures. The
sample I gave was simply extracted from the examples/itemviews/fetchmore.py
example.

So, if we don't fix this, it's an incompatibility with PyQt. Of course, we're
probably regarding the old syntax as deprecated, but it's very widely used and
many people porting their code might be bitten by this. If e.g. implementation
issues prohibit us from fixing the issue, the differing behaviour needs to be
explicitly documented.
Comment 6 renato filho 2010-08-25 15:43:34 EEST
I think the effort necessary to fix this is not valid, like you sad this is a
deprecated function.

Maybe only update the documentation about that incompatibility feature.
Comment 7 Matti Airas 2010-08-26 10:52:56 EEST
Is it OK to keep this bug open for a while - I'll try to port some real-world
apps to PySide soon, and at that point we'll hopefully get a better
understanding whether the degenerate syntax is used "out there"?
Comment 8 Matti Airas 2010-09-01 10:25:08 EEST
At least the rather large qtdemo.py example uses the degenerate format for
creating and connecting signals.
Comment 9 Matti Airas 2010-11-22 15:29:59 EET
No-one else has complained about this - closing as INVALID.
Comment 10 Hugo Parente Lima 2010-11-25 17:53:38 EET
Released on version 1.0.0~beta1
Comment 11 renato filho 2011-01-27 10:24:49 EET
*** Bug 645 has been marked as a duplicate of this bug. ***
Comment 12 renato filho 2011-07-12 01:24:18 EEST
*** Bug 911 has been marked as a duplicate of this bug. ***