Add case 4 for new proxy type default value
authorJavier Llorente <javier@opensuse.org>
Fri, 6 Jan 2017 23:03:12 +0000 (00:03 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 1 Mar 2018 20:22:12 +0000 (21:22 +0100)
src/qtui/qtuiapplication.cpp

index 0ef3bc5..fbc9f9a 100644 (file)
@@ -279,6 +279,17 @@ bool QtUiApplication::applySettingsMigration(QtUiSettings settings, const uint n
     // saved.  Exceptions will be noted below.
     // NOTE:  If you add new upgrade logic here, you MUST ALSO increase VERSION_MINOR_CURRENT in
     // migrateSettings()!  Otherwise, your upgrade logic won't ever be called.
+    case 7:
+    {
+        // New default changes: ProxyType=3 (no proxy) now means QNetworkProxy::HttpProxy
+        // So we have to change it to ProxyType=2 (QNetworkProxy::NoProxy)
+        const QString proxyType = "ProxyType";
+        if (settings.valueExists(proxyType) && settings.value(proxyType)=="3") {
+            settings.setValue(proxyType, 2);
+        }
+        // Migration complete!
+        return true;
+    }
     case 6:
     {
         // New default changes: sender colors switched around to Tango-ish theme