Patch v4: Fix KEncodingProber crashiness
Thiago Macieira
thiago at kde.org
Sat Mar 21 17:40:02 GMT 2009
Jeff Mitchell wrote:
>> And why not just return a QString? Is there a reason the encoding
>> needs to be specified in a specific encoding itself, so that it needs
>> to be a byte array?
>
>No idea. I was told on this list that the new function should return a
>QByteArray -- so it does
The Qt API dealing with encoding is "const char*"- and QByteArray-based
(see QTextCodec::codecForName, QTextCodec::name, etc.
http://doc.trolltech.com/4.5/qtextcodec.html). So use that and avoid an
unnecessary conversion to/from QString.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090321/16063f5f/attachment.sig>
More information about the kde-core-devel
mailing list