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 123 - Support reference (not object) ownership for arguments
: Support reference (not object) ownership for arguments
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: BoostPythonGenerator
: HEAD
: All All
: P5 major
Assigned To: renato filho
:
:
: 116
  Show dependency treegraph
 
Reported: 2010-01-20 18:42 EET by Lauro Moura
Modified: 2010-03-24 16:27 EET (History)
5 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 2010-01-20 18:42:57 EET
It would be very useful to have some kind of directive/tag/attribute in the
typesystem to indicate whether an object being passed as argument to a method
should have its reference count increased.

Example: QAbstractItemView.setModel(QAbstractItemModel*). While it requires the
existence of the model as long as the view is alive, the view does *not* take
ownership of the model, as it can be used by many views.

And also this would increase the "pythonization" index of PySide, as these
functions would behave just like normal python functions that keep reference of
the argument :)

PS: for shiboken too
Comment 1 Luciano Wolf 2010-02-03 15:18:13 EET
QAbstractTransition.setTargetStates(QList<QAbstractState*>) has the same
problem.
Comment 2 Marcelo Lira 2010-02-17 15:10:06 EET
The ability to use keep references alive was added in shiboken/d23df801.
Updates to pyside-shiboken type system files are on the way.
Comment 3 Marcelo Lira 2010-02-18 14:57:03 EET
QAbstractTransition.setTargetStates was fixed in pyside-shiboken/d617892b with
tests in pyside-shiboken/97dd1938.