mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-21 08:09:35 +08:00
Suppress misleading warning message
QString::split() was giving a non-empty QStringList, and that caused Session::setBannedIPs() to emit misleading warning message.
This commit is contained in:
parent
bb80b378c1
commit
2729c0cb6d
@ -483,7 +483,7 @@ void AppController::setPreferencesAction()
|
|||||||
if (hasKey("ip_filter_trackers"))
|
if (hasKey("ip_filter_trackers"))
|
||||||
session->setTrackerFilteringEnabled(it.value().toBool());
|
session->setTrackerFilteringEnabled(it.value().toBool());
|
||||||
if (hasKey("banned_IPs"))
|
if (hasKey("banned_IPs"))
|
||||||
session->setBannedIPs(it.value().toString().split('\n'));
|
session->setBannedIPs(it.value().toString().split('\n', QString::SkipEmptyParts));
|
||||||
|
|
||||||
// Speed
|
// Speed
|
||||||
// Global Rate Limits
|
// Global Rate Limits
|
||||||
|
@ -473,8 +473,8 @@ Http::Response WebApplication::processRequest(const Http::Request &request, cons
|
|||||||
header(QLatin1String(Http::HEADER_CONTENT_SECURITY_POLICY), m_contentSecurityPolicy);
|
header(QLatin1String(Http::HEADER_CONTENT_SECURITY_POLICY), m_contentSecurityPolicy);
|
||||||
|
|
||||||
if (m_useCustomHTTPHeaders) {
|
if (m_useCustomHTTPHeaders) {
|
||||||
for (const CustomHTTPHeader &i : asConst(m_customHTTPHeaders))
|
for (const CustomHTTPHeader &customHeader : asConst(m_customHTTPHeaders))
|
||||||
header(i.name, i.value);
|
header(customHeader.name, customHeader.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response();
|
return response();
|
||||||
|
Loading…
Reference in New Issue
Block a user