One time pixmap cache update
Code will now perform a one time check on starting to see if the cache has been updated to the new 2048 default. If the update has not been set we update. After this time if the user lowers the level, it will not reset back to 2048 by default.
This commit is contained in:
parent
06e5327595
commit
c5bc3ea4dd
1 changed files with 10 additions and 1 deletions
|
@ -23,7 +23,16 @@ SettingsCache::SettingsCache()
|
|||
|
||||
picDownload = settings->value("personal/picturedownload", true).toBool();
|
||||
picDownloadHq = settings->value("personal/picturedownloadhq", true).toBool();
|
||||
pixmapCacheSize = settings->value("personal/pixmapCacheSize", PIXMAPCACHE_SIZE_DEFAULT).toInt();
|
||||
|
||||
// we only want to reset the cache once, then its up to the user
|
||||
bool updateCache = settings->value("update/pixmapCacheSize", false).toBool();
|
||||
if (!updateCache) {
|
||||
pixmapCacheSize = PIXMAPCACHE_SIZE_DEFAULT;
|
||||
settings->setValue("personal/pixmapCacheSize", pixmapCacheSize);
|
||||
settings->setValue("update/pixmapCacheSize", true);
|
||||
}
|
||||
else
|
||||
pixmapCacheSize = settings->value("personal/pixmapCacheSize", PIXMAPCACHE_SIZE_DEFAULT).toInt();
|
||||
//sanity check
|
||||
if(pixmapCacheSize < PIXMAPCACHE_SIZE_MIN || pixmapCacheSize > PIXMAPCACHE_SIZE_MAX)
|
||||
pixmapCacheSize = PIXMAPCACHE_SIZE_DEFAULT;
|
||||
|
|
Loading…
Reference in a new issue