Use Start/Stop instead of Resume/Pause

PR #20532.

---------

Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
This commit is contained in:
thalieht
2024-03-25 18:11:04 +02:00
committed by GitHub
parent f2d6129db3
commit 5d1c249606
70 changed files with 413 additions and 391 deletions

View File

@@ -46,7 +46,7 @@
namespace
{
const int MIGRATION_VERSION = 7;
const int MIGRATION_VERSION = 8;
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_s;
void exportWebUIHttpsFiles()
@@ -468,6 +468,16 @@ namespace
settingsStorage->removeValue(oldKey);
}
void migrateAddPausedSetting()
{
auto *settingsStorage = SettingsStorage::instance();
const auto oldKey = u"BitTorrent/Session/AddTorrentPaused"_s;
const auto newKey = u"BitTorrent/Session/AddTorrentStopped"_s;
settingsStorage->storeValue(newKey, settingsStorage->loadValue<bool>(oldKey));
settingsStorage->removeValue(oldKey);
}
}
bool upgrade()
@@ -509,6 +519,9 @@ bool upgrade()
if (version < 7)
migrateShareLimitActionSettings();
if (version < 8)
migrateAddPausedSetting();
version = MIGRATION_VERSION;
}