mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 07:22:47 -07:00
Improve coding style
This commit is contained in:
parent
acad35c5bc
commit
c41df9ffbd
147 changed files with 4454 additions and 2227 deletions
|
@ -100,7 +100,8 @@ ProxyConfiguration ProxyConfigurationManager::proxyConfiguration() const
|
|||
|
||||
void ProxyConfigurationManager::setProxyConfiguration(const ProxyConfiguration &config)
|
||||
{
|
||||
if (config != m_config) {
|
||||
if (config != m_config)
|
||||
{
|
||||
m_config = config;
|
||||
settings()->storeValue(KEY_TYPE, static_cast<int>(config.type));
|
||||
settings()->storeValue(KEY_IP, config.ip);
|
||||
|
@ -120,7 +121,8 @@ bool ProxyConfigurationManager::isProxyOnlyForTorrents() const
|
|||
|
||||
void ProxyConfigurationManager::setProxyOnlyForTorrents(bool onlyForTorrents)
|
||||
{
|
||||
if (m_isProxyOnlyForTorrents != onlyForTorrents) {
|
||||
if (m_isProxyOnlyForTorrents != onlyForTorrents)
|
||||
{
|
||||
settings()->storeValue(KEY_ONLY_FOR_TORRENTS, onlyForTorrents);
|
||||
m_isProxyOnlyForTorrents = onlyForTorrents;
|
||||
}
|
||||
|
@ -136,8 +138,10 @@ void ProxyConfigurationManager::configureProxy()
|
|||
{
|
||||
// Define environment variables for urllib in search engine plugins
|
||||
QString proxyStrHTTP, proxyStrSOCK;
|
||||
if (!m_isProxyOnlyForTorrents) {
|
||||
switch (m_config.type) {
|
||||
if (!m_isProxyOnlyForTorrents)
|
||||
{
|
||||
switch (m_config.type)
|
||||
{
|
||||
case ProxyType::HTTP_PW:
|
||||
proxyStrHTTP = QString::fromLatin1("http://%1:%2@%3:%4").arg(m_config.username
|
||||
, m_config.password, m_config.ip, QString::number(m_config.port));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue