mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Use Start/Stop instead of Resume/Pause
PR #20532. --------- Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user