mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 05:08:05 -06:00
@@ -226,7 +226,7 @@ bool Net::DownloadManager::hasSupportedScheme(const QString &url)
|
||||
const QStringList schemes = instance()->m_networkManager.supportedSchemes();
|
||||
return std::any_of(schemes.cbegin(), schemes.cend(), [&url](const QString &scheme)
|
||||
{
|
||||
return url.startsWith((scheme + QLatin1Char(':')), Qt::CaseInsensitive);
|
||||
return url.startsWith((scheme + u':'), Qt::CaseInsensitive);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "downloadmanager.h"
|
||||
#include "geoipdatabase.h"
|
||||
|
||||
const QString DATABASE_URL = QStringLiteral("https://download.db-ip.com/free/dbip-country-lite-%1.mmdb.gz");
|
||||
const QString DATABASE_URL = u"https://download.db-ip.com/free/dbip-country-lite-%1.mmdb.gz"_qs;
|
||||
const QString GEODB_FOLDER = u"GeoDB"_qs;
|
||||
const QString GEODB_FILENAME = u"dbip-country-lite.mmdb"_qs;
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ ProxyConfigurationManager::ProxyConfigurationManager(QObject *parent)
|
||||
m_config.type = m_storeProxyType.get(ProxyType::None);
|
||||
if ((m_config.type < ProxyType::None) || (m_config.type > ProxyType::SOCKS4))
|
||||
m_config.type = ProxyType::None;
|
||||
m_config.ip = m_storeProxyIP.get(QLatin1String("0.0.0.0"));
|
||||
m_config.ip = m_storeProxyIP.get(u"0.0.0.0"_qs);
|
||||
m_config.port = m_storeProxyPort.get(8080);
|
||||
m_config.username = m_storeProxyUsername;
|
||||
m_config.password = m_storeProxyPassword;
|
||||
@@ -130,17 +130,17 @@ void ProxyConfigurationManager::configureProxy()
|
||||
switch (m_config.type)
|
||||
{
|
||||
case ProxyType::HTTP_PW:
|
||||
proxyStrHTTP = QString::fromLatin1("http://%1:%2@%3:%4").arg(m_config.username
|
||||
proxyStrHTTP = u"http://%1:%2@%3:%4"_qs.arg(m_config.username
|
||||
, m_config.password, m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
case ProxyType::HTTP:
|
||||
proxyStrHTTP = QString::fromLatin1("http://%1:%2").arg(m_config.ip, QString::number(m_config.port));
|
||||
proxyStrHTTP = u"http://%1:%2"_qs.arg(m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
case ProxyType::SOCKS5:
|
||||
proxyStrSOCK = QString::fromLatin1("%1:%2").arg(m_config.ip, QString::number(m_config.port));
|
||||
proxyStrSOCK = u"%1:%2"_qs.arg(m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
case ProxyType::SOCKS5_PW:
|
||||
proxyStrSOCK = QString::fromLatin1("%1:%2@%3:%4").arg(m_config.username
|
||||
proxyStrSOCK = u"%1:%2@%3:%4"_qs.arg(m_config.username
|
||||
, m_config.password, m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user