mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 09:22:15 -07:00
only reset to default on first run
This commit is contained in:
parent
63de07a515
commit
57501a9266
2 changed files with 2 additions and 11 deletions
|
|
@ -878,6 +878,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
|
||||
|
|
|
|||
|
|
@ -12,19 +12,9 @@ void DownloadSettings::setDownloadUrls(const QStringList &downloadURLs)
|
|||
setValue(QVariant::fromValue(downloadURLs), "urls", "downloads");
|
||||
}
|
||||
|
||||
/**
|
||||
* If reset or first run, this method contains the default URLs we will populate
|
||||
*/
|
||||
QStringList DownloadSettings::getAllURLs()
|
||||
{
|
||||
auto downloadURLs = getValue("urls", "downloads").toStringList();
|
||||
|
||||
// First run, these will be empty
|
||||
if (downloadURLs.count() == 0) {
|
||||
resetToDefaultURLs();
|
||||
}
|
||||
|
||||
return downloadURLs;
|
||||
return getValue("urls", "downloads").toStringList();
|
||||
}
|
||||
|
||||
void DownloadSettings::resetToDefaultURLs()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue