[Development] Is overriding an existing virtual method 'BC' in Qt 4?

Thiago Macieira thiago.macieira at intel.com
Tue Oct 9 16:26:55 CEST 2012

On terça-feira, 9 de outubro de 2012 12.31.23, Marc Mutz wrote:
> On Wednesday September 26 2012, Thiago Macieira wrote:
> > But note that there's one stricter requirement: the forwards compatibility
> > that applies within a patch series. Adding this new virtual within the
> > same
> > patch series means a new, public symbol, which could get used in
> > applications.
> What about forward-compatibility if I'm changing a pure-virtual to a mere
> virtual function? AFAIU, pure virtual functions are actually backed by a
> function that prints "pure virtual called" and the aborts. So adding a
> (different) implementation should be ok, even in a patch release[1]?

It adds a new symbol: the new function. That means this function could be 
called directly in non-virtual calls, which in turn means we break the 
forwards compatibility requirement that applications compiled with a newer 
version will run in an older version.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121009/45b500a7/attachment.sig>

More information about the Development mailing list