From ddba79ef3dfdb9e35cfde415500535297b89692f Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Wed, 11 Apr 2018 01:42:46 +0300 Subject: [PATCH] Fix wrong QString::arg() usage that leads to crash We need to be careful when using the multi-arg version of QString::arg() and passing as 2nd, 3rd etc parameter an int. It doesn't do the same as passing multiple QStrings. --- src/base/net/proxyconfigurationmanager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/net/proxyconfigurationmanager.cpp b/src/base/net/proxyconfigurationmanager.cpp index 1fd3a0927..234881fd3 100644 --- a/src/base/net/proxyconfigurationmanager.cpp +++ b/src/base/net/proxyconfigurationmanager.cpp @@ -139,10 +139,10 @@ void ProxyConfigurationManager::configureProxy() , m_config.password, m_config.ip, QString::number(m_config.port)); break; case ProxyType::HTTP: - proxyStrHTTP = QString("http://%1:%2").arg(m_config.ip, m_config.port); + proxyStrHTTP = QString("http://%1:%2").arg(m_config.ip, QString::number(m_config.port)); break; case ProxyType::SOCKS5: - proxyStrSOCK = QString("%1:%2").arg(m_config.ip, m_config.port); + proxyStrSOCK = QString("%1:%2").arg(m_config.ip, QString::number(m_config.port)); break; case ProxyType::SOCKS5_PW: proxyStrSOCK = QString("%1:%2@%3:%4").arg(m_config.username