clean up DownloadSettings (#5194)

* refactor DownloadSettings

* only reset to default on first run

* use c++ foreach

* use addItems

* move default urls to static const
This commit is contained in:
RickyRister 2024-11-25 18:12:56 -08:00 committed by GitHub
parent 5f1c03682f
commit a8471f62bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 53 deletions

View file

@ -883,6 +883,7 @@ void MainWindow::startupConfigCheck()
// no config found, 99% new clean install
qDebug() << "Startup: old client version empty, assuming first start after clean install";
alertForcedOracleRun(VERSION_STRING, false);
SettingsCache::instance().downloads().resetToDefaultURLs(); // populate the download urls
SettingsCache::instance().setClientVersion(VERSION_STRING);
} else if (SettingsCache::instance().getClientVersion() != VERSION_STRING) {
// config found, from another (presumably older) version