some cleanups in the caching code
with that the systray background rendering problems seems somewhat less frequent svn path=/trunk/KDE/kdelibs/; revision=893751
This commit is contained in:
parent
25b3937022
commit
becd2b631e
19
svg.cpp
19
svg.cpp
@ -201,8 +201,11 @@ class SvgPrivate
|
||||
p = p.fromImage(itmp);
|
||||
}
|
||||
|
||||
itemsToSave[elementId] = p;
|
||||
saveTimer->start(300);
|
||||
if (!itemsToSave.contains(id)) {
|
||||
itemsToSave.insert(id, p);
|
||||
saveTimer->start(300);
|
||||
}
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
@ -211,17 +214,9 @@ class SvgPrivate
|
||||
QHash<QString, QPixmap>::iterator i = itemsToSave.begin();
|
||||
|
||||
while (i != itemsToSave.end()) {
|
||||
QPixmap p = i.value();
|
||||
//kDebug()<<"Saving item to cache: "<<i.key();
|
||||
|
||||
QString id = cachePath(path);
|
||||
|
||||
if (!i.key().isEmpty()) {
|
||||
id.append(i.key());
|
||||
}
|
||||
|
||||
//kDebug()<<"Saving item to cache: "<<id;
|
||||
|
||||
Theme::defaultTheme()->insertIntoCache(id, p);
|
||||
Theme::defaultTheme()->insertIntoCache(i.key(), i.value());
|
||||
++i;
|
||||
}
|
||||
itemsToSave.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user