diff options
Diffstat (limited to 'src/qml/debugger/qqmlenginedebugservice.cpp')
-rw-r--r-- | src/qml/debugger/qqmlenginedebugservice.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qml/debugger/qqmlenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp index 7067a78437..a7ef450606 100644 --- a/src/qml/debugger/qqmlenginedebugservice.cpp +++ b/src/qml/debugger/qqmlenginedebugservice.cpp @@ -646,9 +646,7 @@ bool QQmlEngineDebugService::setBinding(int objectId, } else if (property.isProperty()) { QQmlBinding *binding = new QQmlBinding(expression.toString(), object, QQmlContextData::get(context), filename, line, column); binding->setTarget(property); - QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::setBinding(property, binding); - if (oldBinding) - oldBinding->destroy(); + QQmlPropertyPrivate::setBinding(binding); binding->update(); } else { ok = false; @@ -679,12 +677,7 @@ bool QQmlEngineDebugService::resetBinding(int objectId, const QString &propertyN if (object->property(parentProperty.toLatin1()).isValid()) { QQmlProperty property(object, propertyName); - QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::binding(property); - if (oldBinding) { - QQmlAbstractBinding *oldBinding = QQmlPropertyPrivate::removeBinding(property); - if (oldBinding) - oldBinding->destroy(); - } + QQmlPropertyPrivate::removeBinding(property, QQmlPropertyPrivate::DestroyOldBinding); if (property.isResettable()) { // Note: this will reset the property in any case, without regard to states // Right now almost no QQuickItem has reset methods for its properties (with the |