From c0c2efc3c62432b4ae159b911018682f573b54e4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 30 Jan 2020 14:46:37 -0800 Subject: QStringView: Fix warning about conversion from qsizetype to int Fixes: QTBUG-81764 Change-Id: If79a52e476594446baccfffd15eecb9d9e578118 Reviewed-by: Marc Mutz --- src/corelib/text/qstring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index 1669d7c94a..3919dbf76c 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -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(data()), int(size()), reinterpret_cast(array)); -- cgit v1.2.3