Add notify signal for Svg::imagePath property
The missing notify signal was causing problems in QtQuick2: "depends on non-NOTIFYable properties". Reviewed-By: Marco Martin
This commit is contained in:
parent
8dcfa386d0
commit
ea376016c0
@ -235,6 +235,8 @@ bool SvgPrivate::setImagePath(const QString &imagePath)
|
||||
lastModified = info.lastModified().toTime_t();
|
||||
}
|
||||
|
||||
emit q->imagePathChanged();
|
||||
|
||||
return updateNeeded;
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ class PLASMA_EXPORT Svg : public QObject
|
||||
Q_ENUMS(ContentType)
|
||||
Q_PROPERTY(QSize size READ size WRITE resize NOTIFY sizeChanged)
|
||||
Q_PROPERTY(bool multipleImages READ containsMultipleImages WRITE setContainsMultipleImages)
|
||||
Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath)
|
||||
Q_PROPERTY(QString imagePath READ imagePath WRITE setImagePath NOTIFY imagePathChanged)
|
||||
Q_PROPERTY(bool usingRenderingCache READ isUsingRenderingCache WRITE setUsingRenderingCache)
|
||||
|
||||
public:
|
||||
@ -378,6 +378,11 @@ class PLASMA_EXPORT Svg : public QObject
|
||||
*/
|
||||
void sizeChanged();
|
||||
|
||||
/**
|
||||
* Emitted whenever the image path of the Svg is changed.
|
||||
*/
|
||||
void imagePathChanged();
|
||||
|
||||
private:
|
||||
SvgPrivate *const d;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user