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

Olivier Goffart olivier at woboq.com
Wed Sep 26 14:05:12 CEST 2012


On Wednesday 26 September 2012 13:54:10 Stephen Kelly wrote:
> Hi there,
> 
> In
> 
>  https://codereview.qt-project.org/#patch,unified,35581,1,/COMMIT_MSG
> 
> we have a discussion about whether to reimplement a virtual method (the
> obvious way to fix this bug, as was done in the Qt 5 patch), or to avoid
> doing so.
> 
> In this case, code which gets recompiled will get the bug fix, and code that
> does not get recompiled will not get the bug fix.
> 
> Do we care about cases like that? Existing compiled code will continue to
> work as before. From the point of view of the dynamic linker, it is BC as
> there is no change to the virtual table size etc (AFAIK).
> 
> Do we have a hard policy for this? 'It's fine to add virtual method
> overrides as long as the existing compiled code continues to work without
> new bugs' makes sense, but do we have it written down anywhere authoritive?

I personaly think it is safe to say that one need to recompile to get a fix.

What is important with binary compatibility is: "an application compiled 
against an old Qt will continue to work".
In this case, the application already had the bug, so there is no regression.

-- 
Olivier

Woboq - Qt services and support - http://woboq.com



More information about the Development mailing list