[Development] Work on qDebug and friends

Frans Klaver fransklaver at gmail.com
Tue Jan 24 11:45:59 CET 2012


On Tue, Jan 24, 2012 at 11:41 AM,  <kai.koehne at nokia.com> wrote:

> I've been working on a patch to the Qt logging framework: http://codereview.qt-project.org/#change,13433,patchset=14 . Basically it redefines qDebug() and friends as a macro so that we can automatically capture the source file, line, and function a particular message comes from:
>
>  qDebug("Hello world")
>
> actually is changed by the precompiler to:
>
>  QMessageLogger(__FILE__, __LINE__, Q_FUNC_INFO):debug("Hello World")


Sounds good. What, if any, will be the effect on the use of

qDebug() << "Hello world";



More information about the Development mailing list