mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Replace QStringRef with QStringView
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user