kdbgstream::operator<<({,u}char)

Bo Thorsen bo at sonofthor.dk
Tue Nov 12 12:06:45 GMT 2002


On Tuesday 12 November 2002 11:46, Stephan Kulow wrote:
> Am Monday 11 November 2002 12:30 schrieb Marc Mutz:
> > Hi!
> >
> > Shouldn't those output the char as character instead of number? If
> > you want the value, you could then just write
> >
> > kdDebug() << int(mychar) << endl;
> >
> > while now you need to write ugly stuff like
> >
> > kdDebug() << QString( QChar( myChar ) ) << endl;
> >
> > to get the char output as character.
> >
> > (this is not a patch, just some hand-edited cut'n'paste)
>
> if you add a check for 0 and '\n' (to flush) I agree and would suggest
> you commit it

I can understand the check for 0, but I disagree about the '\n'. A flush 
happens upon endl, not on '\n'.

std::cerr << "Something\n";
std::cerr << "Something" << std::endl;

The C++ standard says that the second flushes the stream, the first 
doesn't. Does the kdDebug stream not follow this?

Bo.

-- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark





More information about the kde-core-devel mailing list