On Friday 31. July 2015 08:48:24 Curtis Mitch wrote:
> > #ifdef DEBUG_FETCHER
> >     #define fetcherDebug qDebug()
> > #else
> >     #define fetcherDebug NoDebug()
> > #endif
> > 
> > as a temporary solution to enable debug output of a new feature.
> 
> What's the benefit of this over QLoggingCategory?

QLoggingCategory checks at runtime if the debug should be run. Which means 
that the compiler still need to generate the code for it.
With the QNoDebug trick, everything can be removed at compile time, and 
nothing is generated in the binary for those debug statements.

-- 
Olivier 

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to