diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-06-29 16:17:52 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2022-08-03 09:49:15 +0200 |
commit | 85d258cc0d392a445a618538930e352ad9ec699d (patch) | |
tree | f19659d29482a1a283b24986cae4eeae7b43030d /src/qml/qml/qqmlbinding_p.h | |
parent | ebe419ff3794ecc3442550f789dd984424f9e524 (diff) |
Purge QQmlBindingBinding
This patch removes QQmlBindingBinding, as well as QQmlNonBindingBinding
as a standalone class. The functionality of QQmlNonBindingBinding is
merged into QQmlBinding.
QQmlBindingBinding was used to store a QML binding in a property;
the only user of it was Binding's when property, and that was removed in
Qt 5.14 already.
The big disadvantage of its approach was that it has zero type safety,
and interacts in weird ways with bindings created via Qt.binding; it
also does not integrate well with QProperty/C++ based bindings.
Lastly, it is completely untested.
As QQmlBinding is a private class, we can safely remove the whole
functionality, as there is no Qt internal user of it anymore.
Use cases which require the manipulation of the binding should instead
use a well-typed property, and then access the binding via the
QQmlAnyBinding or QQmlAbstractBinding API (compare Binding's when
property in Qt 6.2+).
Change-Id: I6de0c9987d371a04c7f78047bb34bf684b6a69f5
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding_p.h')
-rw-r--r-- | src/qml/qml/qqmlbinding_p.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index 4c8c0f4e61..6d4c7f22cf 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -99,7 +99,10 @@ public: protected: virtual void doUpdate(const DeleteWatcher &watcher, - QQmlPropertyData::WriteFlags flags, QV4::Scope &scope) = 0; + QQmlPropertyData::WriteFlags flags, QV4::Scope &scope); + + virtual bool write(const QV4::Value &result, bool isUndefined, QQmlPropertyData::WriteFlags flags) = 0; + virtual bool write(void *result, QMetaType type, bool isUndefined, QQmlPropertyData::WriteFlags flags) = 0; int getPropertyType() const; |