summaryrefslogtreecommitdiffstats
path: root/src/declarative/util
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-09-25 04:45:44 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-09-25 04:45:44 (GMT)
commitc6090b6749c9f9bf002f999f808e456b74fea1bf (patch)
treebb568da34a86c0347fb27662a2e2633c1ed8059f /src/declarative/util
parenta8fa63eeb02773652befc138eef63c745f47684d (diff)
downloadQt-c6090b6749c9f9bf002f999f808e456b74fea1bf.zip
Qt-c6090b6749c9f9bf002f999f808e456b74fea1bf.tar.gz
Qt-c6090b6749c9f9bf002f999f808e456b74fea1bf.tar.bz2
Fix bug with signal overrides.
Diffstat (limited to 'src/declarative/util')
-rw-r--r--src/declarative/util/qmlpropertychanges.cpp5
-rw-r--r--src/declarative/util/qmlstate.cpp4
-rw-r--r--src/declarative/util/qmlstate.h2
-rw-r--r--src/declarative/util/qmlstateoperations.cpp2
-rw-r--r--src/declarative/util/qmlstateoperations.h2
5 files changed, 8 insertions, 7 deletions
diff --git a/src/declarative/util/qmlpropertychanges.cpp b/src/declarative/util/qmlpropertychanges.cpp
index eb14c2e..a5a08bc 100644
--- a/src/declarative/util/qmlpropertychanges.cpp
+++ b/src/declarative/util/qmlpropertychanges.cpp
@@ -96,8 +96,7 @@ public:
QmlExpression *ownedExpression;
virtual void execute() {
- reverseExpression = property.setSignalExpression(expression);
- ownedExpression = reverseExpression;
+ ownedExpression = property.setSignalExpression(expression);
}
virtual bool isReversable() { return true; }
@@ -105,6 +104,8 @@ public:
ownedExpression = property.setSignalExpression(reverseExpression);
}
+ virtual void saveOriginals() { reverseExpression = property.signalExpression(); }
+
virtual bool override(ActionEvent*other) {
if (other == this)
return true;
diff --git a/src/declarative/util/qmlstate.cpp b/src/declarative/util/qmlstate.cpp
index da7d429..3c85db7 100644
--- a/src/declarative/util/qmlstate.cpp
+++ b/src/declarative/util/qmlstate.cpp
@@ -360,8 +360,8 @@ void QmlState::apply(QmlStateGroup *group, QmlTransition *trans, QmlState *rever
}
}
if (!found)
- action.event->saveForwardBindings();
- //### do we ever need to do saveForwardBindings when found == true?
+ action.event->saveOriginals();
+ //### do we ever need to do saveOriginals when found == true?
} else {
action.fromBinding = action.property.binding();
diff --git a/src/declarative/util/qmlstate.h b/src/declarative/util/qmlstate.h
index 255051f..50128c0 100644
--- a/src/declarative/util/qmlstate.h
+++ b/src/declarative/util/qmlstate.h
@@ -90,12 +90,12 @@ public:
virtual void execute();
virtual bool isReversable();
virtual void reverse();
+ virtual void saveOriginals() {}
//virtual bool hasExtraActions();
virtual QList<Action> extraActions();
virtual bool changesBindings();
- virtual void saveForwardBindings() {}
virtual void clearForwardBindings();
virtual void clearReverseBindings();
virtual bool override(ActionEvent*other);
diff --git a/src/declarative/util/qmlstateoperations.cpp b/src/declarative/util/qmlstateoperations.cpp
index 50f80f6..8673bb2 100644
--- a/src/declarative/util/qmlstateoperations.cpp
+++ b/src/declarative/util/qmlstateoperations.cpp
@@ -557,7 +557,7 @@ bool QmlAnchorChanges::changesBindings()
return true;
}
-void QmlAnchorChanges::saveForwardBindings()
+void QmlAnchorChanges::saveOriginals()
{
Q_D(QmlAnchorChanges);
d->origLeft = d->target->anchors()->left();
diff --git a/src/declarative/util/qmlstateoperations.h b/src/declarative/util/qmlstateoperations.h
index a3943e7..34aec93 100644
--- a/src/declarative/util/qmlstateoperations.h
+++ b/src/declarative/util/qmlstateoperations.h
@@ -159,7 +159,7 @@ public:
virtual bool override(ActionEvent*other);
virtual QList<Action> extraActions();
virtual bool changesBindings();
- virtual void saveForwardBindings();
+ virtual void saveOriginals();
virtual void clearForwardBindings();
virtual void clearReverseBindings();
};