diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2020-04-09 16:04:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2020-04-30 19:39:19 +0200 |
commit | b480acb3720c0d61c5c69a2b861af63b9d7c9f86 (patch) | |
tree | 207d0110dd57a764ad710483bee78c0daa50fcb8 /LICENSE.LGPL3 | |
parent | 382577419a80a8aebaa7ac95682cdec46a487ace (diff) |
Allow for private properties to be implemented using QProperty
Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is
implemented as QProperty and then allows installing bindings, etc. -
this works by scanning the same class' members.
For our own use of QProperty, we need to place the QProperty member
itself into the d-pointer to be able to maintain the ability to add new
properties without breaking binary compatibility. That however means
that moc can't know that a certain property is backed by QProperty - we
don't scan the members of the private class.
As a workaround, this change enables the syntax where the property type
used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>.
In addition this patch fixes the compilation of such declared properties
by ensuring the accessor prefix (t->$accessor) is applied also for the
QProperty related meta call variants.
Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'LICENSE.LGPL3')
0 files changed, 0 insertions, 0 deletions