diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:29:47 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:29:47 (GMT) |
commit | 72480e97f0eb4ef49b380e46899a976cf97e78c4 (patch) | |
tree | 4aea0651fafe0eb8503195e13927588adf97d48b | |
parent | 4a665ff5da05860f5eb46e3982ef3d8163a6cf59 (diff) | |
parent | d45e7d09675f5dca5d18e2810c8cd8ae6b023279 (diff) | |
download | Qt-72480e97f0eb4ef49b380e46899a976cf97e78c4.zip Qt-72480e97f0eb4ef49b380e46899a976cf97e78c4.tar.gz Qt-72480e97f0eb4ef49b380e46899a976cf97e78c4.tar.bz2 |
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | doc/src/declarative/extending.qdoc | 2 | ||||
-rw-r--r-- | src/declarative/util/qmlanimation.cpp | 22 | ||||
-rw-r--r-- | src/declarative/util/qmlpackage.cpp | 24 | ||||
-rw-r--r-- | tools/qdoc3/test/qt-build-docs.qdocconf | 2 | ||||
-rw-r--r-- | tools/qdoc3/test/qt.qdocconf | 4 |
5 files changed, 49 insertions, 5 deletions
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 84d7089..893838f 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -296,7 +296,7 @@ identified through the use of the attacher type name, in the case shown \c BirthdayParty, as a suffix to the property name. In the example shown, \c BirthdayParty is called the attaching type, and the -Box instance the attachee object instance. +Boy instance the attachee object instance. For the attaching type, an attached property block is implemented as a new QObject derived type, called the attachment object. The properties on the diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 4c5015d..f5333a6 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -1032,15 +1032,26 @@ void QmlPropertyAction::transition(QmlStateActions &actions, QmlSetPropertyAnimationAction *data = new QmlSetPropertyAnimationAction; + bool hasExplicit = false; if (hasTarget && d->value.isValid()) { Action myAction; myAction.property = d->createProperty(target(), d->propertyName, this); if (myAction.property.isValid()) { myAction.toValue = d->value; data->actions << myAction; + hasExplicit = true; + for (int ii = 0; ii < actions.count(); ++ii) { + Action &action = actions[ii]; + if (action.property.object() == myAction.property.object() && + myAction.property.name() == action.property.name()) { + modified << action.property; + break; //### any chance there could be multiples? + } + } } } + if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { Action &action = actions[ii]; @@ -2219,6 +2230,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, data->interpolator = d->interpolator; data->reverse = direction == Backward ? true : false; + bool hasExplicit = false; //an explicit animation has been specified if (hasTarget && d->toIsDefined) { Action myAction; @@ -2231,9 +2243,19 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, d->convertVariant(d->to, d->interpolatorType ? d->interpolatorType : myAction.property.propertyType()); myAction.toValue = d->to; data->actions << myAction; + hasExplicit = true; + for (int ii = 0; ii < actions.count(); ++ii) { + Action &action = actions[ii]; + if (action.property.object() == myAction.property.object() && + myAction.property.name() == action.property.name()) { + modified << action.property; + break; //### any chance there could be multiples? + } + } } } + if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { Action &action = actions[ii]; diff --git a/src/declarative/util/qmlpackage.cpp b/src/declarative/util/qmlpackage.cpp index f9238ca..3214dc8 100644 --- a/src/declarative/util/qmlpackage.cpp +++ b/src/declarative/util/qmlpackage.cpp @@ -42,6 +42,7 @@ #include "qmlpackage_p.h" #include <private/qobject_p.h> +#include "private/qmlguard_p.h" QT_BEGIN_NAMESPACE @@ -50,7 +51,28 @@ class QmlPackagePrivate : public QObjectPrivate public: QmlPackagePrivate() {} - QmlConcreteList<QObject *> dataList; + class DataList; + struct DataGuard : public QmlGuard<QObject> + { + DataGuard(QObject *obj, DataList *l) : list(l) { (QmlGuard<QObject>&)*this = obj; } + DataList *list; + void objectDestroyed(QObject *) { + // we assume priv will always be destroyed after objectDestroyed calls + list->removeOne(*this); + } + }; + + class DataList : public QList<DataGuard>, public QmlList<QObject*> + { + public: + virtual void append(QObject* v) { QList<DataGuard>::append(DataGuard(v, this)); } + virtual void insert(int i, QObject* v) { QList<DataGuard>::insert(i, DataGuard(v, this)); } + virtual void clear() { QList<DataGuard>::clear(); } + virtual QObject* at(int i) const { return QList<DataGuard>::at(i); } + virtual void removeAt(int i) { QList<DataGuard>::removeAt(i); } + virtual int count() const { return QList<DataGuard>::count(); } + }; + DataList dataList; }; class QmlPackageAttached : public QObject diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 09dd979..20f90e6 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -96,7 +96,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" examples.imageextensions = "*.png" exampledirs = $QT_SOURCE_TREE/doc/src \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index 6d25432..6fbfe3f 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -99,7 +99,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \ $QTDIR/src/3rdparty/phonon/waveout sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" examples.imageextensions = "*.png" exampledirs = $QTDIR/doc/src \ @@ -110,7 +110,7 @@ exampledirs = $QTDIR/doc/src \ $QTDIR/src/3rdparty/webkit/WebKit/qt/docs imagedirs = $QTDIR/doc/src/images \ $QTDIR/examples \ - $QTDIR/doc/src/declarative/pics + $QTDIR/doc/src/declarative/pics outputdir = $QTDIR/doc/html tagfile = $QTDIR/doc/html/qt.tags base = file:$QTDIR/doc/html |