diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-04-14 09:09:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-04-26 05:10:52 +0000 |
commit | c3009d2e32fc75c1443a9697d3e8fe62d95d6562 (patch) | |
tree | c1d0769aaf7ab3ac1dea468b8b81e710c59abea8 /src/qml/qml/qqmlvaluetypeproxybinding.cpp | |
parent | 2540a60e39bafaac3a0c373f52270003d4308bf5 (diff) |
Remove the manual vtable from QQmlAbstractBinding
it's rather hard to maintain, and not really worth it. I believe
we can more easily save the one pointer in other places with
easier to maintain code.
Change-Id: Iaba2d62b82ebe58947fa35b0812b4c70f318007a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypeproxybinding.cpp')
-rw-r--r-- | src/qml/qml/qqmlvaluetypeproxybinding.cpp | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/qml/qml/qqmlvaluetypeproxybinding.cpp b/src/qml/qml/qqmlvaluetypeproxybinding.cpp index cfc9b196d2..b063868fff 100644 --- a/src/qml/qml/qqmlvaluetypeproxybinding.cpp +++ b/src/qml/qml/qqmlvaluetypeproxybinding.cpp @@ -35,17 +35,6 @@ QT_BEGIN_NAMESPACE -// Used in qqmlabstractbinding.cpp -QQmlAbstractBinding::VTable QQmlValueTypeProxyBinding_vtable = { - QQmlAbstractBinding::default_destroy<QQmlValueTypeProxyBinding>, - QQmlAbstractBinding::default_expression, - QQmlValueTypeProxyBinding::propertyIndex, - QQmlValueTypeProxyBinding::object, - QQmlValueTypeProxyBinding::setEnabled, - QQmlValueTypeProxyBinding::update, - QQmlAbstractBinding::default_retargetBinding -}; - QQmlValueTypeProxyBinding::QQmlValueTypeProxyBinding(QObject *o, int index) : QQmlAbstractBinding(ValueTypeProxy), m_object(o), m_index(index), m_bindings(0) { @@ -64,17 +53,12 @@ QQmlValueTypeProxyBinding::~QQmlValueTypeProxyBinding() } } -void QQmlValueTypeProxyBinding::setEnabled(QQmlAbstractBinding *_This, - bool e, QQmlPropertyPrivate::WriteFlags flags) +void QQmlValueTypeProxyBinding::setEnabled(bool e, QQmlPropertyPrivate::WriteFlags flags) { - QQmlValueTypeProxyBinding *This = static_cast<QQmlValueTypeProxyBinding *>(_This); - if (e) { - QQmlAbstractBinding *bindings = This->m_bindings; - This->recursiveEnable(bindings, flags); + recursiveEnable(m_bindings, flags); } else { - QQmlAbstractBinding *bindings = This->m_bindings; - This->recursiveDisable(bindings); + recursiveDisable(m_bindings); } } @@ -100,10 +84,6 @@ void QQmlValueTypeProxyBinding::recursiveDisable(QQmlAbstractBinding *b) b->setEnabled(false, 0); } -void QQmlValueTypeProxyBinding::update(QQmlAbstractBinding *, QQmlPropertyPrivate::WriteFlags) -{ -} - QQmlAbstractBinding *QQmlValueTypeProxyBinding::binding(int propertyIndex) { QQmlAbstractBinding *binding = m_bindings; @@ -143,16 +123,6 @@ void QQmlValueTypeProxyBinding::removeBindings(quint32 mask) } } -int QQmlValueTypeProxyBinding::propertyIndex(const QQmlAbstractBinding *This) -{ - return static_cast<const QQmlValueTypeProxyBinding *>(This)->m_index; -} - -QObject *QQmlValueTypeProxyBinding::object(const QQmlAbstractBinding *This) -{ - return static_cast<const QQmlValueTypeProxyBinding *>(This)->m_object; -} - int QQmlValueTypeProxyBinding::propertyIndex() const { return m_index; |