summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmlanimation.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-22 03:41:56 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-22 03:41:56 (GMT)
commit1777678767e1f30ff5df0b0a7d19c0af9c5c9590 (patch)
treec16315aaae4132d86b0992a0410d05d3c9aa4115 /src/declarative/util/qmlanimation.cpp
parent34055e0160e2e94b0dd6b972c5bdc96a421adcf1 (diff)
downloadQt-1777678767e1f30ff5df0b0a7d19c0af9c5c9590.zip
Qt-1777678767e1f30ff5df0b0a7d19c0af9c5c9590.tar.gz
Qt-1777678767e1f30ff5df0b0a7d19c0af9c5c9590.tar.bz2
Remove moveToParent property.
Functionality has been moved to ParentChange.
Diffstat (limited to 'src/declarative/util/qmlanimation.cpp')
-rw-r--r--src/declarative/util/qmlanimation.cpp35
1 files changed, 10 insertions, 25 deletions
diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp
index ff070c1..7d9e30f 100644
--- a/src/declarative/util/qmlanimation.cpp
+++ b/src/declarative/util/qmlanimation.cpp
@@ -1128,54 +1128,39 @@ void QmlParentChangeAction::transition(QmlStateActions &actions,
TransitionDirection direction)
{
Q_D(QmlParentChangeAction);
+ Q_UNUSED(modified);
Q_UNUSED(direction);
struct QmlParentChangeActionData : public QAbstractAnimationAction
{
QmlStateActions actions;
+ bool reverse;
virtual void doAction()
{
for (int ii = 0; ii < actions.count(); ++ii) {
const Action &action = actions.at(ii);
- QmlBehaviour::_ignore = true;
- action.property.write(action.toValue);
- QmlBehaviour::_ignore = false;
+ if (reverse)
+ action.event->reverse();
+ else
+ action.event->execute();
}
}
};
QmlParentChangeActionData *data = new QmlParentChangeActionData;
- QSet<QObject *> objs;
for (int ii = 0; ii < actions.count(); ++ii) {
Action &action = actions[ii];
- QObject *obj = action.property.object();
- QString propertyName = action.property.name();
-
- if ((!target() || target() == obj) && propertyName == QString(QLatin1String("moveToParent"))) {
- objs.insert(obj);
+ //### should we still use target to filter?
+ if (action.event /*&& action.event->name() == d->parentChange*/) { //###
Action myAction = action;
-
- /*if (d->value.isValid())
- myAction.toValue = d->value;*/
-
- modified << action.property;
+ data->reverse = action.reverseEvent;
data->actions << myAction;
- action.fromValue = myAction.toValue;
+ action.actionDone = true;
}
}
- /*if (d->value.isValid() && target() && !objs.contains(target())) {
- QObject *obj = target();
- for (int jj = 0; jj < props.count(); ++jj) {
- Action myAction;
- myAction.property = QmlMetaProperty(obj, props.at(jj));
- myAction.toValue = d->value;
- data->actions << myAction;
- }
- }*/
-
if (data->actions.count()) {
d->cpa->setAnimAction(data, QAbstractAnimation::DeleteWhenStopped);
} else {