Use qsizetype for the size of QByteArray's raw data methods

A ### comment said to use int in setRawData(), which took a uint; but
the underlying QArrayDataPointer::fromRawData() takes a qsizetype, so
propagate that all the way.

Change-Id: Iba1f8d020c509b33f5c202c22c6a9bf85b3bab7f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Edward Welbourne 2020-08-13 14:47:31 +02:00
parent 1fb35832df
commit 69014b6cd6

View File

@ -4195,15 +4195,10 @@ QByteArray QByteArray::number(double n, char f, int prec)
*/
QByteArray &QByteArray::setRawData(const char *data, qsizetype size)
{
if (!data || !size) {
if (!data || !size)
clear();
}
// else if (d->isShared() || (d->flags() & Data::RawDataType) == 0) {
else
*this = fromRawData(data, size);
// } else {
// d.size = size;
// d.data() = const_cast<char *>(data);
// }
return *this;
}