36f6922925
A common pattern in Qt Quick will be QProperty members that are connected to a callback that needs to perform something when the value changes, for example emitting a compatibility signal or marking scene graph node data dirty. To make such a pattern more efficient, a new QNotifiedProperty type is introduced that offers the same API as QProperty<T>, with two changes: (1) The template instantiation not only takes the property type as parameter but also a callback pointer-to-member. (2) Since that member itself cannot be called without an instance and to avoid storing an instance pointer permanently, the API for setBinding and setValue are adjusted to also take the instance pointer. For the former it gets stored in the binding, for the latter it is used to invoke the callback after setting the new value. Change-Id: I85cc1d1d1c0472164c4ae87808cfdc0d0b1475e1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> |
||
---|---|---|
.. | ||
animation | ||
codecs | ||
global | ||
io | ||
itemmodels | ||
kernel | ||
mimetypes | ||
plugin | ||
serialization | ||
statemachine | ||
text | ||
thread | ||
time | ||
tools | ||
.prev_CMakeLists.txt | ||
CMakeLists.txt | ||
corelib.pro |