[Qt-interest] Any Way To Turn Off qDebug() Expression Evaluation

William Gordon Rutherdale (rutherw) rutherw at cisco.com
Tue Aug 9 01:08:29 CEST 2011


> -----Original Message-----
> From: qt-interest-bounces+rutherw=cisco.com at qt.nokia.com [mailto:qt-
> interest-bounces+rutherw=cisco.com at qt.nokia.com] On Behalf Of Bill
> Crocker


> > Is anyone aware of a facility in Qt that makes it possible to
> eliminate
> > all those qDebug() expression evaluations?
> >
> 
> Write them this way (plus or minus) :
> 
>      DBG "i is" << i << ", huge_list is" << huge_list GBD
> 
> That makes it easy to change the implementation.
> Turn them completely off this way:
> 
> 	#define DBG if(0) qDebug() <<
> 	#define GBD ;
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest

Yes, I found a slightly different way to construct a macro wrapper to
control it.

Thanks.

-Will





More information about the Qt-interest-old mailing list