From 81867dfbf9c16d4300727a08eed9b5c6c979e0ba Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Wed, 6 Apr 2016 15:16:35 +0200 Subject: QML: Introduce write accessors to QQmlAccessors Same idea as the read accessors, but with a slight difference: the property setters do emit signals, so we can't do a direct property write and have to call the setter. However, it does circumvent the meta-calls. There is one gotcha: if a property is intercepted (e.g. by a Behavior), we still have to do the meta-call in order to dispatch the write to the interceptor. According to valgrind, this saves 138 instructions on x86 for every "accessible" property write. Change-Id: I07dbac95613415559ffa1691734a5af7c84721fc Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlbinding_p.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/qml/qml/qqmlbinding_p.h') diff --git a/src/qml/qml/qqmlbinding_p.h b/src/qml/qml/qqmlbinding_p.h index ad1b24f340..a7c90603f6 100644 --- a/src/qml/qml/qqmlbinding_p.h +++ b/src/qml/qml/qqmlbinding_p.h @@ -110,9 +110,7 @@ protected: int getPropertyCoreIndex() const; int getPropertyType() const; - bool write(const QV4::Value &result, bool isUndefined, QQmlPropertyPrivate::WriteFlags flags); - - bool slowWrite(const QV4::Value &result, bool isUndefined, + bool slowWrite(const QQmlPropertyData &core, const QV4::Value &result, bool isUndefined, QQmlPropertyPrivate::WriteFlags flags); private: -- cgit v1.2.3