On Thu, Jun 4, 2015 at 2:41 PM, Bornemann Joerg
<joerg.bornem...@theqtcompany.com> 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.
* snip *

> 2) and 4) are very wrong. IMO, we shouldn't do this.
> 3) could be a good compromise. There's a variant of this solution by turning 
> the warning off
> at the beginning of every header and turning it on again at the end.
> We once had the QT_{BEGIN|END}_HEADER macros which could expand to
>
> #pragma clang diagnostic push
> #pragma clang diagnostic ignored "-Wannoyingwarning"
>
> and repectively
>
> #pragma clang diagnostic pop
>
> This way the warning can be turned on for user code.
>
>
> BR,
>
> Joerg

Is it really that much work? I hear there's tools to do so [1] and
it's the compiler telling whether it's correct or not.

Aleix

[1] http://clang.llvm.org/extra/ModernizerUsage.html
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to