kDebug improvements

Harald Fernengel harry at kdevelop.org
Wed Jan 17 17:11:45 GMT 2007


Hi,

On Wednesday 17 January 2007 11:39, Lubos Lunak wrote:
> - the template stream operator is awfully hungy. I have few additional
> kdebug operators in kwin and after this change the type has to exactly
> match my operator. As soon as there's a const added or it's an inherited
> class all I get is a classname and the pointer value, really useful :(.

One solution would be to remove all the kdebug operators and change them into 
qdebug operators. The advantage is that they can be used from both qDebug and 
kDebug.

Another solution would be to make the template less hungry by adding a level 
of indirection to the qDebug-fallback-operator using the usual dirty C++ 
tricks (I'll try to come up with a patch).

> - the output format for data types includes unnecessary information that
> just makes it longer and harder to read. I know that e.g. a window position
> is a point, what else could it be, so why do I need to be told that it's a
> QPoint? I wasn't the only one disliking this after this change had been
> made IIRC.

That can be fixed by making the fallback-operator less greedy and adding 
kDebug operators for common types.

Harald




More information about the kde-core-devel mailing list