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 55 - Qt::HANDLE does not have a return_value_policy
: Qt::HANDLE does not have a return_value_policy
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: PySide
: HEAD
: Macintosh Mac OS
: P2 major
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2009-09-10 17:35 EEST by Brendan Duncan
Modified: 2009-10-14 10:59 EEST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brendan Duncan 2009-09-10 17:35:02 EEST
On OSX and Windows, Qt::HANDLE is a typedef of void* instead of usigned long
(as it is on X11). 

 There is no return_value_policy for void*, so any method that returns
Qt::HANDLE will cause the compiler to fail with the error:

error: no match for call to ‘(const
boost::python::detail::specify_a_return_value_policy_to_wrap_functions_returning<void*>)
(void*)’
Comment 1 Brendan Duncan 2009-09-10 20:12:51 EEST
OSMenuRef is also defined as void* in qmacdefines_mac.h,
which is returned by QMenu::macMenu() and QMenuBar::macMenu().  A
return_value_policy also needs to be made for that...unless a generic void*
return policy can be defined.

Another option (which is what I'm doing in the meantime) is to have the methods
that return Qt::HANDLE or OSMenuRef ignored.

<rejection class="*" function-name="handle"/>
<rejection class="*" function-name="macMenu"/>
Comment 2 renato filho 2009-09-21 11:03:51 EEST
Implemented a class to wrapper HANDLE in different platforms. 

fixed on commit: 6fc1e7d89d4f8c2d9256eb8eb07e6066bd88f524