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

Thiago Macieira thiago.macieira at intel.com
Wed Jul 22 22:52:11 CEST 2015


On Wednesday 22 July 2015 19:20:57 Scott Aron Bloom wrote:
> For my company, when I first joined, the Idea of compiled with -Werror (or
> the equiv on VC++) was so far down the road, that I thought it would never
> be possible.  We had close to 5000 warnings between windows and linux.
> 
> We had been slowly cleaning up the code, and got one compiler after another
> to compile clean :)  What I had noticed, was that my windows was cleaning
> up differently.. and that's when I dug deaper and found the disable pragmas
> inside the Qt code.
> 
> I have no problem with the Qt experts, saying, this warning HERE in THIS
> line of code is dumb, and we have confirmed its OK.. But it was very
> frustrating to have all of our Qt based code have various warnings disabled
> ;(

I understand, but please take a look at the list of MSVC warnings we turn off 
completely:

http://code.woboq.org/qt5/qtbase/src/corelib/global/qglobal.h.html#897

Of those, C4275, C4514, C4800, C4097, C4786 and C4710 are stupid. I can't see 
anyone who wants to know those warnings.

I'll concede we may have gone too far on C4244 and C4355.

> This was under a Qt 4 would, so maybe it has been fixed in Qt5, I don't
> know, since I manually put in #pragma push/pops around all Qt includes to
> fix the issue..

Yes, we've cleaned up.

We've also cleaned up our own warnings. All public headers are individually 
compiled with -Werror plus a bunch more warnings that users may enable for 
their code. All sources are compiled with -Werror for people who are 
developing Qt itself, so we fix our warnings.

And then there's another trick... we also began using -isystem with GCC and 
Clang, so they don't complain about warnings in Qt itself :-)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list