From 254029b3ff6f14674c54c68443a5a53460e75426 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 5 Feb 2010 15:59:12 +1000 Subject: Pass symbols::prefix (Action -> QmlAction) --- .../graphicsitems/qmlgraphicspositioners.cpp | 8 ++-- src/declarative/util/qmlanimation.cpp | 34 +++++++-------- src/declarative/util/qmlbehavior.cpp | 2 +- src/declarative/util/qmlpropertychanges.cpp | 10 ++--- src/declarative/util/qmlstate.cpp | 48 +++++++++++----------- src/declarative/util/qmlstate_p.h | 20 ++++----- src/declarative/util/qmlstate_p_p.h | 8 ++-- src/declarative/util/qmlstateoperations.cpp | 18 ++++---- src/declarative/util/qmlstateoperations_p.h | 12 +++--- src/declarative/util/qmltransitionmanager.cpp | 24 +++++------ src/declarative/util/qmltransitionmanager_p_p.h | 2 +- 11 files changed, 93 insertions(+), 93 deletions(-) diff --git a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp index e7fa7b8..5b081a2 100644 --- a/src/declarative/graphicsitems/qmlgraphicspositioners.cpp +++ b/src/declarative/graphicsitems/qmlgraphicspositioners.cpp @@ -255,9 +255,9 @@ void QmlGraphicsBasePositioner::positionX(int x, const PositionedItem &target) target.item->setX(x); }else{ if(target.isNew) - d->addActions << Action(target.item, QLatin1String("x"), QVariant(x)); + d->addActions << QmlAction(target.item, QLatin1String("x"), QVariant(x)); else - d->moveActions << Action(target.item, QLatin1String("x"), QVariant(x)); + d->moveActions << QmlAction(target.item, QLatin1String("x"), QVariant(x)); } } } @@ -270,9 +270,9 @@ void QmlGraphicsBasePositioner::positionY(int y, const PositionedItem &target) target.item->setY(y); }else{ if(target.isNew) - d->addActions << Action(target.item, QLatin1String("y"), QVariant(y)); + d->addActions << QmlAction(target.item, QLatin1String("y"), QVariant(y)); else - d->moveActions << Action(target.item, QLatin1String("y"), QVariant(y)); + d->moveActions << QmlAction(target.item, QLatin1String("y"), QVariant(y)); } } } diff --git a/src/declarative/util/qmlanimation.cpp b/src/declarative/util/qmlanimation.cpp index 74f5b3a..ba096b3 100644 --- a/src/declarative/util/qmlanimation.cpp +++ b/src/declarative/util/qmlanimation.cpp @@ -778,7 +778,7 @@ void QmlScriptAction::transition(QmlStateActions &actions, d->hasRunScriptScript = false; for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; if (action.event && action.event->typeName() == QLatin1String("StateChangeScript") && static_cast(action.event)->name() == d->name) { @@ -1012,7 +1012,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions, virtual void doAction() { for (int ii = 0; ii < actions.count(); ++ii) { - const Action &action = actions.at(ii); + const QmlAction &action = actions.at(ii); action.property.write(action.toValue, QmlMetaProperty::BypassInterceptor | QmlMetaProperty::DontRemoveBinding); } } @@ -1034,14 +1034,14 @@ void QmlPropertyAction::transition(QmlStateActions &actions, bool hasExplicit = false; if (hasTarget && d->value.isValid()) { - Action myAction; + QmlAction 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]; + QmlAction &action = actions[ii]; if (action.property.object() == myAction.property.object() && myAction.property.name() == action.property.name()) { modified << action.property; @@ -1053,7 +1053,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions, if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; QObject *obj = action.property.object(); QString propertyName = action.property.name(); @@ -1064,7 +1064,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions, if ((d->targets.isEmpty() || d->targets.contains(obj) || (!same && d->targets.contains(sObj))) && (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) && (props.contains(propertyName) || (!same && props.contains(sPropertyName)))) { - Action myAction = action; + QmlAction myAction = action; if (d->value.isValid()) myAction.toValue = d->value; @@ -1077,7 +1077,7 @@ void QmlPropertyAction::transition(QmlStateActions &actions, if ((d->userProperty.value.object() == obj || (!same && d->userProperty.value.object() == sObj)) && (d->userProperty.value.name() == propertyName || (!same && d->userProperty.value.name() == sPropertyName))) { //### same as above. merge - Action myAction = action; + QmlAction myAction = action; if (d->value.isValid()) myAction.toValue = d->value; @@ -1258,7 +1258,7 @@ void QmlParentAction::transition(QmlStateActions &actions, virtual void doAction() { for (int ii = 0; ii < actions.count(); ++ii) { - const Action &action = actions.at(ii); + const QmlAction &action = actions.at(ii); if (reverse) action.event->reverse(); else @@ -1275,12 +1275,12 @@ void QmlParentAction::transition(QmlStateActions &actions, } for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; if (action.event && action.event->typeName() == QLatin1String("ParentChange") && !d->pcTarget && (!d->pcMatchTarget || static_cast(action.event)->object() == d->pcMatchTarget)) { - Action myAction = action; + QmlAction myAction = action; data->reverse = action.reverseEvent; //### this logic differs from PropertyAnimation // (probably a result of modified vs. done) @@ -1302,7 +1302,7 @@ void QmlParentAction::transition(QmlStateActions &actions, if (d->pcTarget && d->pcParent) { data->reverse = false; - Action myAction; + QmlAction myAction; QmlParentChange *pc = new QmlParentChange; pc->setObject(d->pcTarget); pc->setParent(d->pcParent); @@ -2186,7 +2186,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, v = 1 - v; QmlTimeLineValue::setValue(v); for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; if (v == 1.) action.property.write(action.toValue, QmlMetaProperty::BypassInterceptor | QmlMetaProperty::DontRemoveBinding); @@ -2235,7 +2235,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, bool hasExplicit = false; //an explicit animation has been specified if (hasTarget && d->toIsDefined) { - Action myAction; + QmlAction myAction; myAction.property = d->createProperty(target(), d->propertyName, this); if (myAction.property.isValid()) { if (d->fromIsDefined) { @@ -2247,7 +2247,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, data->actions << myAction; hasExplicit = true; for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; if (action.property.object() == myAction.property.object() && myAction.property.name() == action.property.name()) { modified << action.property; @@ -2259,7 +2259,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, if (!hasExplicit) for (int ii = 0; ii < actions.count(); ++ii) { - Action &action = actions[ii]; + QmlAction &action = actions[ii]; QObject *obj = action.property.object(); QString propertyName = action.property.name(); @@ -2271,7 +2271,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, (!d->exclude.contains(obj)) && (same || (!d->exclude.contains(sObj))) && (props.contains(propertyName) || (!same && props.contains(sPropertyName)) || (useType && action.property.propertyType() == d->interpolatorType))) { - Action myAction = action; + QmlAction myAction = action; if (d->fromIsDefined) myAction.fromValue = d->from; @@ -2292,7 +2292,7 @@ void QmlPropertyAnimation::transition(QmlStateActions &actions, if ((d->userProperty.value.object() == obj || (!same && d->userProperty.value.object() == sObj)) && (d->userProperty.value.name() == propertyName || (!same && d->userProperty.value.name() == sPropertyName))) { //### same as above. merge - Action myAction = action; + QmlAction myAction = action; if (d->fromIsDefined) myAction.fromValue = d->from; diff --git a/src/declarative/util/qmlbehavior.cpp b/src/declarative/util/qmlbehavior.cpp index 9757fa2..b9c77f5 100644 --- a/src/declarative/util/qmlbehavior.cpp +++ b/src/declarative/util/qmlbehavior.cpp @@ -163,7 +163,7 @@ void QmlBehavior::write(const QVariant &value) d->animation->qtAnimation()->stop(); QmlStateOperation::ActionList actions; - Action action; + QmlAction action; action.property = d->property; action.fromValue = d->currentValue; action.toValue = value; diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp index 18f32ff..68fc5cc 100644 --- a/src/declarative/util/qmlpropertychanges.cpp +++ b/src/declarative/util/qmlpropertychanges.cpp @@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE This property holds the object which contains the properties to be changed. */ -class QmlReplaceSignalHandler : public ActionEvent +class QmlReplaceSignalHandler : public QmlActionEvent { public: QmlReplaceSignalHandler() : expression(0), reverseExpression(0), @@ -149,7 +149,7 @@ public: } virtual void saveCurrentValues() { rewindExpression = property.signalExpression(); } - virtual bool override(ActionEvent*other) { + virtual bool override(QmlActionEvent*other) { if (other == this) return true; if (other->typeName() != typeName()) @@ -378,7 +378,7 @@ QmlPropertyChanges::ActionList QmlPropertyChanges::actions() QByteArray property = d->properties.at(ii).first; - Action a(d->object, QString::fromLatin1(property), + QmlAction a(d->object, QString::fromLatin1(property), d->properties.at(ii).second); if (a.property.isValid()) { @@ -397,7 +397,7 @@ QmlPropertyChanges::ActionList QmlPropertyChanges::actions() QmlReplaceSignalHandler *handler = d->signalReplacements.at(ii); if (handler->property.isValid()) { - Action a; + QmlAction a; a.event = handler; list << a; } @@ -409,7 +409,7 @@ QmlPropertyChanges::ActionList QmlPropertyChanges::actions() QmlMetaProperty prop = d->property(property); if (prop.isValid()) { - Action a; + QmlAction a; a.restore = restoreEntryValues(); a.property = prop; a.fromValue = a.property.read(); diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp index 6a5b82a..cae8054 100644 --- a/src/declarative/util/qmlstate.cpp +++ b/src/declarative/util/qmlstate.cpp @@ -57,13 +57,13 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(stateChangeDebug, STATECHANGE_DEBUG); -Action::Action() +QmlAction::QmlAction() : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), fromBinding(0), toBinding(0), event(0), specifiedObject(0) { } -Action::Action(QObject *target, const QString &propertyName, +QmlAction::QmlAction(QObject *target, const QString &propertyName, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), toValue(value), fromBinding(0), toBinding(0), event(0), specifiedObject(target), @@ -74,47 +74,47 @@ Action::Action(QObject *target, const QString &propertyName, fromValue = property.read(); } -ActionEvent::~ActionEvent() +QmlActionEvent::~QmlActionEvent() { } -QString ActionEvent::typeName() const +QString QmlActionEvent::typeName() const { return QString(); } -void ActionEvent::execute() +void QmlActionEvent::execute() { } -bool ActionEvent::isReversable() +bool QmlActionEvent::isReversable() { return false; } -void ActionEvent::reverse() +void QmlActionEvent::reverse() { } -QList ActionEvent::extraActions() +QList QmlActionEvent::extraActions() { - return QList(); + return QList(); } -bool ActionEvent::changesBindings() +bool QmlActionEvent::changesBindings() { return false; } -void ActionEvent::clearForwardBindings() +void QmlActionEvent::clearForwardBindings() { } -void ActionEvent::clearReverseBindings() +void QmlActionEvent::clearReverseBindings() { } -bool ActionEvent::override(ActionEvent *other) +bool QmlActionEvent::override(QmlActionEvent *other) { Q_UNUSED(other); return false; @@ -316,7 +316,7 @@ void QmlState::cancel() d->transitionManager.cancel(); } -void Action::deleteFromBinding() +void QmlAction::deleteFromBinding() { if (fromBinding) { property.setBinding(0); @@ -351,7 +351,7 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever QmlStatePrivate::SimpleActionList additionalReverts; // First add the reverse of all the applyList actions for (int ii = 0; ii < applyList.count(); ++ii) { - Action &action = applyList[ii]; + QmlAction &action = applyList[ii]; bool found = false; @@ -360,7 +360,7 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever if (!action.event->isReversable()) continue; for (jj = 0; jj < d->revertList.count(); ++jj) { - ActionEvent *event = d->revertList.at(jj).event; + QmlActionEvent *event = d->revertList.at(jj).event; if (event && event->typeName() == action.event->typeName()) { if (action.event->override(event)) { found = true; @@ -389,7 +389,7 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever } else { // Only need to revert the applyList action if the previous // state doesn't have a higher priority revert already - SimpleAction r(action); + QmlSimpleAction r(action); additionalReverts << r; } } else if (d->revertList.at(jj).binding != action.fromBinding) { @@ -402,11 +402,11 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever for (int ii = 0; ii < d->revertList.count(); ++ii) { bool found = false; if (d->revertList.at(ii).event) { - ActionEvent *event = d->revertList.at(ii).event; + QmlActionEvent *event = d->revertList.at(ii).event; if (!event->isReversable()) continue; for (int jj = 0; !found && jj < applyList.count(); ++jj) { - const Action &action = applyList.at(jj); + const QmlAction &action = applyList.at(jj); if (action.event && action.event->typeName() == event->typeName()) { if (action.event->override(event)) found = true; @@ -414,7 +414,7 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever } } else { for (int jj = 0; !found && jj < applyList.count(); ++jj) { - const Action &action = applyList.at(jj); + const QmlAction &action = applyList.at(jj); if (action.property == d->revertList.at(ii).property) found = true; } @@ -425,7 +425,7 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever if (delBinding) delBinding->destroy(); - Action a; + QmlAction a; a.property = d->revertList.at(ii).property; a.fromValue = cur; a.toValue = d->revertList.at(ii).value; @@ -446,11 +446,11 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever // Output for debugging if (stateChangeDebug()) { - foreach(const Action &action, applyList) { + foreach(const QmlAction &action, applyList) { if (action.event) - qWarning() << " Action event:" << action.event->typeName(); + qWarning() << " QmlAction event:" << action.event->typeName(); else - qWarning() << " Action:" << action.property.object() + qWarning() << " QmlAction:" << action.property.object() << action.property.name() << "From:" << action.fromValue << "To:" << action.toValue; } diff --git a/src/declarative/util/qmlstate_p.h b/src/declarative/util/qmlstate_p.h index fdac847..5862c02 100644 --- a/src/declarative/util/qmlstate_p.h +++ b/src/declarative/util/qmlstate_p.h @@ -52,13 +52,13 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class ActionEvent; +class QmlActionEvent; class QmlBinding; -class Q_DECLARATIVE_EXPORT Action +class Q_DECLARATIVE_EXPORT QmlAction { public: - Action(); - Action(QObject *, const QString &, const QVariant &); + QmlAction(); + QmlAction(QObject *, const QString &, const QVariant &); bool restore:1; bool actionDone:1; @@ -71,7 +71,7 @@ public: QmlAbstractBinding *fromBinding; QmlAbstractBinding *toBinding; - ActionEvent *event; + QmlActionEvent *event; //strictly for matching QObject *specifiedObject; @@ -80,10 +80,10 @@ public: void deleteFromBinding(); }; -class ActionEvent +class QmlActionEvent { public: - virtual ~ActionEvent(); + virtual ~QmlActionEvent(); virtual QString typeName() const; virtual void execute(); @@ -96,12 +96,12 @@ public: virtual void saveCurrentValues() {} //virtual bool hasExtraActions(); - virtual QList extraActions(); + virtual QList extraActions(); virtual bool changesBindings(); virtual void clearForwardBindings(); virtual void clearReverseBindings(); - virtual bool override(ActionEvent*other); + virtual bool override(QmlActionEvent*other); }; //### rename to QmlStateChange? @@ -112,7 +112,7 @@ class Q_DECLARATIVE_EXPORT QmlStateOperation : public QObject public: QmlStateOperation(QObject *parent = 0) : QObject(parent) {} - typedef QList ActionList; + typedef QList ActionList; virtual ActionList actions(); diff --git a/src/declarative/util/qmlstate_p_p.h b/src/declarative/util/qmlstate_p_p.h index 0ae72cd..235fe62 100644 --- a/src/declarative/util/qmlstate_p_p.h +++ b/src/declarative/util/qmlstate_p_p.h @@ -64,11 +64,11 @@ QT_BEGIN_NAMESPACE -class SimpleAction +class QmlSimpleAction { public: enum State { StartState, EndState }; - SimpleAction(const Action &a, State state = StartState) + QmlSimpleAction(const QmlAction &a, State state = StartState) { property = a.property; specifiedObject = a.specifiedObject; @@ -90,7 +90,7 @@ public: QmlAbstractBinding *binding; QObject *specifiedObject; QString specifiedProperty; - ActionEvent *event; + QmlActionEvent *event; bool reverseEvent; }; @@ -102,7 +102,7 @@ public: QmlStatePrivate() : when(0), inState(false), group(0) {} - typedef QList SimpleActionList; + typedef QList SimpleActionList; QString name; QmlBinding *when; diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp index df25e5b..35c8f7d 100644 --- a/src/declarative/util/qmlstateoperations.cpp +++ b/src/declarative/util/qmlstateoperations.cpp @@ -212,7 +212,7 @@ QmlStateOperation::ActionList QmlParentChange::actions() if (!d->target || !d->parent) return ActionList(); - Action a; + QmlAction a; a.event = this; return ActionList() << a; @@ -259,7 +259,7 @@ QString QmlParentChange::typeName() const return QLatin1String("ParentChange"); } -bool QmlParentChange::override(ActionEvent*other) +bool QmlParentChange::override(QmlActionEvent*other) { Q_D(QmlParentChange); if (other->typeName() != QLatin1String("ParentChange")) @@ -381,7 +381,7 @@ void QmlStateChangeScript::execute() QmlStateChangeScript::ActionList QmlStateChangeScript::actions() { ActionList rv; - Action a; + QmlAction a; a.event = this; rv << a; return rv; @@ -466,7 +466,7 @@ QmlAnchorChanges::~QmlAnchorChanges() QmlAnchorChanges::ActionList QmlAnchorChanges::actions() { - Action a; + QmlAction a; a.event = this; return ActionList() << a; } @@ -650,16 +650,16 @@ QString QmlAnchorChanges::typeName() const return QLatin1String("AnchorChanges"); } -QList QmlAnchorChanges::extraActions() +QList QmlAnchorChanges::extraActions() { Q_D(QmlAnchorChanges); - QList extra; + QList extra; //### try to be smarter about which ones we add. // or short-circuit later on if they haven't actually changed. // we shouldn't set explicit width if there wasn't one before. if (d->target) { - Action a; + QmlAction a; a.fromValue = d->fromX; a.property = QmlMetaProperty(d->target, QLatin1String("x")); extra << a; @@ -781,11 +781,11 @@ void QmlAnchorChanges::clearReverseBindings() d->target->anchors()->resetBaseline(); } -bool QmlAnchorChanges::override(ActionEvent*other) +bool QmlAnchorChanges::override(QmlActionEvent*other) { if (other->typeName() != QLatin1String("AnchorChanges")) return false; - if (static_cast(this) == other) + if (static_cast(this) == other) return true; if (static_cast(other)->object() == object()) return true; diff --git a/src/declarative/util/qmlstateoperations_p.h b/src/declarative/util/qmlstateoperations_p.h index 75c17422..1a9f76f 100644 --- a/src/declarative/util/qmlstateoperations_p.h +++ b/src/declarative/util/qmlstateoperations_p.h @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QmlParentChangePrivate; -class Q_DECLARATIVE_EXPORT QmlParentChange : public QmlStateOperation, public ActionEvent +class Q_DECLARATIVE_EXPORT QmlParentChange : public QmlStateOperation, public QmlActionEvent { Q_OBJECT Q_DECLARE_PRIVATE(QmlParentChange) @@ -79,13 +79,13 @@ public: virtual bool isReversable(); virtual void reverse(); virtual QString typeName() const; - virtual bool override(ActionEvent*other); + virtual bool override(QmlActionEvent*other); virtual void rewind(); virtual void saveCurrentValues(); }; class QmlStateChangeScriptPrivate; -class Q_DECLARATIVE_EXPORT QmlStateChangeScript : public QmlStateOperation, public ActionEvent +class Q_DECLARATIVE_EXPORT QmlStateChangeScript : public QmlStateOperation, public QmlActionEvent { Q_OBJECT Q_DECLARE_PRIVATE(QmlStateChangeScript) @@ -111,7 +111,7 @@ public: }; class QmlAnchorChangesPrivate; -class Q_DECLARATIVE_EXPORT QmlAnchorChanges : public QmlStateOperation, public ActionEvent +class Q_DECLARATIVE_EXPORT QmlAnchorChanges : public QmlStateOperation, public QmlActionEvent { Q_OBJECT Q_DECLARE_PRIVATE(QmlAnchorChanges) @@ -163,8 +163,8 @@ public: virtual bool isReversable(); virtual void reverse(); virtual QString typeName() const; - virtual bool override(ActionEvent*other); - virtual QList extraActions(); + virtual bool override(QmlActionEvent*other); + virtual QList extraActions(); virtual bool changesBindings(); virtual void saveOriginals(); virtual void clearForwardBindings(); diff --git a/src/declarative/util/qmltransitionmanager.cpp b/src/declarative/util/qmltransitionmanager.cpp index e2a25c5..a3a16ca 100644 --- a/src/declarative/util/qmltransitionmanager.cpp +++ b/src/declarative/util/qmltransitionmanager.cpp @@ -57,7 +57,7 @@ public: : state(0), transition(0) {} void applyBindings(); - typedef QList SimpleActionList; + typedef QList SimpleActionList; QmlState *state; QmlTransition *transition; QmlStateOperation::ActionList bindingsList; @@ -96,7 +96,7 @@ void QmlTransitionManager::complete() void QmlTransitionManagerPrivate::applyBindings() { - foreach(const Action &action, bindingsList) { + foreach(const QmlAction &action, bindingsList) { if (action.toBinding) { action.property.setBinding(action.toBinding); } else if (action.event) { @@ -111,14 +111,14 @@ void QmlTransitionManagerPrivate::applyBindings() bindingsList.clear(); } -void QmlTransitionManager::transition(const QList &list, +void QmlTransitionManager::transition(const QList &list, QmlTransition *transition) { cancel(); QmlStateOperation::ActionList applyList = list; // Determine which actions are binding changes. - foreach(const Action &action, applyList) { + foreach(const QmlAction &action, applyList) { if (action.toBinding) d->bindingsList << action; if (action.fromBinding) @@ -147,7 +147,7 @@ void QmlTransitionManager::transition(const QList &list, // Apply all the property and binding changes for (int ii = 0; ii < applyList.size(); ++ii) { - const Action &action = applyList.at(ii); + const QmlAction &action = applyList.at(ii); if (action.toBinding) { action.property.setBinding(action.toBinding, QmlMetaProperty::BypassInterceptor | QmlMetaProperty::DontRemoveBinding); } else if (!action.event) { @@ -163,7 +163,7 @@ void QmlTransitionManager::transition(const QList &list, // Read all the end values for binding changes for (int ii = 0; ii < applyList.size(); ++ii) { - Action *action = &applyList[ii]; + QmlAction *action = &applyList[ii]; if (action->event) continue; const QmlMetaProperty &prop = action->property; @@ -173,7 +173,7 @@ void QmlTransitionManager::transition(const QList &list, } // Revert back to the original values - foreach(const Action &action, applyList) { + foreach(const QmlAction &action, applyList) { if (action.event) { if (action.event->isReversable()) { if (action.reverseEvent) { //reverse the reverse @@ -203,7 +203,7 @@ void QmlTransitionManager::transition(const QList &list, // Modify the action list to remove actions handled in the transition for (int ii = 0; ii < applyList.count(); ++ii) { - const Action &action = applyList.at(ii); + const QmlAction &action = applyList.at(ii); if (action.event) { @@ -217,7 +217,7 @@ void QmlTransitionManager::transition(const QList &list, if (touched.contains(action.property)) { if (action.toValue != action.fromValue) d->completeList << - SimpleAction(action, SimpleAction::EndState); + QmlSimpleAction(action, QmlSimpleAction::EndState); applyList.removeAt(ii); --ii; @@ -231,7 +231,7 @@ void QmlTransitionManager::transition(const QList &list, // be applied immediately. We skip applying bindings, as they are all // applied at the end in applyBindings() to avoid any nastiness mid // transition - foreach(const Action &action, applyList) { + foreach(const QmlAction &action, applyList) { if (action.event && !action.event->changesBindings()) { if (action.event->isReversable() && action.reverseEvent) action.event->reverse(); @@ -242,7 +242,7 @@ void QmlTransitionManager::transition(const QList &list, } } if (stateChangeDebug()) { - foreach(const Action &action, applyList) { + foreach(const QmlAction &action, applyList) { if (action.event) qWarning() << " No transition for event:" << action.event->typeName(); else @@ -264,7 +264,7 @@ void QmlTransitionManager::cancel() } for(int i = 0; i < d->bindingsList.count(); ++i) { - Action action = d->bindingsList[i]; + QmlAction action = d->bindingsList[i]; if (action.toBinding && action.deletableToBinding) { action.property.setBinding(0); action.toBinding->destroy(); diff --git a/src/declarative/util/qmltransitionmanager_p_p.h b/src/declarative/util/qmltransitionmanager_p_p.h index c7e609f..cb4111c 100644 --- a/src/declarative/util/qmltransitionmanager_p_p.h +++ b/src/declarative/util/qmltransitionmanager_p_p.h @@ -65,7 +65,7 @@ public: QmlTransitionManager(); ~QmlTransitionManager(); - void transition(const QList &, QmlTransition *transition); + void transition(const QList &, QmlTransition *transition); void cancel(); -- cgit v0.12