aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-05-02 09:45:29 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-05-02 17:16:07 +0200
commitf961f5e221420ea0b7d32d77167c7ef8e9b9b81a (patch)
tree0d071f234dad077f61b798e551d4702a2db10f06 /src/qml/qml/qqmlvmemetaobject.cpp
parentf6fb9252c6af824ee4544b34a039c20872c5b4ed (diff)
Use new rvalue overload of QMetaProperty::writeOnGadget()
The new overload avoids the unconditional deep copy inside QMetaProperty::write()'s lvalue overload. Task-number: QTBUG-112762 Change-Id: Ic224faf72288e73bb6ad9049f1e0dc585e04ca19 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index b8383b8679..c625d2fa20 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -340,7 +340,7 @@ bool QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call c, int id, void **
// change the value soon. Such an animation needs to be canceled if the
// current value is explicitly set.
// So, we cannot return here if prevComponentValue == newComponentValue.
- valueType->writeOnGadget(valueProp, prevComponentValue);
+ valueType->writeOnGadget(valueProp, std::move(prevComponentValue));
valueType->write(object, id, QQmlPropertyData::DontRemoveBinding | QQmlPropertyData::BypassInterceptor);
vi->write(newComponentValue);