X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqtui%2Fqtuiapplication.cpp;h=927248f499091f8e167ec81327945a2e36cdabfc;hb=8a3d4d38573fcf867fdf1409cb5a17eacd87f741;hp=8120aed258716ff50116b08b51202eaabc2561c1;hpb=c9c0a48239303d241b76b96ea36c505f0b5bb945;p=quassel.git diff --git a/src/qtui/qtuiapplication.cpp b/src/qtui/qtuiapplication.cpp index 8120aed2..927248f4 100644 --- a/src/qtui/qtuiapplication.cpp +++ b/src/qtui/qtuiapplication.cpp @@ -21,6 +21,7 @@ #include "qtuiapplication.h" #include +#include #include #ifdef HAVE_KDE4 @@ -213,7 +214,7 @@ bool QtUiApplication::migrateSettings() // // NOTE: If you increase the minor version, you MUST ALSO add new version upgrade logic in // applySettingsMigration()! Otherwise, settings upgrades will fail. - const uint VERSION_MINOR_CURRENT = 6; + const uint VERSION_MINOR_CURRENT = 7; // Stored minor version uint versionMinor = s.versionMinor(); @@ -278,6 +279,22 @@ 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: UseProxy is no longer used in CoreAccountSettings + CoreAccountSettings s; + for (auto &&accountId : s.knownAccounts()) { + auto map = s.retrieveAccountData(accountId); + if (!map.value("UseProxy", false).toBool()) { + map["ProxyType"] = static_cast(QNetworkProxy::ProxyType::NoProxy); + } + map.remove("UseProxy"); + s.storeAccountData(accountId, map); + } + + // Migration complete! + return true; + } case 6: { // New default changes: sender colors switched around to Tango-ish theme