kDebug improvements

Andreas Pakulat apaku at gmx.de
Wed Jan 17 13:43:12 GMT 2007


On 17.01.07 10:43:15, Stephan Kulow wrote:
> Am Mittwoch, 17. Januar 2007 10:35 schrieb Cyrille Berger:
> > > And removing the extra << endl could be done in one go throughout the
> > > code. Actually here is the only issue, about how to deal with:
> > > kDebug() << "somestring";
> > > somecode
> > > kDebug() << "anotherstring" << endl;
> > > if such case exists at all. IIRC kDebug already warns you about missing
> > > endl.
> > >
> > > I'm all for it, as it would really make things easier, especially this
> > > endl stuff.
> >
> > Actually I am more for removing the endl warning (and crash, yes yes it
> > often crashes if you don't have the endl). It's very annoying if you want
> > to display the content of an array on the debug output.
> 
> You can have a local kdbgstream object. The endl warning is mainly for older 
> compilers and it seems Qt does not support them any longer, so this is indeed 
> no longer an issue.
> 
> I must admit I like to use qDebug way more than kDebug these days too, but
> the area is a really good addition for KDE (libraries). So I think we should 
> try to overload qDebug(int) and leave kDebug() as it is. 

Hmm, this sounds like the best solution.

Andreas

-- 
You have a reputation for being thoroughly reliable and trustworthy.
A pity that it's totally undeserved.




More information about the kde-core-devel mailing list