Patch: Colored debug

Olivier Goffart ogoffart at
Thu Sep 6 09:58:14 BST 2007

Le lundi 3 septembre 2007, Thiago Macieira a écrit :
> Agreed, but kDebug's output is NOT a tty, ever. It's outputting to
> qt_message_output. That one has the capability of determining whether its
> output is a TTY or not.
> The test that Gof added for it has to go away. It's not thread-safe: you're
> not supposed to call qInstallMsgHandler once the program has started
> because that function isn't thread-safe, but QDebug/qDebug/kDebug/etc. are
> supposed to be.

Ah, right, i have not thought about thread safety.

Would it be ok to not use qt_message_output, but fprintf instead ?

That would also allow to put the "Warning" in another color.

-------------- 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: <>

More information about the kde-core-devel mailing list