diff options
author | Brett Stottlemyer <bstottle@ford.com> | 2017-05-15 23:01:01 -0400 |
---|---|---|
committer | Brett Stottlemyer <bstottle@ford.com> | 2017-05-16 13:27:39 +0000 |
commit | eb1854b58d802a46405f68cef61a5b4450d01f4b (patch) | |
tree | 088d24bbcc33eb02b828088c9d50e91f711cd039 /src/remoteobjects/qremoteobjectregistry.h | |
parent | e8885167458935b760eca751c5cc70509bad5292 (diff) |
Provide static method for registering metatypes
This provides an entry point (before a type is instantiated) to register
the needed types (for instance, enums used by a type). It also makes it
easier to guard against attempting to register a replica's types multiple
times.
Change-Id: Ic01c70586eab618afeb90c98df042b1ae7a9eed9
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src/remoteobjects/qremoteobjectregistry.h')
-rw-r--r-- | src/remoteobjects/qremoteobjectregistry.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/remoteobjects/qremoteobjectregistry.h b/src/remoteobjects/qremoteobjectregistry.h index 8fb6dac..cac2542 100644 --- a/src/remoteobjects/qremoteobjectregistry.h +++ b/src/remoteobjects/qremoteobjectregistry.h @@ -51,10 +51,9 @@ class Q_REMOTEOBJECTS_EXPORT QRemoteObjectRegistry : public QRemoteObjectReplica Q_PROPERTY(QRemoteObjectSourceLocations sourceLocations READ sourceLocations) - friend class QRemoteObjectNode; - public: ~QRemoteObjectRegistry(); + static void registerMetatypes(); QRemoteObjectSourceLocations sourceLocations() const; @@ -72,7 +71,7 @@ private: explicit QRemoteObjectRegistry(); explicit QRemoteObjectRegistry(QRemoteObjectNode *node, const QString &name); QRemoteObjectSourceLocations hostedSources; - friend class QRemoteObjectNodePrivate; + friend class QT_PREPEND_NAMESPACE(QRemoteObjectNode); }; QT_END_NAMESPACE |