QNdefNfcTextRecord::setLocale(): truncate locale if its size exceeds 63
The language code length field in the nfc text record status byte is
6 bits wide, allowing a maximum of 63 bytes. If a longer locale was
passed, the size field would overflow into the encoding flag and RFU bit
corrupting the record and causing incorrect decoding.
If the locale exceeds 63 bytes, it is now truncated and a warning
is emitted. While the stored locale will be incomplete, the record
structure remains valid. Note that real locale names are short, so
this should not happen in practice
Pick-to: 6.12 6.11 6.8
Change-Id: I8d391e17fc503583fbe1e980a27f9f5b2e3e81fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>