qt5base-lts/tests/auto
Simon Hausmann 549712830b QProperty: Add support for member function change handlers
When a class has multiple QProperty members to implement functionality,
it is common to have functions in the class that react to changes. For
example to emit a compatibility signal, in case of Qt Quick to mark the
scene graph as dirty, etc. etc.

To faciliate this use-case, this patch adds an internal
QPropertyMemberChangeHandler template that allows connecting a QProperty
field to a member function callback.

At the moment that callback is still 3 * sizeof(pointer). This could in
theory be reduced to 2 by eliminating the back-pointer (prev) as the
observer lives as long as the property. That however belongs into maybe
a future patch.

In order to get a pointer back to the surrounding object that holds the
QProperty as well as provides the callback function, the property system
was changed to pass through the address of the QProperty member at
run-time, and at compile time the delta from the QProperty member to the
beginning of the surrounding class is calculated. Through subtraction we
obtain the pointer to the owning object.

Change-Id: Ia2976357053f474ff44d0d6f60527c3b8e1f613a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-06 14:25:12 +02:00
..
cmake Remove qt6_use_modules 2020-03-25 08:39:43 +01:00
concurrent CMake: Regenerate projects after .pro files were modified 2020-04-03 16:05:29 +02:00
corelib QProperty: Add support for member function change handlers 2020-04-06 14:25:12 +02:00
dbus New QMetaType representation 2020-02-20 16:11:02 +01:00
gui Remove QRegExp based API and QRegExp usage from QTextDocument 2020-04-01 10:29:26 +02:00
guiapplauncher
installed_cmake
network QtNetwork: Delete bearer management 2020-04-05 16:41:08 +02:00
opengl Merge remote-tracking branch 'origin/5.15' into dev 2020-03-11 15:34:21 +01:00
other QtNetwork: Delete bearer management 2020-04-05 16:41:08 +02:00
printsupport Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql QSqlError: Remove deprecated methods 2020-04-06 14:25:12 +02:00
testlib Restructure testlib selftest project 2020-03-24 21:04:43 +01:00
tools Port test to QRegularExpression 2020-03-31 15:28:23 +02:00
widgets Fix irrelevant error case in QSplitter test 2020-04-02 08:09:31 +02:00
xml Merge remote-tracking branch 'origin/5.15' into dev 2020-03-16 18:41:27 +01:00
auto.pro Disable tests with qemu-arm & developer-build configurations in the CI 2019-10-03 15:12:33 +00:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00