[Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

Matthew Woehlke mwoehlke.floss at gmail.com
Wed Jul 22 20:39:40 CEST 2015

On 2015-07-21 19:39, Thiago Macieira wrote:
> On Tuesday 21 July 2015 21:18:35 Jason H wrote:
>> Once I was put in charge of a project where an "engineer" had replaced
>> (inherited) all the Qt Q* classes used in the project to classes that did
>> not have a 'Q' as a first letter. No other changes. And yes, that
>> "engineer" was a contractor.
> Is that better or worse than the "engineer" who added const to all return 
> types that were already rvalues?

-Werror=ignored-qualifiers ;-)

...and yes, I regularly build with this. I strongly encourage doing so;
I ran into a library (I won't name names, but it is an open source
library that is well known for its purpose) that thoroughly botched the
const correctness on their C bindings because someone didn't realize
that 'const PTYPE' != 'TYPE const*' (for 'typedef TYPE* PTYPE').

(On that subject, -Werror=cast-qual also might have helped here; that's
another one I use and would encourage. Also -Werror=return-type, which
*EVERYONE* should use, period.)


More information about the Interest mailing list