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 186 - Generated code won't compile if hash-function is defined for an object-type
: Generated code won't compile if hash-function is defined for an object-type
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: Shiboken
: HEAD
: All All
: P5 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2010-03-18 21:27 EET by Matti Airas
Modified: 2010-03-24 16:39 EET (History)
7 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-03-18 21:27:19 EET
If I do this (in QtGui):

<object-type name="QTreeWidgetItem" hash-function="qHash">

I get this kind of generated code:

static long SbkQTreeWidgetItem_HashFunc(PyObject* obj){
    return qHash(Shiboken::Converter<QTreeWidgetItem >::toCpp(obj));
}

which won't compile. If changed to this (ptr instead of value):

static long SbkQTreeWidgetItem_HashFunc(PyObject* obj){
    return qHash(Shiboken::Converter<QTreeWidgetItem* >::toCpp(obj));
}

everything works fine.
Comment 1 Hugo Parente Lima 2010-03-19 15:05:21 EET
Fixed in commit shiboken/42fd70af65f843853df851657f175351c072ff76