kdbgstream::operator<<({,u}char)
Marc Mutz
Marc.Mutz at uni-bielefeld.de
Mon Nov 11 11:30:27 GMT 2002
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)
/**
* Prints the given value.
* @param i the char to print
* @return this stream
*/
kdbgstream &operator<<(char i) {
if (!print) return *this;
- QString tmp; tmp.setNum(int(i)); output += tmp;
+ output += i;
return *this;
}
/**
* Prints the given value.
* @param i the unsigned char to print
* @return this stream
*/
kdbgstream &operator<<(unsigned char i) {
if (!print) return *this;
- QString tmp; tmp.setNum(static_cast<unsigned int>(i)); output
+= tmp;
+ output += static_cast<char>(i);
return *this;
}
Marc
--
It is truly ironic that the United States, once the beacon for
promoting the principles of freedom of expression, is now
systematically infecting other countries with this dangerous public
policy choice [the DMCA] that will restrict more speech than any law
before it. -- EFF FTAA Alert:
Stop Hollywood Forcing Technology Ban on 34 Countries
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021111/3a827d43/attachment.sig>
More information about the kde-core-devel
mailing list