diff --git a/panelsvg.cpp b/panelsvg.cpp index a72ed9efc..c6a060e58 100644 --- a/panelsvg.cpp +++ b/panelsvg.cpp @@ -90,17 +90,17 @@ PanelSvg::~PanelSvg() void PanelSvg::setImagePath(const QString& imagePath) { - if (imagePath == d->background->file()) { + if (imagePath == d->background->imagePath()) { return; } - d->background->setFile(imagePath); + d->background->setImagePath(imagePath); setElementPrefix(prefix()); } QString PanelSvg::imagePath() const { - return d->background->file(); + return d->background->imagePath(); } void PanelSvg::setEnabledBorders(const EnabledBorders borders) diff --git a/svg.cpp b/svg.cpp index 8cf42472f..bf204d000 100644 --- a/svg.cpp +++ b/svg.cpp @@ -453,13 +453,13 @@ Svg::ContentType Svg::contentType() return d->contentType; } -void Svg::setFile(const QString &svgFilePath) +void Svg::setImagePath(const QString &svgFilePath) { d->setImagePath(svgFilePath, this); d->eraseRenderer(); } -QString Svg::file() const +QString Svg::imagePath() const { return d->themed ? d->themePath : d->path; } diff --git a/svg.h b/svg.h index af96fd2f3..fe1b195b1 100644 --- a/svg.h +++ b/svg.h @@ -50,7 +50,7 @@ class PLASMA_EXPORT Svg : public QObject Q_ENUMS( ContentType ) Q_PROPERTY( QSize size READ size ) Q_PROPERTY( ContentType contentType READ contentType WRITE setContentType ) - Q_PROPERTY( QString file READ file WRITE setFile ) + Q_PROPERTY( QString filePath READ imagePath WRITE setImagePath ) public: /** @@ -196,13 +196,13 @@ class PLASMA_EXPORT Svg : public QObject * Convenience method for setting the svg file to use for the Svg. * @arg svgFilePath the filepath including name of the svg. */ - void setFile(const QString &svgFilePath); + void setImagePath(const QString &svgFilePath); /** * Convenience method to get the svg filepath and name of svg. * @return the svg's filepath including name of the svg. */ - QString file() const; + QString imagePath() const; Q_SIGNALS: void repaintNeeded(); diff --git a/widgets/icon.cpp b/widgets/icon.cpp index 3b5e27702..0ca238423 100644 --- a/widgets/icon.cpp +++ b/widgets/icon.cpp @@ -473,7 +473,7 @@ void Icon::setSvg(const QString &svgFilePath, const QString &elementId) if (!d->iconSvg) { d->iconSvg = new Plasma::Svg(svgFilePath); } else { - d->iconSvg->setFile(svgFilePath); + d->iconSvg->setImagePath(svgFilePath); } d->iconSvgElement = elementId;