Go to file
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
bin CMake: Use custom install script to support Ninja Multi-Config builds 2020-05-19 10:16:11 +02:00
cmake CMake Build: Rename cmake_command to cmake_language 2020-05-28 20:47:18 +02:00
coin CMake: Use the same generator when building other repositories 2020-05-19 10:16:16 +02:00
config.tests CMake: Skip regeneration of manual compile test project 2020-04-09 11:26:46 +02:00
dist Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
doc Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
examples Fix hellowindow example 2020-05-25 17:37:57 +02:00
lib
mkspecs Override debug generation request on mac for toolchain.prf 2020-05-28 18:40:57 +00:00
qmake Remove last remainings of Qt Quick 1 imports 2020-05-25 11:48:12 +02:00
src Implement support for QProperty<T> with a static observer 2020-05-28 21:08:51 +00:00
tests Implement support for QProperty<T> with a static observer 2020-05-28 21:08:51 +00:00
util Move QtPlatformCompositorSupport into QtOpenGL 2020-05-28 21:39:48 +02:00
.cmake.conf pro2cmake.py: Generate .cmake.conf files for versioning 2020-04-30 17:44:03 +00:00
.gitattributes
.gitignore Remove ANGLE 2020-05-26 15:11:40 +02:00
.qmake.conf Bump version 2020-02-02 13:41:14 +01:00
.tag
CMakeLists.txt pro2cmake.py: Generate .cmake.conf files for versioning 2020-04-30 17:44:03 +00:00
config_help.txt Remove ANGLE 2020-05-26 15:11:40 +02:00
configure Compile QRegularExpression into qmake 2020-05-05 18:41:20 +02:00
configure.bat Don't compile qmake in c++11 mode 2020-02-03 17:43:30 +01:00
configure.cmake CMake: Generate information about 3rdparty libs in module .pri files 2020-05-19 13:26:53 +02:00
configure.json Fix compilation of PCRE2 under Intel CET 2020-05-27 22:29:55 +02: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 so repos outside qt5 can be built with Coin 2019-09-19 17:07:36 +00: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
LICENSE.GPL3
LICENSE.GPL3-EXCEPT
LICENSE.LGPL3
LICENSE.LGPLv3
LICENSE.QT-LICENSE-AGREEMENT Update enterprise license agreement v4.2.1 2019-12-18 13:07:19 +02:00
qtbase.pro
sync.profile Move QtPlatformCompositorSupport into QtOpenGL 2020-05-28 21:39:48 +02:00