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 485 - Removing a pure virtual method may produce a default implementation with a incorrect return statement
: Removing a pure virtual method may produce a default implementation with a in...
Status: CLOSED INVALID
Product: PySide
Classification: Unclassified
Component: ApiExtractor
: HEAD
: All All
: P4 normal
Assigned To: Marcelo Lira
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-22 16:01 EET by Bruno Araujo
Modified: 2011-06-22 20:25 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 Bruno Araujo 2010-11-22 16:01:37 EET
When I remove a pure virtual function, ApiExtractor issues the following
warning: 

    Pure virtual method "function()" must be implement but was completely
removed on typesystem.

The function then is implemented empty, with only a 'return 0' inside it; this
is fine if the function returns pointers or integers. However, this kind of
return will not work if the function returns a reference. This issue is similar
to the kind faced in bug #411.

Right now this is happening with the following function from
QOrganizerCollectionEngineId class:

QDebug & QOrganizerCollectionEngineIdWrapper::debugStreamOut(QDebug & dbg)
const

This function was rejected, following instructions from bug #410, but what is
left is a function with only a 'return 0' statement which breaks compilation.

Environment: Qt 4.7.1 from tarball, PySide from HEAD, QtMobility 1.1 from
tarball, Ubuntu Maverick 32 bits.
Comment 1 Matti Airas 2010-11-22 16:43:19 EET
According to IRC discussion, the blocked functionality is not essential -
prioritizing accordingly.
Comment 2 Hugo Parente Lima 2010-12-20 15:37:03 EET
Did you tried to use:

<modify-argument index="return">
    <replace-default-expression with="%1"/>
</modify-argument>

inside a modify-function tag?
Using this the argument 1 of the method will be used as default return value.
Comment 3 Marcelo Lira 2011-06-07 17:03:01 EEST
This is not a bug and the solution is the one described by Hugo.
I've sent a patch to Lauro.
Comment 4 renato filho 2011-06-22 20:25:09 EEST
release 1.0.4