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 327 - Default overloaded signal connection order differs from PyQt
: Default overloaded signal connection order differs from PyQt
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P3 major
Assigned To: Matti Airas
:
:
:
  Show dependency treegraph
 
Reported: 2010-08-31 09:20 EEST by Matti Airas
Modified: 2011-01-06 16:25 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-08-31 09:20:07 EEST
Now, this is a minor one, but thought about reporting it nevertheless since it
affects people porting software from PyQt:

In the example painterpaths.py, connecting penWidthSpinBox.valueChanged and
rotationAngleSpinBox.valueChanged without specifying the signature results in
unicode values being transmitted:

  self.penWidthSpinBox.valueChanged.connect(self.renderAreas[i].setPenWidth)

In PyQt, the int values are preferred. Hence, the example won't work unless the
signature is defined when connecting the signals:

 
self.penWidthSpinBox.valueChanged[int].connect(self.renderAreas[i].setPenWidth)

Is the order of preference defined somewhere? Reading the newsigslot.html
document page comments, I assume they are.
Comment 1 renato filho 2010-08-31 12:00:57 EEST
Yes we found this problem during the examples update process, but after a
discussion we decided keep this because this is no a big problem and the
recommendation is always use the signature for signal connections, because this
make the code easier to run with different Qt versions. Because if you do not
specify the signature this will use the default and the rule to choose the
default can change if the signal has  new signatures on others versions.

I think the best solution for this is create a documentation about that. What
do you think?
Comment 2 Matti Airas 2010-09-01 07:54:51 EEST
(In reply to comment #1)
> Yes we found this problem during the examples update process, but after a
> discussion we decided keep this because this is no a big problem and the
> recommendation is always use the signature for signal connections, because this
> make the code easier to run with different Qt versions. Because if you do not
> specify the signature this will use the default and the rule to choose the
> default can change if the signal has  new signatures on others versions.

If we take this route, shouldn't we disallow connecting any overloaded signals
without defining the exact signature? The current approach leads to even more
obscure errors than either having a consistent default signature or throwing an
exception when an explicit signature is not defined.
Comment 3 Matti Airas 2010-11-22 15:39:14 EET
According to mailing list discussion, this requires a PSEP to be written.
Assigning to myself for that.
Comment 4 Matti Airas 2010-11-23 11:21:14 EET
Assigning to myself.
Comment 5 Matti Airas 2010-12-21 11:14:20 EET
After a lot of discussion and experimentation, it appears changing the current
behaviour in any way is a bad idea after all.

http://lists.openbossa.org/pipermail/pyside/2010-December/001679.html

I'm resolving the bug as INVALID.
Comment 6 renato filho 2011-01-06 16:25:19 EET
released on beta3