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 699 - PySide.QtCore.Property doesn't throw a TypeError if the first arg isn't a PyType.
: PySide.QtCore.Property doesn't throw a TypeError if the first arg isn't a PyT...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: 1.0.0 rc1
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2011-02-22 19:19 EET by Hugo Parente Lima
Modified: 2011-04-01 23:16 EEST (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 Hugo Parente Lima 2011-02-22 19:19:37 EET
The code:


class File (QDeclarativeItem):
    def __init__(self, parent = None):
        QDeclarativeItem.__init__(self, parent)
        self._name = ""

    nameChanged = Signal()

    def getName(self):
        return self._name

    def setName(self, value):
        if value != self._name:
            self._name = value
            self.nameChanged.emit()

    name = Property(getName, setName, notify = nameChanged)

doesn't throw any exception, but if you try:

f = File()
print f.name

# you get
TypeError: setName() takes exactly 2 arguments (1 given)
Comment 1 Hugo Parente Lima 2011-03-25 16:35:41 EET
Fixed in commit:

pyside/3cd2cad128f1d6f22a79fce1e97dde9e1f08485b
Comment 2 Hugo Parente Lima 2011-04-01 23:16:02 EEST
Closing bug after release of PySide 1.0.1.