aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvaluetypewrapper_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-01-10 10:03:19 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-01-25 20:44:16 +0100
commit43114c97559a0b0dfb101f87d43cf52782bd6f63 (patch)
tree99882423e4ef3853f42192ac33e8bd12a9aa59e2 /src/qml/qml/qqmlvaluetypewrapper_p.h
parent0d8b27004812bca339df44372941a8415945d256 (diff)
QML: Fix interceptors on value types ignoring fast changes
If a property is changed and reverted in short order, any animation attached to it may not get a chance to take effect in between. In such a case it looks like we don't have to update the interceptor when reverting, but we actually have to. The animation needs to be canceled, after all. We now have to fix the case of writing different properties of a value type sequentially, where one has an animation attached to it, though. If that happens, we cannot drop the animation when a _different_ property is written later on, but we do still have to update the whole value type. So, pass an additional argument in the relevant metacalls that declares the property we intended to change. Pick-to: 6.5 Fixes: QTBUG-54860 Change-Id: I3b6cad2d4707d30312cda98283928fd419c40345 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml/qqmlvaluetypewrapper_p.h')
-rw-r--r--src/qml/qml/qqmlvaluetypewrapper_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvaluetypewrapper_p.h b/src/qml/qml/qqmlvaluetypewrapper_p.h
index cb8bfdf106..0c4cbb7dd3 100644
--- a/src/qml/qml/qqmlvaluetypewrapper_p.h
+++ b/src/qml/qml/qqmlvaluetypewrapper_p.h
@@ -73,7 +73,7 @@ DECLARE_HEAP_OBJECT(QQmlValueTypeWrapper, ReferenceObject) {
bool setVariant(const QVariant &variant);
bool readReference();
- bool writeBack();
+ bool writeBack(int propertyIndex = QV4::ReferenceObject::AllProperties);
private:
void setMetaObject(const QMetaObject *metaObject) { m_metaObject = metaObject; }