qmimedata: reduce allocations
use QBAV more Change-Id: Id7fdf5dcb19cd4011317adf5c635a9d974d7d98a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
parent
630d3328dd
commit
b629bdc085
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user