Commit c5bc3ea4 authored by Matt Lowe's avatar Matt Lowe
Browse files

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.
parent 06e53275
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment