Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8
-
None
Description
QByteArrayView has convenient toInt(), toFloat(), etc, that can be used on sliced() "non-copy" of byte array.
But toHex() is missing though, and it might help to save even bigger copies.
For example, some real code (Qt5):
imei = m_data.mid(4, 8).toHex();
could be converted to:
imei = QByteArrayView{m_data}.sliced(4, 8).toHex();
to save redundant copy.