summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlanimation_p.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-22 04:56:49 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-22 05:53:27 (GMT)
commit33eb76f050b45718d87926a8ff7afc89d6201c16 (patch)
tree935ddc2337b3891aab1ad7edcb06a62aabf14668 /src/declarative/util/qmlanimation_p.h
parent5f63321e3fe2b436d469d2722dc464ea4c7830c4 (diff)
downloadQt-33eb76f050b45718d87926a8ff7afc89d6201c16.zip
Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.gz
Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.bz2
Replace QmlList* and QList* support with a single QmlListProperty type
As a value type QmlListProperty doesn't consume any memory in the object. It also has a companion QmlListReference class that is part of the public API for C++ developers to interact with that also manages memory issues that existed with previous solutions (if the containing QObject was destroyed it left a dangling pointer).
Diffstat (limited to 'src/declarative/util/qmlanimation_p.h')
-rw-r--r--src/declarative/util/qmlanimation_p.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/declarative/util/qmlanimation_p.h b/src/declarative/util/qmlanimation_p.h
index 50eb577..623ad8d 100644
--- a/src/declarative/util/qmlanimation_p.h
+++ b/src/declarative/util/qmlanimation_p.h
@@ -190,8 +190,8 @@ class QmlPropertyAction : public QmlAbstractAnimation
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
- Q_PROPERTY(QList<QObject *>* targets READ targets)
- Q_PROPERTY(QList<QObject *>* exclude READ exclude)
+ Q_PROPERTY(QmlListProperty<QObject> targets READ targets)
+ Q_PROPERTY(QmlListProperty<QObject> exclude READ exclude)
Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged)
public:
@@ -207,8 +207,8 @@ public:
QString properties() const;
void setProperties(const QString &);
- QList<QObject *> *targets();
- QList<QObject *> *exclude();
+ QmlListProperty<QObject> targets();
+ QmlListProperty<QObject> exclude();
QVariant value() const;
void setValue(const QVariant &);
@@ -265,8 +265,8 @@ class Q_AUTOTEST_EXPORT QmlPropertyAnimation : public QmlAbstractAnimation
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY targetChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
- Q_PROPERTY(QList<QObject *>* targets READ targets)
- Q_PROPERTY(QList<QObject *>* exclude READ exclude)
+ Q_PROPERTY(QmlListProperty<QObject> targets READ targets)
+ Q_PROPERTY(QmlListProperty<QObject> exclude READ exclude)
public:
QmlPropertyAnimation(QObject *parent=0);
@@ -293,8 +293,8 @@ public:
QString properties() const;
void setProperties(const QString &);
- QList<QObject *> *targets();
- QList<QObject *> *exclude();
+ QmlListProperty<QObject> targets();
+ QmlListProperty<QObject> exclude();
protected:
QmlPropertyAnimation(QmlPropertyAnimationPrivate &dd, QObject *parent);
@@ -404,13 +404,13 @@ class QmlAnimationGroup : public QmlAbstractAnimation
Q_DECLARE_PRIVATE(QmlAnimationGroup)
Q_CLASSINFO("DefaultProperty", "animations")
- Q_PROPERTY(QmlList<QmlAbstractAnimation *> *animations READ animations)
+ Q_PROPERTY(QmlListProperty<QmlAbstractAnimation> animations READ animations)
public:
QmlAnimationGroup(QObject *parent);
virtual ~QmlAnimationGroup();
- QmlList<QmlAbstractAnimation *>* animations();
+ QmlListProperty<QmlAbstractAnimation> animations();
friend class QmlAbstractAnimation;
};