diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2012-02-17 14:02:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-20 07:35:15 +0100 |
commit | 6b775ffda38549bc9d76b6374dd9604115868a18 (patch) | |
tree | b2f43ee4dac51fbf71b4cdda9d20b1ad806939a8 /src/quick/items/qquickstateoperations.cpp | |
parent | 69ab984ac69fe3a10656e488fe354165b5aa550e (diff) |
Use an enum rather than a string to represent state event types.
Change-Id: Iad230b610f35b1c1faa6ce60615551f293d4745d
Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'src/quick/items/qquickstateoperations.cpp')
-rw-r--r-- | src/quick/items/qquickstateoperations.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp index bf78bade56..c4dd0fd146 100644 --- a/src/quick/items/qquickstateoperations.cpp +++ b/src/quick/items/qquickstateoperations.cpp @@ -465,15 +465,15 @@ void QQuickParentChange::reverse(Reason) d->doChange(d->origParent, d->origStackBefore); } -QString QQuickParentChange::typeName() const +QDeclarativeActionEvent::EventType QQuickParentChange::type() const { - return QLatin1String("ParentChange"); + return ParentChange; } bool QQuickParentChange::override(QDeclarativeActionEvent*other) { Q_D(QQuickParentChange); - if (other->typeName() != QLatin1String("ParentChange")) + if (other->type() != ParentChange) return false; if (QQuickParentChange *otherPC = static_cast<QQuickParentChange*>(other)) return (d->target == otherPC->object()); @@ -1116,9 +1116,9 @@ void QQuickAnchorChanges::reverse(Reason reason) d->target->setY(d->origY); } -QString QQuickAnchorChanges::typeName() const +QDeclarativeActionEvent::EventType QQuickAnchorChanges::type() const { - return QLatin1String("AnchorChanges"); + return AnchorChanges; } QList<QDeclarativeAction> QQuickAnchorChanges::additionalActions() @@ -1278,7 +1278,7 @@ void QQuickAnchorChanges::clearBindings() bool QQuickAnchorChanges::override(QDeclarativeActionEvent*other) { - if (other->typeName() != QLatin1String("AnchorChanges")) + if (other->type() != AnchorChanges) return false; if (static_cast<QDeclarativeActionEvent*>(this) == other) return true; |