[Development] Q_OBJECT and "override"

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Thu Jun 4 16:55:03 CEST 2015


On Thu, Jun 04, 2015 at 12:41:23PM +0000, Bornemann Joerg wrote:
> > 1) Add "override" (or rather Q_DECL_OVERRIDE) to the definition of
> > Q_OBJECT *and* all QObject-derived classes in Qt.
> [...]
> > 2) Remove "override" from all QObject-derived classes in Qt.
> [...]
> > 3) Explicitly disable the warning in the clang mkspecs.
> [...]
> > 4) Let users deal with the problem by making them turn the warning off.
> [...]
> 
> 1) is the thing to do, but OTOH it's a lot of work with questionable gain.
>
1b) would be making the addition conditional on an external define. this
way each (sub-)project (including qt modules) can decide if/when it adjusts.

fwiw, i don't think the gain would be questionable at all.



More information about the Development mailing list