should be const

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=666821
This commit is contained in:
David Faure 2007-05-20 23:31:44 +00:00
parent 8f037a992d
commit 5f1db42cca
2 changed files with 4 additions and 4 deletions

View File

@ -177,7 +177,7 @@ void Svg::resize()
d->size = d->renderer->defaultSize(); d->size = d->renderer->defaultSize();
} }
QSize Svg::elementSize(const QString& elementId) QSize Svg::elementSize(const QString& elementId) const
{ {
if (!d->renderer) { if (!d->renderer) {
d->renderer = new KSvgRenderer(Plasma::Theme::self()->image(d->themePath)); d->renderer = new KSvgRenderer(Plasma::Theme::self()->image(d->themePath));
@ -192,7 +192,7 @@ QSize Svg::elementSize(const QString& elementId)
return elementSize.toSize(); return elementSize.toSize();
} }
QSize Svg::size() QSize Svg::size() const
{ {
return d->size.toSize(); return d->size.toSize();
} }

4
svg.h
View File

@ -120,14 +120,14 @@ class PLASMA_EXPORT Svg : public QObject
* @arg elementId the id of the element to check * @arg elementId the id of the element to check
* @return the current size of a given element * @return the current size of a given element
**/ **/
QSize elementSize( const QString& elementId ); QSize elementSize( const QString& elementId ) const;
/** /**
* Currently set size of the SVG * Currently set size of the SVG
* @arg elementId the id of the element to check * @arg elementId the id of the element to check
* @return the current size of a given element * @return the current size of a given element
**/ **/
QSize size(); QSize size() const;
Q_SIGNALS: Q_SIGNALS:
void repaintNeeded(); void repaintNeeded();