mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 16:53:08 -07:00
Replace QStringRef with QStringView
This commit is contained in:
parent
27baa55443
commit
399d3ad85a
26 changed files with 82 additions and 90 deletions
|
@ -72,11 +72,11 @@ const QString PRIVATE_FOLDER {QStringLiteral("/private")};
|
|||
|
||||
namespace
|
||||
{
|
||||
QStringMap parseCookie(const QString &cookieStr)
|
||||
QStringMap parseCookie(const QStringView cookieStr)
|
||||
{
|
||||
// [rfc6265] 4.2.1. Syntax
|
||||
QStringMap ret;
|
||||
const QVector<QStringRef> cookies = cookieStr.splitRef(';', Qt::SkipEmptyParts);
|
||||
const QList<QStringView> cookies = cookieStr.split(u';', Qt::SkipEmptyParts);
|
||||
|
||||
for (const auto &cookie : cookies)
|
||||
{
|
||||
|
@ -386,10 +386,10 @@ void WebApplication::configure()
|
|||
|
||||
if (pref->isWebUICustomHTTPHeadersEnabled())
|
||||
{
|
||||
const QString customHeaders = pref->getWebUICustomHTTPHeaders().trimmed();
|
||||
const QVector<QStringRef> customHeaderLines = customHeaders.splitRef('\n', Qt::SkipEmptyParts);
|
||||
const QString customHeaders = pref->getWebUICustomHTTPHeaders();
|
||||
const QList<QStringView> customHeaderLines = QStringView(customHeaders).trimmed().split(u'\n', Qt::SkipEmptyParts);
|
||||
|
||||
for (const QStringRef &line : customHeaderLines)
|
||||
for (const QStringView line : customHeaderLines)
|
||||
{
|
||||
const int idx = line.indexOf(':');
|
||||
if (idx < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue