|
|
@ -36,12 +36,15 @@ |
|
|
|
#include "base/preferences.h" |
|
|
|
#include "base/preferences.h" |
|
|
|
#include "base/profile.h" |
|
|
|
#include "base/profile.h" |
|
|
|
#include "base/settingsstorage.h" |
|
|
|
#include "base/settingsstorage.h" |
|
|
|
|
|
|
|
#include "base/settingvalue.h" |
|
|
|
#include "base/utils/fs.h" |
|
|
|
#include "base/utils/fs.h" |
|
|
|
#include "base/utils/io.h" |
|
|
|
#include "base/utils/io.h" |
|
|
|
#include "base/utils/string.h" |
|
|
|
#include "base/utils/string.h" |
|
|
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
namespace |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
const int MIGRATION_VERSION = 1; |
|
|
|
|
|
|
|
|
|
|
|
void exportWebUIHttpsFiles() |
|
|
|
void exportWebUIHttpsFiles() |
|
|
|
{ |
|
|
|
{ |
|
|
|
const auto migrate = [](const QString &oldKey, const QString &newKey, const QString &savePath) |
|
|
|
const auto migrate = [](const QString &oldKey, const QString &newKey, const QString &savePath) |
|
|
@ -228,6 +231,12 @@ namespace |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool upgrade(const bool /*ask*/) |
|
|
|
bool upgrade(const bool /*ask*/) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
CachedSettingValue<int> version {"Meta/MigrationVersion", 0}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (version != MIGRATION_VERSION) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (version < 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
exportWebUIHttpsFiles(); |
|
|
|
exportWebUIHttpsFiles(); |
|
|
|
upgradeTorrentContentLayout(); |
|
|
|
upgradeTorrentContentLayout(); |
|
|
@ -235,6 +244,11 @@ bool upgrade(const bool /*ask*/) |
|
|
|
upgradeSchedulerDaysSettings(); |
|
|
|
upgradeSchedulerDaysSettings(); |
|
|
|
upgradeDNSServiceSettings(); |
|
|
|
upgradeDNSServiceSettings(); |
|
|
|
upgradeTrayIconStyleSettings(); |
|
|
|
upgradeTrayIconStyleSettings(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
version = MIGRATION_VERSION; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|