UI: FortSettings: Add migration to 3.9.10

This commit is contained in:
Nodir Temirkhodjaev 2023-07-24 12:43:09 +03:00
parent 1c96c34a78
commit df412a3643

View File

@ -444,6 +444,13 @@ void FortSettings::migrateIniOnStartup()
if (version < 0x030804) { if (version < 0x030804) {
setCacheValue("confFlags/askToConnect", false); setCacheValue("confFlags/askToConnect", false);
} }
// COMPAT: v3.9.10
if (version < 0x030910) {
setCacheValue("confFlags/blockTraffic", ini()->value("confFlags/stopTraffic"));
setCacheValue("confFlags/blockInetTraffic", ini()->value("confFlags/stopInetTraffic"));
setCacheValue("quota/blockInetTraffic", ini()->value("quota/stopInetTraffic"));
}
} }
void FortSettings::migrateIniOnWrite() void FortSettings::migrateIniOnWrite()
@ -473,6 +480,16 @@ void FortSettings::migrateIniOnWrite()
removeIniKey("confFlags/provBoot"); removeIniKey("confFlags/provBoot");
ini()->setValue("confFlags/bootFilter", cacheValue("confFlags/bootFilter")); ini()->setValue("confFlags/bootFilter", cacheValue("confFlags/bootFilter"));
} }
// COMPAT: v3.9.10
if (version < 0x030910) {
removeIniKey("confFlags/stopTraffic");
removeIniKey("confFlags/stopInetTraffic");
removeIniKey("quota/stopInetTraffic");
ini()->setValue("confFlags/blockTraffic", cacheValue("confFlags/blockTraffic"));
ini()->setValue("confFlags/blockInetTraffic", cacheValue("confFlags/blockInetTraffic"));
ini()->setValue("quota/blockInetTraffic", cacheValue("quota/blockInetTraffic"));
}
} }
bool FortSettings::wasMigrated() const bool FortSettings::wasMigrated() const