[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    kdebug
From:       Thomas Zander <zander () kde ! org>
Date:       2007-08-02 11:27:33
Message-ID: 200708021327.33818.zander () kde ! org
[Download RAW message or body]


as you may know; last monday kDebug() was changed to the qDebug() 
formatting. spaces between values and endl variables are not required 
anymore. (Thanks Thiago!)

This makes it a lot easier to write debugging again, but there is this 
nasty conversion period where we have duplicate spaces. And in the final 
release the kDebug() call will always print an linefeed so if you still 
do that in your software you'll get a duplicate.

In KOffice I ran the following perl over the sources which changes the 
majority of the kdebug calls in place.
Feel free to use it for your needs/projects

#!/usr/bin/perl -ni

s/(kDebug\s*\(.*?)(\s*<<\s*endl\s*;)/$1;/;
while(s/(kDebug\s*\(.*)((\\n|\s+)\")/$1"/s) {}
print $_;


Have fun!
-- 
Thomas Zander

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic