mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Avoid temporary QString allocations
This fixes clazy warning: Use multi-arg instead [-Wclazy-qstring-arg]
This commit is contained in:
@@ -135,18 +135,18 @@ void ProxyConfigurationManager::configureProxy()
|
||||
if (!m_isProxyOnlyForTorrents) {
|
||||
switch (m_config.type) {
|
||||
case ProxyType::HTTP_PW:
|
||||
proxyStrHTTP = QString("http://%1:%2@%3:%4").arg(m_config.username)
|
||||
.arg(m_config.password).arg(m_config.ip).arg(m_config.port);
|
||||
proxyStrHTTP = QString("http://%1:%2@%3:%4").arg(m_config.username
|
||||
, m_config.password, m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
case ProxyType::HTTP:
|
||||
proxyStrHTTP = QString("http://%1:%2").arg(m_config.ip).arg(m_config.port);
|
||||
proxyStrHTTP = QString("http://%1:%2").arg(m_config.ip, m_config.port);
|
||||
break;
|
||||
case ProxyType::SOCKS5:
|
||||
proxyStrSOCK = QString("%1:%2").arg(m_config.ip).arg(m_config.port);
|
||||
proxyStrSOCK = QString("%1:%2").arg(m_config.ip, m_config.port);
|
||||
break;
|
||||
case ProxyType::SOCKS5_PW:
|
||||
proxyStrSOCK = QString("%1:%2@%3:%4").arg(m_config.username)
|
||||
.arg(m_config.password).arg(m_config.ip).arg(m_config.port);
|
||||
proxyStrSOCK = QString("%1:%2@%3:%4").arg(m_config.username
|
||||
, m_config.password, m_config.ip, QString::number(m_config.port));
|
||||
break;
|
||||
default:
|
||||
qDebug("Disabling HTTP communications proxy");
|
||||
|
||||
Reference in New Issue
Block a user