Merge pull request #763 from poixen/pixmap_fix
One time pixmap cache update
This commit is contained in:
commit
90880c8b7e
1 changed files with 13 additions and 3 deletions
|
@ -21,13 +21,23 @@ SettingsCache::SettingsCache()
|
||||||
playerBgPath = settings->value("zonebg/playerarea").toString();
|
playerBgPath = settings->value("zonebg/playerarea").toString();
|
||||||
cardBackPicturePath = settings->value("paths/cardbackpicture").toString();
|
cardBackPicturePath = settings->value("paths/cardbackpicture").toString();
|
||||||
|
|
||||||
picDownload = settings->value("personal/picturedownload", true).toBool();
|
// we only want to reset the cache once, then its up to the user
|
||||||
picDownloadHq = settings->value("personal/picturedownloadhq", true).toBool();
|
bool updateCache = settings->value("update/pixmapCacheSize", false).toBool();
|
||||||
pixmapCacheSize = settings->value("personal/pixmapCacheSize", PIXMAPCACHE_SIZE_DEFAULT).toInt();
|
if (!updateCache) {
|
||||||
|
pixmapCacheSize = PIXMAPCACHE_SIZE_DEFAULT;
|
||||||
|
settings->setValue("personal/pixmapCacheSize", pixmapCacheSize);
|
||||||
|
settings->setValue("personal/picturedownloadhq", true);
|
||||||
|
settings->setValue("update/pixmapCacheSize", true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
pixmapCacheSize = settings->value("personal/pixmapCacheSize", PIXMAPCACHE_SIZE_DEFAULT).toInt();
|
||||||
//sanity check
|
//sanity check
|
||||||
if(pixmapCacheSize < PIXMAPCACHE_SIZE_MIN || pixmapCacheSize > PIXMAPCACHE_SIZE_MAX)
|
if(pixmapCacheSize < PIXMAPCACHE_SIZE_MIN || pixmapCacheSize > PIXMAPCACHE_SIZE_MAX)
|
||||||
pixmapCacheSize = PIXMAPCACHE_SIZE_DEFAULT;
|
pixmapCacheSize = PIXMAPCACHE_SIZE_DEFAULT;
|
||||||
|
|
||||||
|
picDownload = settings->value("personal/picturedownload", true).toBool();
|
||||||
|
picDownloadHq = settings->value("personal/picturedownloadhq", true).toBool();
|
||||||
|
|
||||||
picUrl = settings->value("personal/picUrl", PIC_URL_DEFAULT).toString();
|
picUrl = settings->value("personal/picUrl", PIC_URL_DEFAULT).toString();
|
||||||
picUrlHq = settings->value("personal/picUrlHq", PIC_URL_HQ_DEFAULT).toString();
|
picUrlHq = settings->value("personal/picUrlHq", PIC_URL_HQ_DEFAULT).toString();
|
||||||
picUrlFallback = settings->value("personal/picUrlFallback", PIC_URL_FALLBACK).toString();
|
picUrlFallback = settings->value("personal/picUrlFallback", PIC_URL_FALLBACK).toString();
|
||||||
|
|
Loading…
Reference in a new issue