qt5base-lts/tests/auto/corelib
Simon Hausmann 36f6922925 Implement support for QProperty<T> with a static observer
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>
2020-05-28 21:08:51 +00:00
..
animation Merge remote-tracking branch 'origin/5.15' into dev 2020-03-16 18:41:27 +01:00
codecs Streamline the code in the conversion to and from utf8 2020-05-14 07:51:45 +02:00
global Get rid of QTextCodec in QTextStream 2020-05-14 07:50:19 +02:00
io Remove deprecated QProcess methods 2020-05-27 11:55:06 +02:00
itemmodels Add a property to QSFPM to show children of accepted items 2020-05-26 15:11:40 +02:00
kernel Implement support for QProperty<T> with a static observer 2020-05-28 21:08:51 +00:00
mimetypes QtConcurrent::run: accept more then five function's arguments 2020-03-11 14:46:25 +01:00
plugin Change qHash() to work with size_t instead of uint 2020-04-09 20:03:25 +02:00
serialization Remove deprecated QProcess methods 2020-05-27 11:55:06 +02:00
statemachine Merge remote-tracking branch 'origin/5.15' into dev 2020-02-13 18:31:40 +01:00
text Rework QLocale and QDateTime tests that expect CET abbreviation 2020-05-28 15:15:17 +02:00
thread Don't queue events in QFutureWatcher when pause is requested 2020-05-27 11:53:28 +02:00
time Rework QLocale and QDateTime tests that expect CET abbreviation 2020-05-28 15:15:17 +02:00
tools QTaggedPointer: verify constexpr'ness of some ctors 2020-05-16 08:55:28 +02:00
.prev_CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
corelib.pro Move text-related code out of corelib/tools/ to corelib/text/ 2019-07-10 17:05:30 +02:00