aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickstateoperations.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-23 15:19:52 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-10 11:40:56 +0000
commit9de77e056583b0bcfd7e17d855ac8956847c58eb (patch)
treec6f5c3e861ba2680b22bc14b3af932d35e4d249a /src/quick/items/qquickstateoperations.cpp
parent56affb66df2bd9ec7c6a349174b36d529aef4846 (diff)
Get rid of QQuickStateActionEvent::Reason
This doesn't do anything useful anymore afaict now that bindings are refcounted. Change-Id: I829facaa1bd463f90653a4190f08f8d04f31a6a4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/items/qquickstateoperations.cpp')
-rw-r--r--src/quick/items/qquickstateoperations.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index 15f8eeab7b..ac7fbc24af 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -482,7 +482,7 @@ void QQuickParentChange::saveOriginals()
saveCurrentValues();
}*/
-void QQuickParentChange::execute(Reason)
+void QQuickParentChange::execute()
{
Q_D(QQuickParentChange);
d->doChange(d->parent);
@@ -493,7 +493,7 @@ bool QQuickParentChange::isReversable()
return true;
}
-void QQuickParentChange::reverse(Reason)
+void QQuickParentChange::reverse()
{
Q_D(QQuickParentChange);
d->doChange(d->origParent, d->origStackBefore);
@@ -937,10 +937,8 @@ void QQuickAnchorChanges::setObject(QQuickItem *target)
\endqml
*/
-void QQuickAnchorChanges::execute(Reason reason)
+void QQuickAnchorChanges::execute()
{
- Q_UNUSED(reason);
-
Q_D(QQuickAnchorChanges);
if (!d->target)
return;
@@ -1035,7 +1033,7 @@ bool QQuickAnchorChanges::isReversable()
return true;
}
-void QQuickAnchorChanges::reverse(Reason reason)
+void QQuickAnchorChanges::reverse()
{
Q_D(QQuickAnchorChanges);
if (!d->target)
@@ -1046,44 +1044,30 @@ void QQuickAnchorChanges::reverse(Reason reason)
if (d->leftBinding) {
targetPrivate->anchors()->resetLeft();
QQmlPropertyPrivate::removeBinding(d->leftBinding.data());
- if (reason == ActualChange)
- d->leftBinding = 0;
}
if (d->rightBinding) {
targetPrivate->anchors()->resetRight();
QQmlPropertyPrivate::removeBinding(d->rightBinding.data());
- if (reason == ActualChange)
- d->rightBinding = 0;
}
if (d->hCenterBinding) {
targetPrivate->anchors()->resetHorizontalCenter();
QQmlPropertyPrivate::removeBinding(d->hCenterBinding.data());
- if (reason == ActualChange)
- d->hCenterBinding = 0;
}
if (d->topBinding) {
targetPrivate->anchors()->resetTop();
QQmlPropertyPrivate::removeBinding(d->topBinding.data());
- if (reason == ActualChange)
- d->topBinding = 0;
}
if (d->bottomBinding) {
targetPrivate->anchors()->resetBottom();
QQmlPropertyPrivate::removeBinding(d->bottomBinding.data());
- if (reason == ActualChange)
- d->bottomBinding = 0;
}
if (d->vCenterBinding) {
targetPrivate->anchors()->resetVerticalCenter();
QQmlPropertyPrivate::removeBinding(d->vCenterBinding.data());
- if (reason == ActualChange)
- d->vCenterBinding = 0;
}
if (d->baselineBinding) {
targetPrivate->anchors()->resetBaseline();
QQmlPropertyPrivate::removeBinding(d->baselineBinding.data());
- if (reason == ActualChange)
- d->baselineBinding = 0;
}
//restore previous anchors