Go to file
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
bin CMake: Provide script to configure and build one or more tests 2020-03-23 09:54:48 +01:00
cmake CMake: Adjust PCH support for multi-arch iOS builds 2020-04-03 21:51:06 +02:00
coin Coin: Fix incorrect target OS values used in instructions 2020-04-02 09:39:27 +02:00
config.tests CMake: Port the 'separate_debug_info' feature 2020-03-06 13:38:37 +01:00
dist Add 5.14.0 changelog entry about MinGW 2020-02-18 18:34:50 +01:00
doc Merge remote-tracking branch 'origin/5.15' into dev 2020-03-04 14:39:18 +00:00
examples QRegularExpression: rename AnchoredMatchOption to AnchorAtOffsetMatchOption 2020-04-03 21:49:57 +02:00
lib
mkspecs qmake: Silence GL deprecations on macOS 2020-03-27 09:00:11 +00:00
qmake Re-generate various CMake projects and configure after merge 2020-03-16 20:43:56 +01:00
src QProperty: Add support for member function change handlers 2020-04-06 14:25:12 +02:00
tests QProperty: Add support for member function change handlers 2020-04-06 14:25:12 +02:00
util CMake: Reformat python scripts 2020-04-06 11:00:53 +02:00
.gitattributes
.gitignore QtNetwork: Delete bearer management 2020-04-05 16:41:08 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt CMake: Fix pkgconfig calls when cross-compiling 2020-03-26 12:46:16 +01:00
config_help.txt Merge remote-tracking branch 'origin/5.15' into dev 2020-02-26 18:39:21 +01:00
configure Add convenience forwards/translations to cmake configure wrapper 2020-04-01 22:57:18 +02:00
configure.bat Don't compile qmake in c++11 mode 2020-02-03 17:43:30 +01:00
configure.cmake CMake: configurejson2cmake: Port precompile_header feature 2020-04-06 11:00:53 +02:00
configure.json CMake: Port the 'separate_debug_info' feature 2020-03-06 13:38:37 +01:00
configure.pri Android: Increase minimum API level to Android-23 / Android 6 2020-03-04 08:28:04 +01:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
header.BSD Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.FDL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.GPL-EXCEPT Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL3-COMM Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-NOGPL2 Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.LGPL-ONLY Use placeholder for year in header.* files 2018-04-16 11:02:22 +00:00
header.MIT qsimd: add support for new x86 CPU features 2018-05-05 06:20:07 +00:00
INSTALL INSTALL: Remove outdated reference to Windows CE 2019-02-13 13:01:57 +00:00
LICENSE.FDL
LICENSE.GPL2 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.GPL3-EXCEPT Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPL3 Add new license header templates and license files 2016-01-14 20:43:46 +00:00
LICENSE.LGPLv3 Remove LICENSE.GPLv3, LICENSE.LGPLv21, LGPL_EXCEPTION.txt 2018-04-16 11:02:14 +00:00
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro nuke configure -host-option 2016-12-13 18:55:59 +00:00
sync.profile Move QOpenGLWidget from QtOpenGL to its own module 2020-02-18 09:22:51 +01:00