tst_QTextCodec: compile with QT_NO_CAST_FROM_BYTEARRAY


Make the data() call explicit. Mark buffer1/2 as const to be able to
use the shorter data() instead of constData(), and because we can.

Amends the start of the history in this modules (didn't check further
back in qtbase, since we're not picking there).

Pick-to: 6.11 6.10 6.8
Task-number: QTBUG-133234
Change-Id: I56c1eec0421a50a0685e398be15be5779e526ab9
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
commit44a155fc953b315eafefe3be53854fa7e5abe377
parentfe532e28c6c201c49f5ae76ed9b206ef88c14a0c
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 25 Mar 2026 11:24:11 +0100