[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:45:38 CEST 2015


On Wednesday 22 July 2015 20:51:21 Gunnar Roth wrote:
> 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.

This is evil!

#  define QT_TRY if (1,1) 
#    define Q_ASSERT(cond) do { } while ((0,0) && (cond)) 

Approved.

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




More information about the Interest mailing list