[Development] Qt 5.4.0 header diff: QtWidgets.diff

Thiago Macieira thiago.macieira at intel.com
Wed Nov 19 09:35:45 CET 2014


On Wednesday 19 November 2014 09:22:46 Giuseppe D'Angelo wrote:
> Was adding a new override in the middle of an hierarchy safe? Or 
> subclasses in user code will now require a recompilation? (Not a big 
> deal, I don't expect that many QRubberBand subclasses with a timerEvent 
> override...)

Overriding a virtual from the primary base is safe, provided that it's ok for 
derived classes to bypass the new override and instead call the base class's 
implementation. This is independent of whether the user overrode timerEvent 
again or not.

This applies to the class, not to the user of the class. If the derived class 
is not recompiled, the it's like the new override is not there, regardless of 
who's using the derived class. If it is recompiled, then the new virtual is 
used, regardless of who created the object.

PS: all new virtual overrides should be Q_DECL_OVERRIDE.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list