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

Gunnar Roth gunnar.roth at gmx.de
Wed Jul 22 20:51:21 CEST 2015


Hi Scott.
> 
> While I 100% agree, one thing I really cant stand, is when 3rd party vendors, DISABLE WARNINGS in their code, and don't re-enable them when their code exits (Im looking at you Qt).
> 
> Im not a g++ guru, but in VC++ #pragma( push) and #pragma( pop ) should be a requirement for all 3rd party headers that disable warnings.
> 
> Off my soapbox now
> 

You are completely right, albeit there is a macro you can define so qt does not switch of the warnings, but then you get warnings, bad if you compile with warnings as errors.
Our solution ist to have a Qt_prolog.h and Qt_epilog.h which we use before and after every include of a qt header and do the push/pop. To be honest we also have that for windows header as these are also rising warnings at W$ level.
Qt 5.5 even introduced a new warning in W4 Level of MSVC by the way Q_ASSERT is defined now, which you can’t avoid with the epilog/prolog warning push/pop
. There is a https://codereview.qt-project.org/#/c/109099/ <https://codereview.qt-project.org/#/c/109099/> change but that got not much attention so the qt5.5 release caters the new warning. We avoid it be redefining Q_ASSERT in a warning free way
in our Qt_epilog.h.



Regards,
Gunnar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150722/011ead28/attachment.html>


More information about the Interest mailing list