[PATCH] User-friendly kDebug (was: Re: KDE/kdepim/libkdepim)

Thiago Macieira thiago at kde.org
Thu Dec 27 12:02:46 GMT 2007

Marc Mutz wrote:
>The attached patch implements the (trivial) part for kdebug.h.
> Technically, it violates the ODR, but since it's just about static
> inline'ed functions (except for KDebug::operator()s, which give me a
> ever-so-slight headache), and only ever about default arguments, it
> should be safe.

Thanks Marc. The patch is very nice and welcome.

We just have to add somewhere the instructions to using it: you must 
define the default debug area before including any KDE headers.

As a side-effect, there must be no kDebug() in header files anywhere, 
inlined or not.

I'd also like to apply the following patch, which brings the debug-mode 
macros to the same level as the release-mode ones. This will catch early 
on syntax errors:

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdebug-if-else.diff
Type: text/x-diff
Size: 699 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071227/3c710b4d/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071227/3c710b4d/attachment.sig>

More information about the kde-core-devel mailing list