aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlbinding_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-04-25 10:20:22 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-04-25 19:39:48 +0200
commit762938aa5d7546fb097ca3799d97e3b826c7c0c8 (patch)
treef7495997067dbf126f6e8743dfe55d90f7373af6 /src/qml/qml/qqmlbinding_p.h
parent759090f59140d0b38c7bd57480ea6cd93d4cf0d3 (diff)
Generalize QQmlAbstractBinding::isValueTypeProxy()
Instead of a bool we can just return an enum of the actual kind. This way all the checks become more readable. Furthermore, we can eliminate a dynamic_cast without sacrificing readability. Change-Id: I8a38687f9b796cd47196a6ab0385624c737e4435 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlbinding_p.h')
-rw-r--r--src/qml/qml/qqmlbinding_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h
index b9b7cdeab3..f686a1745b 100644
--- a/src/qml/qml/qqmlbinding_p.h
+++ b/src/qml/qml/qqmlbinding_p.h
@@ -95,6 +95,8 @@ public:
const QV4::CompiledData::Binding *binding, QObject *obj,
const QQmlRefPointer<QQmlContextData> &ctxt);
+ Kind kind() const final { return QQmlAbstractBinding::Binding; }
+
~QQmlBinding() override;
bool mustCaptureBindableProperty() const final {return true;}