diff options
| author | Anton Kudryavtsev <anton.kudryavtsev@vk.team> | 2023-08-29 11:43:23 +0300 |
|---|---|---|
| committer | Anton Kudryavtsev <antkudr@mail.ru> | 2023-09-05 18:58:47 +0000 |
| commit | 5fa4ce03f0b687b310a97063d151a98aaf63100e (patch) | |
| tree | 8a0e83e298451c3fa5386d962430c2d52a54d531 /src/corelib/io/qdataurl.cpp | |
| parent | 4bd35674845a16ffbaf7eec0f4b1d411e3dce89c (diff) | |
qDecodeDataUrl: use QL1S more
Avoid tmp QBA creation, just wrap QBAV to QL1S for QSB expression
Change-Id: I8395bd2db2aab29a6b4965071b022c0487bddcb6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qdataurl.cpp')
| -rw-r--r-- | src/corelib/io/qdataurl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qdataurl.cpp b/src/corelib/io/qdataurl.cpp index 7ba3311f0df..bb29af54acd 100644 --- a/src/corelib/io/qdataurl.cpp +++ b/src/corelib/io/qdataurl.cpp @@ -43,17 +43,17 @@ Q_CORE_EXPORT bool qDecodeDataUrl(const QUrl &uri, QString &mimeType, QByteArray data.chop(7); } - QByteArrayView textPlain; + QLatin1StringView textPlain; if (QLatin1StringView{data}.startsWith("charset"_L1, Qt::CaseInsensitive)) { qsizetype i = 7; // strlen("charset") while (data.at(i) == ' ') ++i; if (data.at(i) == '=') - textPlain = "text/plain;"; + textPlain = "text/plain;"_L1; } if (!data.isEmpty()) - mimeType = QString::fromLatin1(textPlain + data.trimmed()); + mimeType = textPlain + QLatin1StringView(data.trimmed()); } return true; |
