[RFC] Implicit or explicit cast to QString?

Marc Mutz Marc.Mutz at uni-bielefeld.de
Sat Jan 4 09:34:15 GMT 2003


On Friday 03 January 2003 14:32, Christian Loose wrote:
<snip>
> Do you prefer QString::fromLatin1() over operator=(const char*)?
<snip>

Code in header files must use ::fromLatin1() (b/c apps might want to 
compile with -DQT_NO_CAST_ASCII), but for the implementation files it's 
usually too verbose. If you have a parser or something that needs to be 
careful w.r.t. charsets, it might be a good idea to make it work with 
-DQT_NO_CAST_ASCII, though. But not for static strings.

Marc

-- 
It takes 5 minutes to create [a OpenPGP key].
Of course it takes a bit more time to get it signed...
                                                 -- David Faure
-------------- 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/20030104/1aa14f03/attachment.sig>


More information about the kde-core-devel mailing list