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 684 - New-style signals does not accept signals with enums as arguments.
: New-style signals does not accept signals with enums as arguments.
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: All All
: P2 major
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-12 14:35 EET by Lauro Moura
Modified: 2011-02-17 19:18 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 Lauro Moura 2011-02-12 14:35:35 EET

    
Comment 1 Lauro Moura 2011-02-12 15:14:45 EET
(Again hitting enter before writing the description...)

This bug is affecting QAudioOutput::stateChanged(QAudio::State) signal. Trying
to connect to it explicitly yields some errors:

self.audioOutput.stateChanged[QAudio.State].connect(self.stateChanged)
IndexError: Signature stateChanged(PyObject) not found for signal: stateChanged

The offending code seems to be the function getTypeName in pysidesignal.cpp
(libpyside). If a type is received it checks if it is a SbkObjectType and if
not (as in with Enum), proceeds to check the default types, setting PyObject as
the typename of the Enum type.
Comment 2 Lauro Moura 2011-02-12 17:25:14 EET
Proposed solution (maybe a little bit overengineered): Add the same private
attribute original_name from SbkObjectType to enums. This solution also creates
a SbkEnumType to hold the d pointer in the same way of SbkObjectType.

Shiboken:
http://qt.gitorious.org/~lauromoura/pyside/lauro-shiboken/commits/enum_signals
PySide:
http://qt.gitorious.org/~lauromoura/pyside/lauro-pyside/commits/enum_signals
Comment 3 Matti Airas 2011-02-15 05:57:30 EET
Hugo, could you please state reasons for the prioritization decisions you make?
If you just slap the priorities without saying a word, it's very difficult for
others to understand what's going on or why the decision was made.
Comment 4 Hugo Parente Lima 2011-02-15 13:06:14 EET
Sorry, I was doing it on my "rebel monday", so I even forgot to assign the bug
to me. Anyway it's a P2 due to being a basic signal/slot feature.
Comment 5 Hugo Parente Lima 2011-02-15 19:44:15 EET
Fixed in commits:

pyside/0ad9c484dff7a3985f733d61ef0d47e7e34ac69b
shiboken/938c2e314c94acf9ab24999e79464e58d8e8371d

I was doing it on the rebel monday but only finished it today (waiting for
buildbot compilation and polishing the commits), a little prioritization
transgression however not so much.
Comment 6 Hugo Parente Lima 2011-02-17 19:18:26 EET
Released in 1.0.0~rc1