Commit 35dd0809 authored by Brett Stottlemyer's avatar Brett Stottlemyer
Browse files

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: default avatarMichael Brasser <michael.brasser@live.com>
parent 6e5e4df3
Showing with 211 additions and 250 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment