aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlabstractbinding_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-04-13 14:14:57 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-25 15:29:43 +0000
commit4c365e4d4d125c8c874c3ffcbeefbdcd6453ea28 (patch)
tree1d5594c5276f918d2f6f509312b871c1ba2344ce /src/qml/qml/qqmlabstractbinding_p.h
parent9f44485bb6e0f82907405a7262db1cdcce0543a9 (diff)
Remove some dead code
The DestroyMode was not used at all anymore. Change-Id: I04b7fa2282d8257af55062a20c647ea3229a27b5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlabstractbinding_p.h')
-rw-r--r--src/qml/qml/qqmlabstractbinding_p.h34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/qml/qml/qqmlabstractbinding_p.h b/src/qml/qml/qqmlabstractbinding_p.h
index b5d8181ca5..eb4431c6b1 100644
--- a/src/qml/qml/qqmlabstractbinding_p.h
+++ b/src/qml/qml/qqmlabstractbinding_p.h
@@ -57,24 +57,8 @@ class QQmlObjectCreator;
class Q_QML_PRIVATE_EXPORT QQmlAbstractBinding
{
public:
- enum DestroyMode {
-
- // The binding should disconnect itself upon destroy
- DisconnectBinding,
-
- // The binding doesn't need to disconnect itself, but it can if it wants to.
- //
- // This is used in QQmlData::destroyed() - at the point at which the bindings are
- // destroyed, the notifiers are already disconnected, so no need to disconnect each
- // binding again.
- //
- // Bindings can use this flag to speed up destruction, especially for v4 bindings
- // disconnecting a single binding might be slow.
- KeepBindingConnected
- };
-
struct VTable {
- void (*destroy)(QQmlAbstractBinding *, DestroyMode destroyMode);
+ void (*destroy)(QQmlAbstractBinding *);
QString (*expression)(const QQmlAbstractBinding *);
int (*propertyIndex)(const QQmlAbstractBinding *);
QObject *(*object)(const QQmlAbstractBinding *);
@@ -88,12 +72,8 @@ public:
enum BindingType { Binding = 0, ValueTypeProxy = 1 };
inline BindingType bindingType() const;
- // Destroy the binding. Use this instead of calling delete.
- // Bindings are free to implement their own memory management, so the delete operator is
- // not necessarily safe. The default implementation clears the binding, removes it from
- // the object and calls delete.
- void destroy(DestroyMode destroyMode = DisconnectBinding)
- { vtable()->destroy(this, destroyMode); }
+ void destroy()
+ { vtable()->destroy(this); }
QString expression() const { return vtable()->expression(this); }
@@ -120,7 +100,7 @@ public:
// Default implementation for some VTable functions
template<typename T>
- static void default_destroy(QQmlAbstractBinding *, DestroyMode);
+ static void default_destroy(QQmlAbstractBinding *);
static QString default_expression(const QQmlAbstractBinding *);
static void default_retargetBinding(QQmlAbstractBinding *, QObject *, int);
@@ -203,12 +183,8 @@ QQmlAbstractBinding::BindingType QQmlAbstractBinding::bindingType() const
}
template<typename T>
-void QQmlAbstractBinding::default_destroy(QQmlAbstractBinding *This, DestroyMode mode)
+void QQmlAbstractBinding::default_destroy(QQmlAbstractBinding *This)
{
- // Assume the binding disconnects itself in the destructor, which for example QQmlBinding
- // does in the destructor of its base class, QQmlJavaScriptExpression
- Q_UNUSED(mode);
-
This->removeFromObject();
This->clear();
delete static_cast<T *>(This);