Patch v4: Fix KEncodingProber crashiness

Thiago Macieira thiago at
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. So use that and avoid an 
unnecessary conversion to/from QString.

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    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: <>

More information about the kde-core-devel mailing list