CSS Parser and Qt/e 2.
Stefan Eilers
stefan.eilers at basyskom.de
Fri Jan 27 13:47:21 GMT 2006
Am Freitag, 27. Januar 2006 11:00 schrieb Luciano Montanaro:
> Actually, what I don't understand is why doing a (conditional, if the arch
> endiannes requires it) byte swapping does not work.
Manual byte swapping is easy but will force me to change the code at many
other positions as long as all conversion from unsigned short back to QChar
will fail. I would have to find all conversions and change them by hand. I
tried it and had several problems as they are implicit and therefore hard to
find. And the compiler doesn't help here..
The problem is, that every conversion from QChar to ushort and vice versa has
to be reordered manually, which is no fun.
> Or changing the memcpy()s with something like:
> for (int i = 0; i < length; i++) {
> data[i] = string[i].unicode();
> }
"string[i].unicode()" returns unsigned short with big endian order, too:
ushort unicode() const { return (rw << 8) | cl; }
--
Stefan Eilers
Software Engineer
basysKom GmbH
Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany
Tel: +49 6151 3969-962 | Fax: -736 | Mobile: +49 170 4213459 |
Jabber: eilers at jabber.org
stefan.eilers at basyskom.de | www.basyskom.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060127/c5c0897e/attachment.sig>
More information about the kfm-devel
mailing list