[Development] msvc warning policy in qt
Koehne Kai
Kai.Koehne at theqtcompany.com
Mon Mar 9 17:05:36 CET 2015
> -----Original Message-----
> From: development-bounces+kai.koehne=theqtcompany.com at qt-
> [...]
> My problems are solved this way ,but i would rather like that qt takes care of
> this itself, meaning allowing setting warninglevel to 4 and warnings as errors
> and applications compile out of the box,
> maybe by using my prolog/epilog approach.
Just a minor remark: The pushing/popping of the warnings stack sometimes doesn't work, e.g. when it comes to API deprecation warnings. The warning has to be disabled the moment the deprecated method is declared, not when it's used. Depending on your coding style the system headers might be included before Qt headers ...
This is why we e.g. change the warnings level of the infamous "This function or variable may be unsafe" warning C4996 globally to warning level 4 in 5.5: We don't want to pollute the Qt headers with the MSVC specific 'secure' counterparts, but we can't just disable the warning for Qt headers only, either.
Regards
Kai
More information about the Development
mailing list