qmimedata: reduce allocations

use QBAV more

Change-Id: Id7fdf5dcb19cd4011317adf5c635a9d974d7d98a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Anton Kudryavtsev 2023-09-13 17:19:26 +03:00
parent 630d3328dd
commit b629bdc085

View File

@ -564,7 +564,7 @@ void QMimeData::setData(const QString &mimeType, const QByteArray &data)
Q_D(QMimeData);
if (mimeType == "text/uri-list"_L1) {
QByteArray ba = data;
auto ba = QByteArrayView(data);
if (ba.endsWith('\0'))
ba.chop(1);
d->setData(mimeType, dataToUrls(ba));