rects cache and pixmap cache needs indeed ids a bit different due to the
fact that framesvgs are always at the "natural" size per se... this should fix the systray breakage svn path=/trunk/KDE/kdelibs/; revision=893029
This commit is contained in:
parent
98b833977b
commit
2952fe3e5f
13
svg.cpp
13
svg.cpp
@ -79,6 +79,7 @@ class SvgPrivate
|
||||
eraseRenderer();
|
||||
}
|
||||
|
||||
//This function is meant for the rects cache
|
||||
QString cacheId(const QString &elementId)
|
||||
{
|
||||
if (size.isValid() && size != naturalSize) {
|
||||
@ -91,6 +92,14 @@ class SvgPrivate
|
||||
}
|
||||
}
|
||||
|
||||
//This function is meant for the pixmap cache
|
||||
QString cachePath(const QString &path)
|
||||
{
|
||||
return QString("%3_%2_%1_").arg(int(size.width()))
|
||||
.arg(int(size.height()))
|
||||
.arg(path);
|
||||
}
|
||||
|
||||
bool setImagePath(const QString &imagePath, Svg *q)
|
||||
{
|
||||
bool isThemed = !QDir::isAbsolutePath(imagePath);
|
||||
@ -150,7 +159,7 @@ class SvgPrivate
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
QString id = cacheId(path);
|
||||
QString id = cachePath(path);
|
||||
|
||||
if (!elementId.isEmpty()) {
|
||||
id.append(elementId);
|
||||
@ -204,7 +213,7 @@ class SvgPrivate
|
||||
while (i != itemsToSave.end()) {
|
||||
QPixmap p = i.value();
|
||||
|
||||
QString id = cacheId(path);
|
||||
QString id = cachePath(path);
|
||||
|
||||
if (!i.key().isEmpty()) {
|
||||
id.append(i.key());
|
||||
|
Loading…
Reference in New Issue
Block a user