mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
Raise minimum Qt version to 5.14
This commit is contained in:
@@ -523,7 +523,7 @@ void AppController::setPreferencesAction()
|
||||
if (hasKey("ip_filter_trackers"))
|
||||
session->setTrackerFilteringEnabled(it.value().toBool());
|
||||
if (hasKey("banned_IPs"))
|
||||
session->setBannedIPs(it.value().toString().split('\n', QString::SkipEmptyParts));
|
||||
session->setBannedIPs(it.value().toString().split('\n', Qt::SkipEmptyParts));
|
||||
|
||||
// Speed
|
||||
// Global Rate Limits
|
||||
@@ -653,7 +653,7 @@ void AppController::setPreferencesAction()
|
||||
if (hasKey("bypass_auth_subnet_whitelist"))
|
||||
{
|
||||
// recognize new lines and commas as delimiters
|
||||
pref->setWebUiAuthSubnetWhitelist(it.value().toString().split(QRegularExpression("\n|,"), QString::SkipEmptyParts));
|
||||
pref->setWebUiAuthSubnetWhitelist(it.value().toString().split(QRegularExpression("\n|,"), Qt::SkipEmptyParts));
|
||||
}
|
||||
if (hasKey("web_ui_max_auth_fail_count"))
|
||||
pref->setWebUIMaxAuthFailCount(it.value().toInt());
|
||||
|
||||
@@ -259,7 +259,7 @@ void TorrentsController::infoAction()
|
||||
const bool reverse {parseBool(params()["reverse"]).value_or(false)};
|
||||
int limit {params()["limit"].toInt()};
|
||||
int offset {params()["offset"].toInt()};
|
||||
const QStringList hashes {params()["hashes"].split('|', QString::SkipEmptyParts)};
|
||||
const QStringList hashes {params()["hashes"].split('|', Qt::SkipEmptyParts)};
|
||||
|
||||
TorrentIDSet idSet;
|
||||
for (const QString &hash : hashes)
|
||||
@@ -637,7 +637,7 @@ void TorrentsController::addAction()
|
||||
const std::optional<bool> addPaused = parseBool(params()["paused"]);
|
||||
const QString savepath = params()["savepath"].trimmed();
|
||||
const QString category = params()["category"];
|
||||
const QStringList tags = params()["tags"].split(',', QString::SkipEmptyParts);
|
||||
const QStringList tags = params()["tags"].split(',', Qt::SkipEmptyParts);
|
||||
const QString torrentName = params()["rename"].trimmed();
|
||||
const int upLimit = parseInt(params()["upLimit"]).value_or(-1);
|
||||
const int dlLimit = parseInt(params()["dlLimit"]).value_or(-1);
|
||||
@@ -1215,7 +1215,7 @@ void TorrentsController::addTagsAction()
|
||||
requireParams({"hashes", "tags"});
|
||||
|
||||
const QStringList hashes {params()["hashes"].split('|')};
|
||||
const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)};
|
||||
const QStringList tags {params()["tags"].split(',', Qt::SkipEmptyParts)};
|
||||
|
||||
for (const QString &tag : tags)
|
||||
{
|
||||
@@ -1232,7 +1232,7 @@ void TorrentsController::removeTagsAction()
|
||||
requireParams({"hashes"});
|
||||
|
||||
const QStringList hashes {params()["hashes"].split('|')};
|
||||
const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)};
|
||||
const QStringList tags {params()["tags"].split(',', Qt::SkipEmptyParts)};
|
||||
|
||||
for (const QString &tag : tags)
|
||||
{
|
||||
@@ -1256,7 +1256,7 @@ void TorrentsController::createTagsAction()
|
||||
{
|
||||
requireParams({"tags"});
|
||||
|
||||
const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)};
|
||||
const QStringList tags {params()["tags"].split(',', Qt::SkipEmptyParts)};
|
||||
|
||||
for (const QString &tag : tags)
|
||||
BitTorrent::Session::instance()->addTag(tag.trimmed());
|
||||
@@ -1266,7 +1266,7 @@ void TorrentsController::deleteTagsAction()
|
||||
{
|
||||
requireParams({"tags"});
|
||||
|
||||
const QStringList tags {params()["tags"].split(',', QString::SkipEmptyParts)};
|
||||
const QStringList tags {params()["tags"].split(',', Qt::SkipEmptyParts)};
|
||||
for (const QString &tag : tags)
|
||||
BitTorrent::Session::instance()->removeTag(tag.trimmed());
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace
|
||||
{
|
||||
// [rfc6265] 4.2.1. Syntax
|
||||
QStringMap ret;
|
||||
const QVector<QStringRef> cookies = cookieStr.splitRef(';', QString::SkipEmptyParts);
|
||||
const QVector<QStringRef> cookies = cookieStr.splitRef(';', Qt::SkipEmptyParts);
|
||||
|
||||
for (const auto &cookie : cookies)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ WebApplication::~WebApplication()
|
||||
|
||||
void WebApplication::sendWebUIFile()
|
||||
{
|
||||
const QStringList pathItems {request().path.split('/', QString::SkipEmptyParts)};
|
||||
const QStringList pathItems {request().path.split('/', Qt::SkipEmptyParts)};
|
||||
if (pathItems.contains(".") || pathItems.contains(".."))
|
||||
throw InternalServerErrorHTTPError();
|
||||
|
||||
@@ -356,7 +356,7 @@ void WebApplication::configure()
|
||||
m_authSubnetWhitelist = pref->getWebUiAuthSubnetWhitelist();
|
||||
m_sessionTimeout = pref->getWebUISessionTimeout();
|
||||
|
||||
m_domainList = pref->getServerDomains().split(';', QString::SkipEmptyParts);
|
||||
m_domainList = pref->getServerDomains().split(';', Qt::SkipEmptyParts);
|
||||
std::for_each(m_domainList.begin(), m_domainList.end(), [](QString &entry) { entry = entry.trimmed(); });
|
||||
|
||||
m_isCSRFProtectionEnabled = pref->isWebUiCSRFProtectionEnabled();
|
||||
@@ -387,7 +387,7 @@ void WebApplication::configure()
|
||||
if (pref->isWebUICustomHTTPHeadersEnabled())
|
||||
{
|
||||
const QString customHeaders = pref->getWebUICustomHTTPHeaders().trimmed();
|
||||
const QVector<QStringRef> customHeaderLines = customHeaders.splitRef('\n', QString::SkipEmptyParts);
|
||||
const QVector<QStringRef> customHeaderLines = customHeaders.splitRef('\n', Qt::SkipEmptyParts);
|
||||
|
||||
for (const QStringRef &line : customHeaderLines)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user