QStringView: Fix warning about conversion from qsizetype to int

Fixes: QTBUG-81764
Change-Id: If79a52e476594446baccfffd15eecb9d9e578118
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Thiago Macieira 2020-01-30 14:46:37 -08:00
parent 210fd52e0d
commit c0c2efc3c6

View File

@ -1122,7 +1122,7 @@ int QStringView::toWCharArray(wchar_t *array) const
if (sizeof(wchar_t) == sizeof(QChar)) {
if (auto src = data())
memcpy(array, src, sizeof(QChar) * size());
return size();
return int(size()); // ### q6sizetype
} else {
return QString::toUcs4_helper(reinterpret_cast<const ushort *>(data()), int(size()),
reinterpret_cast<uint *>(array));