aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper.cpp
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/qqmlvaluetypewrapper.cpp
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/qqmlvaluetypewrapper.cpp')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper.cpp b/src/qml/qml/qqmlvaluetypewrapper.cpp
index c2bbd7f498..20d418744d 100644
--- a/src/qml/qml/qqmlvaluetypewrapper.cpp
+++ b/src/qml/qml/qqmlvaluetypewrapper.cpp
@@ -637,7 +637,7 @@ bool QQmlValueTypeWrapper::virtualPut(Managed *m, PropertyKey id, const Value &v
} else {
if (Q_UNLIKELY(lcBindingRemoval().isInfoEnabled())) {
if (auto binding = QQmlPropertyPrivate::binding(referenceObject, QQmlPropertyIndex(referencePropertyIndex, pd.coreIndex()))) {
- Q_ASSERT(!binding->isValueTypeProxy());
+ Q_ASSERT(binding->kind() == QQmlAbstractBinding::Binding);
const auto qmlBinding = static_cast<const QQmlBinding*>(binding);
const auto stackFrame = v4->currentStackFrame;
qCInfo(lcBindingRemoval,