mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
plasma: use reasonable maximum cache cost when build against Katie
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
cb6ddb2623
commit
36e33c8c9f
1 changed files with 6 additions and 0 deletions
|
@ -93,7 +93,13 @@ public:
|
|||
cacheTheme = config.cacheTheme();
|
||||
|
||||
pixmapCache = new QSharedPointer<QCache<QString, QPixmap> >(new QCache<QString, QPixmap>());
|
||||
#ifndef QT_KATIE
|
||||
pixmapCache->data()->setMaxCost(config.themeCacheKb() * 1024);
|
||||
#else
|
||||
// max cost is number of elements QCache can hold in Katie's implementation
|
||||
const int reasonable = qMax(config.themeCacheKb() / 4, 100);
|
||||
pixmapCache->data()->setMaxCost(reasonable);
|
||||
#endif
|
||||
|
||||
saveTimer = new QTimer(q);
|
||||
saveTimer->setSingleShot(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue