[Development] API Change in QtRemoteObjects
charleyb123 .
charleyb123 at gmail.com
Sat Jan 2 19:14:58 CET 2016
Hi, Brett--
IMHO, this is a very good change. The library will be easier to use, and
more accessible from QML.
Also, now is probably the time to make such an API change.
I'm watching this effort with great interest -- thanks for all your hard
work.
--charley
On Sat, Jan 2, 2016 at 10:51 AM, Stottlemyer, Brett (B.S.) <
bstottle at ford.com> wrote:
> Hello,
>
> For those of you using the QtRemoteObjects playground module (QtRO for
> short), some changes went in over the holidays that changed the public
> API. So you will need to update your code when you update to any version
> of master past 16959709b59db45c07385ecc13b76061de851edf (or see the
> (merged) review: https://codereview.qt-project.org/#/c/144624/).
>
> From the commit message:
> > Convert Nodes to QObject based class(es)
> >
> > This change affects lots of lines of code, but is
> > basically a refactoring, not changing much. It
> > does change the QtRO API, though.
> >
> > In the interest of making it easier to expose QtRO
> > types to QML, the move to QObject types for Nodes was
> > necessary.
> >
> > The static generators allowed for different "types²
> > of Nodes to be created with different combinations of
> > 1 or 2 QUrl parameters, but this also forced a Node
> > type that had methods that might not make sense (for
> > instance, enableRemoting() from a Node that wasn't a
> > Host Node). And Nodes needed to be copy-able.
> >
> > This change addresses those issues by creating
> > three distinct types. QRemoteObjectNode is
> > the most basic type, and only supports acquiring
> > Replica objects. QRemoteObjectHost Nodes add the
> > ability to share Source objects on the network. Both
> > Node and Host types support connecting to a Registry.
> >
> > QRemoteObjectRegistryHost Nodes host a Registry object
> > other nodes can connect to.
> >
> > This change requires converting end-user code from
> > the static functions (createHostNode, etc) to using
> > the new types explicitly.
> >
> > Aside from the obvious change from static generator
> > functions, there are two other impacts to user code:
> > 1) connect() was renamed to connectToNode to not
> > conflict with QObject's connect()
> > 2) default QUrls for Hosting and Registry were removed
> > (it was too easy to create name clashes with unexpected
> > results).
>
> Apologies for any inconvenience, but this will make QML integration
> simpler, and makes the APIs more aligned with other Qt APIs.
>
> Happy Holidays/Happy New Year!
> Brett
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160102/51031a38/attachment.html>
More information about the Development
mailing list