From 1719c72f670bc966114e332ff01ab2d1c0021c0c Mon Sep 17 00:00:00 2001 From: apprb Date: Sun, 28 Dec 2014 19:04:32 +0600 Subject: [PATCH] tiny polishing --- src/misc/settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/settings.cpp b/src/misc/settings.cpp index 20f9121a5..1f0e8a0c8 100644 --- a/src/misc/settings.cpp +++ b/src/misc/settings.cpp @@ -130,7 +130,7 @@ void Settings::load() autostartInTray = s.value("autostartInTray", false).toBool(); closeToTray = s.value("closeToTray", false).toBool(); forceTCP = s.value("forceTCP", false).toBool(); - setProxyType(s.value("proxyType", 0).toInt()); + setProxyType(s.value("proxyType", static_cast(ProxyType::ptNone)).toInt()); proxyAddr = s.value("proxyAddr", "").toString(); proxyPort = s.value("proxyPort", 0).toInt(); currentProfile = s.value("currentProfile", "").toString(); @@ -591,7 +591,7 @@ ProxyType Settings::getProxyType() const void Settings::setProxyType(int newValue) { - if (newValue >= 0 && newValue <= 3) + if (newValue >= 0 && newValue <= 2) proxyType = static_cast(newValue); else proxyType = ProxyType::ptNone;