[Development] Let's get rid of qDebug/qWarning/qCritical!

Thiago Macieira thiago.macieira at intel.com
Thu Jan 9 17:36:24 CET 2014


On quinta-feira, 9 de janeiro de 2014 16:29:10, Koehne Kai wrote:
> > -----Original Message-----
> > From: development-bounces+kai.koehne=digia.com at qt-project.org
> > [mailto:development-bounces+kai.koehne=digia.com at qt-project.org] On
> > Behalf Of Thiago Macieira
> > Sent: Thursday, January 09, 2014 5:05 PM
> > To: development at qt-project.org
> > Subject: Re: [Development] Let's get rid of qDebug/qWarning/qCritical!
> > 
> > On quinta-feira, 9 de janeiro de 2014 07:28:07, Koehne Kai wrote:
> > > if qCWarning() would expand to an if (myCategory().isEnabled()) ...
> > 
> > That's why it would have to expand to if (!myCategory().isEnabled()) {}
> > else
> Well, we can't, since the << arguments are not part of the macro :) That
> would end up with s.th. lie
> 
> if (!myCategory().isEnabled()) { QMessageLogger(__FILE__, __LINE__,
> __FUNCTION__).debug() {} else {} << "Hello World";

if (!myCategory().isEnabled() {} else QMessageLogger(__FILE__, __LINE__, 
__FUNCTION__).debug()

<< "Hello World";


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140109/9c6bc317/attachment.sig>


More information about the Development mailing list