Details
-
Suggestion
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.10
-
None
Description
QByteArray is often used to store binary data instead strings, e.g. in QtSerialBus.
When working with the data, the signed char leads to surprising effects, e.g. when combining two chars to a short:
quint16 word = payload.at(0) << 8 + payload.at(1);
At the moment, this can only be solved by using reinterpret_cast<> at a lot of places.
It would be nice to have possibilities to get unsigned char values in and out of a QByteArray.