Rework REPC QObject* handling
The MODEL and CLASS types were originally tacked on top of repc's property
handling mechanism. That is, separate lists for models and subclasses were
created instead of including the types in repc's list of property metadata.
This was convenient for proving out the functionality, but led to a bunch
of one-off code (generating Q_PROPERTY code manually, needing separate
replica getter functions, etc).
This change incorporates the pointer types back into the property list in
repc, simplifying the code. This does require extensions because pointer
types are not symmetric (i.e., for MODEL, the type is QAbstractItemModel*
on the source side, QAbstractItemModelReplica* on the replica side).
The generated SourceApi code is enhanced to compile-time check subclass
types as well as take an optional name parameter (which allows a class to
have multiple subclass pointers).
SimpleSource handling of CONSTANT properties is also extended, providing
constructor parameters to set the initial values.
Change-Id: I91f542ef936abe4459962ae759ba3b0571464d5f
Reviewed-by:
Michael Brasser <michael.brasser@live.com>
Showing
Please register or sign in to comment