aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypeproxybinding.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-14 12:46:36 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-26 06:38:15 +0000
commit8e85b54f0598834d67d1931af371bb9ab1664738 (patch)
tree42b03f2ad3b3462ee0def1a9e8b11c262b52eaec /src/qml/qml/qqmlvaluetypeproxybinding.cpp
parentc3009d2e32fc75c1443a9697d3e8fe62d95d6562 (diff)
Smaller cleanup
Change-Id: If6b041a18b4f13ead13f560b62dd5f4495088f2c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypeproxybinding.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypeproxybinding.cpp30
1 files changed, 4 insertions, 26 deletions
diff --git a/src/qml/qml/qqmlvaluetypeproxybinding.cpp b/src/qml/qml/qqmlvaluetypeproxybinding.cpp
index b063868fff..dbc3cec2e9 100644
--- a/src/qml/qml/qqmlvaluetypeproxybinding.cpp
+++ b/src/qml/qml/qqmlvaluetypeproxybinding.cpp
@@ -55,35 +55,13 @@ QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding()
void QQmlValueTypeProxyBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags)
{
- if (e) {
- recursiveEnable(m_bindings, flags);
- } else {
- recursiveDisable(m_bindings);
+ QQmlAbstractBinding *b = m_bindings;
+ while (b) {
+ b->setEnabled(e, flags);
+ b = b->nextBinding();
}
}
-void QQmlValueTypeProxyBinding::recursiveEnable(QQmlAbstractBinding *b, QQmlPropertyPrivate::WriteFlags flags)
-{
- if (!b)
- return;
-
- recursiveEnable(b->nextBinding(), flags);
-
- if (b)
- b->setEnabled(true, flags);
-}
-
-void QQmlValueTypeProxyBinding::recursiveDisable(QQmlAbstractBinding *b)
-{
- if (!b)
- return;
-
- recursiveDisable(b->nextBinding());
-
- if (b)
- b->setEnabled(false, 0);
-}
-
QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(int propertyIndex)
{
QQmlAbstractBinding *binding = m_bindings;