don't use another Thmeme copy

This commit is contained in:
Marco Martin 2014-05-19 14:58:19 +02:00
parent 682bf5f149
commit bbed0411b6
2 changed files with 4 additions and 6 deletions

View File

@ -724,10 +724,10 @@ void FrameSvgPrivate::generateBackground(FrameData *frame)
const bool overlayAvailable = !prefix.startsWith(QLatin1String("mask-")) && q->hasElement(prefix % "overlay");
QPixmap overlay;
if (q->isUsingRenderingCache()) {
frameCached = theme->findInCache(id, frame->cachedBackground) && !frame->cachedBackground.isNull();
frameCached = q->theme()->findInCache(id, frame->cachedBackground) && !frame->cachedBackground.isNull();
if (overlayAvailable) {
overlayCached = theme->findInCache("overlay_" % id, overlay) && !overlay.isNull();
overlayCached = q->theme()->findInCache("overlay_" % id, overlay) && !overlay.isNull();
}
}
@ -996,11 +996,11 @@ void FrameSvgPrivate::cacheFrame(const QString &prefixToSave, const QPixmap &bac
//qDebug()<<"Saving to cache frame"<<id;
theme->insertIntoCache(id, background, QString::number((qint64)q, 16) % prefixToSave);
q->theme()->insertIntoCache(id, background, QString::number((qint64)q, 16) % prefixToSave);
if (!overlay.isNull()) {
//insert overlay
theme->insertIntoCache("overlay_" % id, overlay, QString::number((qint64)q, 16) % prefixToSave % "overlay");
q->theme()->insertIntoCache("overlay_" % id, overlay, QString::number((qint64)q, 16) % prefixToSave % "overlay");
}
}

View File

@ -127,7 +127,6 @@ class FrameSvgPrivate
public:
FrameSvgPrivate(FrameSvg *psvg)
: q(psvg),
theme(new Plasma::Theme(q)),
cacheAll(false),
overlayPos(0, 0)
{
@ -150,7 +149,6 @@ public:
QString prefix;
FrameSvg *q;
Plasma::Theme *theme;
bool cacheAll : 1;
QPoint overlayPos;