summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/qremoteobjectnode_p.h
diff options
context:
space:
mode:
authorBrett Stottlemyer <bstottle@ford.com>2017-12-06 11:21:49 -0600
committerTony Sarajärvi <tony.sarajarvi@qt.io>2017-12-13 08:33:46 +0000
commit833885e3f342ead957128413fd451cb1eb71a65b (patch)
tree3e92ad0cc9cc4c3ba78c214f299ee1b57081129f /src/remoteobjects/qremoteobjectnode_p.h
parent9ae28ac68af20b4d8b305fa78a478833cc833642 (diff)
Add/extend Class/Model keywords for repc
The Class and Model extensions to QML are very similar in that they come down to additional QObject derived types that need to be made available to the QtRO bus. The original Model behavior only supported c++ templated calls on the source and replica side. This change adds support for nested classes, via an extension to the .rep file format. Similar to how POD types work, if multiple classes are described in a .rep file, a class can include other classes as children. When the `parent` is acquired, all child classes will be acquired as well, automatically. The syntax is `CLASS <name>(<type>), where type needs to be a class defined in the same rep file, and the name is the getter name used to access the sub-QObject. See tests/auto/subclassreplica/class.rep for an example of usage. This change includes supporting the non-templated enableRemoting() call, as well as using/constructing replica types from QML for both Class and Model. Future TODO - update docs Change-Id: Ib1e75c1a6db44497f78026e7f89caab5da94375b Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectnode_p.h')
-rw-r--r--src/remoteobjects/qremoteobjectnode_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/remoteobjects/qremoteobjectnode_p.h b/src/remoteobjects/qremoteobjectnode_p.h
index 4926a68..839dbb3 100644
--- a/src/remoteobjects/qremoteobjectnode_p.h
+++ b/src/remoteobjects/qremoteobjectnode_p.h
@@ -72,6 +72,7 @@ QT_BEGIN_NAMESPACE
class QRemoteObjectRegistry;
class QRegistrySource;
+class QConnectedReplicaImplementation;
class QRemoteObjectAbstractPersistedStorePrivate : public QObjectPrivate
{
@@ -108,6 +109,8 @@ public:
void onShouldReconnect(ClientIoDevice *ioDevice);
virtual QReplicaImplementationInterface *handleNewAcquire(const QMetaObject *meta, QRemoteObjectReplica *instance, const QString &name);
+ void handleReplicaConnection(const QString &name);
+ void handleReplicaConnection(const QByteArray &sourceSignature, QConnectedReplicaImplementation *rep, ClientIoDevice *connection);
void initialize();
private:
bool checkSignatures(const QByteArray &a, const QByteArray &b);