diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-13 15:42:03 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-25 18:50:14 +0000 |
commit | 2540a60e39bafaac3a0c373f52270003d4308bf5 (patch) | |
tree | 5f8cb7baf8dfa0eefdedae8389defc8f9a40e78e /src/quick/util/qquicktransitionmanager.cpp | |
parent | 4c365e4d4d125c8c874c3ffcbeefbdcd6453ea28 (diff) |
Make removal of bindings explicit
This simplifies the code for further refactoring.
Change-Id: I6bcb5ce397f642242af80ce37dc8bba1fa9bf3f5
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/quick/util/qquicktransitionmanager.cpp')
-rw-r--r-- | src/quick/util/qquicktransitionmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quick/util/qquicktransitionmanager.cpp b/src/quick/util/qquicktransitionmanager.cpp index 832596d9a2..81a3c34dc0 100644 --- a/src/quick/util/qquicktransitionmanager.cpp +++ b/src/quick/util/qquicktransitionmanager.cpp @@ -131,7 +131,7 @@ void QQuickTransitionManager::transition(const QList<QQuickStateAction> &list, if (action.toBinding) d->bindingsList << action; if (action.fromBinding) - QQmlPropertyPrivate::setBinding(action.property, 0); // Disable current binding + QQmlPropertyPrivate::removeBinding(action.property); // Disable current binding if (action.event && action.event->changesBindings()) { //### assume isReversable()? d->bindingsList << action; action.event->clearBindings(); @@ -192,7 +192,7 @@ void QQuickTransitionManager::transition(const QList<QQuickStateAction> &list, } if (action.toBinding) - QQmlPropertyPrivate::setBinding(action.property, 0); // Make sure this is disabled during the transition + QQmlPropertyPrivate::removeBinding(action.property); // Make sure this is disabled during the transition QQmlPropertyPrivate::write(action.property, action.fromValue, QQmlPropertyPrivate::BypassInterceptor | QQmlPropertyPrivate::DontRemoveBinding); } @@ -270,7 +270,7 @@ void QQuickTransitionManager::cancel() for(int i = 0; i < d->bindingsList.count(); ++i) { QQuickStateAction action = d->bindingsList[i]; if (!action.toBinding.isNull() && action.deletableToBinding) { - QQmlPropertyPrivate::setBinding(action.property, 0); + QQmlPropertyPrivate::removeBinding(action.property); action.toBinding.data()->destroy(); action.toBinding.clear(); action.deletableToBinding = false; |