make setImagePath virtual
This commit is contained in:
parent
9da79a0840
commit
a225402b9e
6
svg.cpp
6
svg.cpp
@ -778,12 +778,6 @@ bool Svg::containsMultipleImages() const
|
|||||||
|
|
||||||
void Svg::setImagePath(const QString &svgFilePath)
|
void Svg::setImagePath(const QString &svgFilePath)
|
||||||
{
|
{
|
||||||
//BIC FIXME: setImagePath should be virtual, or call an internal virtual protected method
|
|
||||||
if (FrameSvg *frame = qobject_cast<FrameSvg *>(this)) {
|
|
||||||
frame->setImagePath(svgFilePath);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (d->setImagePath(svgFilePath)) {
|
if (d->setImagePath(svgFilePath)) {
|
||||||
//kDebug() << "repaintNeeded";
|
//kDebug() << "repaintNeeded";
|
||||||
emit repaintNeeded();
|
emit repaintNeeded();
|
||||||
|
2
svg.h
2
svg.h
@ -299,7 +299,7 @@ class PLASMA_EXPORT Svg : public QObject
|
|||||||
* @arg svgFilePath either an absolute path to an SVG file, or
|
* @arg svgFilePath either an absolute path to an SVG file, or
|
||||||
* an image name
|
* an image name
|
||||||
*/
|
*/
|
||||||
void setImagePath(const QString &svgFilePath);
|
virtual void setImagePath(const QString &svgFilePath);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SVG file to render.
|
* The SVG file to render.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user