update is not a slot, make one
This commit is contained in:
parent
fcd51b4c67
commit
e76914ed89
@ -69,7 +69,7 @@ void SvgItem::setSvg(Plasma::Svg *svg)
|
||||
disconnect(m_svg.data(), 0, this, 0);
|
||||
}
|
||||
m_svg = svg;
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SLOT(update()));
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SLOT(updateNeeded()));
|
||||
connect(svg, SIGNAL(repaintNeeded()), this, SIGNAL(naturalSizeChanged()));
|
||||
connect(svg, SIGNAL(sizeChanged()), this, SIGNAL(naturalSizeChanged()));
|
||||
emit naturalSizeChanged();
|
||||
@ -115,6 +115,11 @@ void SvgItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
|
||||
painter->setRenderHint(QPainter::SmoothPixmapTransform, wasSmoothTransform);
|
||||
}
|
||||
|
||||
void SvgItem::updateNeeded()
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
} // Plasma namespace
|
||||
|
||||
#include "svgitem_p.moc"
|
||||
|
@ -54,6 +54,9 @@ public:
|
||||
Q_SIGNALS:
|
||||
void naturalSizeChanged();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void updateNeeded();
|
||||
|
||||
private:
|
||||
QWeakPointer<Plasma::Svg> m_svg;
|
||||
QString m_elementID;
|
||||
|
Loading…
Reference in New Issue
Block a user