make custom sets directory configurable (#4047)

This commit is contained in:
ebbit1q 2020-08-23 19:24:30 +02:00 committed by GitHub
parent feee9cc328
commit 964207d04f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 40 additions and 4 deletions

View file

@ -203,7 +203,6 @@ SettingsCache::SettingsCache()
} else {
customPicsPath = getSafeConfigPath("paths/custompics", picsPath + "/CUSTOM/");
}
// this has never been exposed as an user-configurable setting
customCardDatabasePath = getSafeConfigPath("paths/customsets", dataPath + "/customsets/");
cardDatabasePath = getSafeConfigFilePath("paths/carddatabase", dataPath + "/cards.xml");
@ -387,6 +386,12 @@ void SettingsCache::setReplaysPath(const QString &_replaysPath)
settings->setValue("paths/replays", replaysPath);
}
void SettingsCache::setCustomCardDatabasePath(const QString &_customCardDatabasePath)
{
customCardDatabasePath = _customCardDatabasePath;
settings->setValue("paths/customsets", customCardDatabasePath);
}
void SettingsCache::setPicsPath(const QString &_picsPath)
{
picsPath = _picsPath;