diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-14 12:46:36 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-26 06:38:15 +0000 |
commit | 8e85b54f0598834d67d1931af371bb9ab1664738 (patch) | |
tree | 42b03f2ad3b3462ee0def1a9e8b11c262b52eaec | |
parent | c3009d2e32fc75c1443a9697d3e8fe62d95d6562 (diff) |
Smaller cleanup
Change-Id: If6b041a18b4f13ead13f560b62dd5f4495088f2c
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding.cpp | 30 | ||||
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding_p.h | 3 |
2 files changed, 4 insertions, 29 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; diff --git a/src/qml/qml/qqmlvaluetypeproxybinding_p.h b/src/qml/qml/qqmlvaluetypeproxybinding_p.h index 5f5194d8cc..0ac9c62836 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding_p.h +++ b/src/qml/qml/qqmlvaluetypeproxybinding_p.h @@ -65,9 +65,6 @@ protected: ~QQmlValueTypeProxyBinding(); private: - static void recursiveEnable(QQmlAbstractBinding *, QQmlPropertyPrivate::WriteFlags); - static void recursiveDisable(QQmlAbstractBinding *); - friend class QQmlAbstractBinding; QObject *m_object; int m_index; |