QByteArray::setRawData(): don't null-terminate initialization from nullptr

it's antithetical to do that, as raw data is documented to be not null-
terminated. QString doesn't, either.

Change-Id: I7ded83a09f64e747a248f9bdac2a364032aae4c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2017-08-14 14:02:56 +02:00
parent a93096a770
commit 1718efe8fa

View File

@ -4337,7 +4337,6 @@ QByteArray &QByteArray::setRawData(const char *data, uint size)
} else {
d->offset = sizeof(QByteArrayData);
d->size = 0;
*d->data() = 0;
}
}
return *this;