summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-05-31 03:35:48 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-05-31 03:41:50 (GMT)
commit51aed62ef08f1ffacce71d44612abe46b8344923 (patch)
tree6327e4f30e15d39d073fbf48c9beb849b1c803ac
parent57d25d03f0a53be4cca6d20dcce0e5f2f9eecc45 (diff)
downloadQt-51aed62ef08f1ffacce71d44612abe46b8344923.zip
Qt-51aed62ef08f1ffacce71d44612abe46b8344923.tar.gz
Qt-51aed62ef08f1ffacce71d44612abe46b8344923.tar.bz2
Add notifier for PathPercent.value
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index 2d08c7c..141a938 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -867,6 +867,9 @@ qreal QDeclarativePathPercent::value() const
void QDeclarativePathPercent::setValue(qreal value)
{
- _value = value;
+ if (_value != value) {
+ _value = value;
+ emit changed();
+ }
}
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
index 17a2ea3..dad43e6 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -175,7 +175,7 @@ private:
class Q_DECLARATIVE_EXPORT QDeclarativePathPercent : public QDeclarativePathElement
{
Q_OBJECT
- Q_PROPERTY(qreal value READ value WRITE setValue)
+ Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
public:
QDeclarativePathPercent(QObject *parent=0) : QDeclarativePathElement(parent) {}