Fix deprecation warning, use char16_t instead of quint16/ushort

Change-Id: I4021abb901260c3e27cefd81b3acd5ac198941c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Volker Hilsheimer 2020-06-08 12:33:31 +02:00
parent 2df31c8f2e
commit ac419a66fd

View File

@ -606,8 +606,8 @@ bool parseDesc(const QByteArray &data, const TagEntry &tagEntry, QString &descNa
// The given length shouldn't include 0-termination, but might.
if (stringLen > 1 && unicodeString[stringLen - 1] == 0)
--stringLen;
QVarLengthArray<quint16> utf16hostendian(stringLen);
qFromBigEndian<ushort>(unicodeString, stringLen, utf16hostendian.data());
QVarLengthArray<char16_t> utf16hostendian(stringLen);
qFromBigEndian<char16_t>(unicodeString, stringLen, utf16hostendian.data());
descName = QString::fromUtf16(utf16hostendian.data(), stringLen);
return true;
}