update is not a slot, make one

This commit is contained in:
Marco Martin 2011-03-18 13:32:49 +01:00
parent fcd51b4c67
commit e76914ed89
2 changed files with 9 additions and 1 deletions

View File

@ -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"

View File

@ -54,6 +54,9 @@ public:
Q_SIGNALS:
void naturalSizeChanged();
protected Q_SLOTS:
void updateNeeded();
private:
QWeakPointer<Plasma::Svg> m_svg;
QString m_elementID;