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 492 - generate forwarding methods for hidden non-virtuals
: generate forwarding methods for hidden non-virtuals
Status: CLOSED DUPLICATE of bug 476
Product: PySide
Classification: Unclassified
Component: Shiboken
: HEAD
: PC All
: P2 critical
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-23 00:40 EET by Ryan Kelly
Modified: 2010-11-25 17:53 EET (History)
8 users (show)

See Also:


Attachments
header henerator patch (4.26 KB, patch)
2010-11-23 00:40 EET, Ryan Kelly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Kelly 2010-11-23 00:40:46 EET
Created attachment 155 [details]
header henerator patch

Shiboken generates overrides for virtual methods but not for non-virtuals.  As
discussed in the following thread:

 
http://groups.google.com/group/pyside/browse_thread/thread/59fd145a7eae6f3d/5c7c7c58a1905d0a?#5c7c7c58a1905d0a

If a class has virtual and non-virtual methods with the same name, this has the
effect of hiding the non-virtual method:

   http://www.parashift.com/c++-faq-lite/strange-inheritance.html#faq-23.9

The result is a build failure, at least on win32.

The attached patch tries to detect this situation and generate declarations for
the hidden methods that forward them on to the base class implementation.  It
probably misses some edge-cases but it was enough to get the latest pyside HEAD
building on win32.

The patch introduces a new method "writeForwardingFunction" since it duplicates
logic from another part of the "writeFunction" method - happy to redo the patch
if you would prefer not to add such a thing.

An alternative would be to generate a "using BaseClassName::methodName;"
declaration, but I found the attached method simpler to implement well.
Comment 1 Matti Airas 2010-11-23 05:01:33 EET
Assigning P2 - if I understand correctly, this is required to fix Windows
builds and must be applied before the next release. Thanks for the patch!

Ryan, "traditional" patches are perfectly fine for us, but if you want your
contributions to be properly visible in our git repos, you might want to
consider making the patches with "git format-patch", or as direct gitorious
merge requests. That way you'll get properly attributed commit entries in the
git log. Traditional patches are shown just under the name of the developer
applying the patch. But as said, this wasn't criticism, rather than a
suggestion which you may ignore at your will, if you so prefer. :-)
Comment 2 Matti Airas 2010-11-23 05:05:39 EET
Marking duplicate, as per Ryan's comment on bug 476. Note that this bug still
has a proposed patch attached to it.

*** This bug has been marked as a duplicate of bug 476 ***
Comment 3 Hugo Parente Lima 2010-11-23 09:14:26 EET
Matti, just do git commit --author "Foobar <foo@bar>", so tradicional patchs
still with the author information on our git log =]
Comment 4 Matti Airas 2010-11-23 09:16:50 EET
(In reply to comment #3)
> Matti, just do git commit --author "Foobar <foo@bar>", so tradicional patchs
> still with the author information on our git log =]

Thanks for the correction - I wasn't aware of that.
Comment 5 Hugo Parente Lima 2010-11-25 17:53:44 EET
Released on version 1.0.0~beta1