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:
parent
1fb35832df
commit
69014b6cd6
@ -4195,15 +4195,10 @@ QByteArray QByteArray::number(double n, char f, int prec)
|
|||||||
*/
|
*/
|
||||||
QByteArray &QByteArray::setRawData(const char *data, qsizetype size)
|
QByteArray &QByteArray::setRawData(const char *data, qsizetype size)
|
||||||
{
|
{
|
||||||
if (!data || !size) {
|
if (!data || !size)
|
||||||
clear();
|
clear();
|
||||||
}
|
else
|
||||||
// else if (d->isShared() || (d->flags() & Data::RawDataType) == 0) {
|
|
||||||
*this = fromRawData(data, size);
|
*this = fromRawData(data, size);
|
||||||
// } else {
|
|
||||||
// d.size = size;
|
|
||||||
// d.data() = const_cast<char *>(data);
|
|
||||||
// }
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user