[Development] Optional Dependencies and Distribution of Examples

Milian Wolff milian.wolff at kdab.com
Tue Oct 14 13:29:26 CEST 2014

On Tuesday 14 October 2014 06:22:51 Knoll Lars wrote:
> Hi Milian,
> On 13/10/14 12:41, "Milian Wolff" <milian.wolff at kdab.com> wrote:
> >Hey all,
> >
> >I have a question regarding the handling of optional dependencies, and
> >how 
> >that influences the distribution of Qt code, esp. the creation of
> >tarballs and 
> >binaries.
> >
> >Qt WebChannel uses Qt WebSockets for its examples, and that optionally
> >and 
> >only there. The rest of the code works fine without websockets, to ensure
> >that 
> >e.g. Qt WebKit or Qt WebEngine don't drag in Qt WebSockets as a
> >dependency via 
> >the WebChannel.
> >
> >So far so good. But when qt5.git builds WebChannel without WebSockets
> >available, the examples wont be build. What implications does this have?
> >
> >a) No CI coverage of whether the examples build on all platforms?
> >b) What about packaging? Will the examples still be included in the Qt
> >source 
> >tarballs? Will binary builds of Qt include the examples?
> >c) more...?
> >
> >What should we do about this situation?
> We’ve had the problem in some other areas as well. We can of course make
> Qt WebSockets a dependency for the web channel. We’re having a similar
> solution with qtdeclarative that has an optional dependency onto
> xmlpatterns. For testing we enforce the dependency though.
> For now this should work, but it raises a more general issue, as examples
> should show how to use Qt in the best possible way. In that respect it’s
> often unfortunate if e.g. Examples showing features in qtbase can’t use
> QML for the UI.

Thanks for the confirmation, also to Kai. I'll leave it as-is for now then.

> A possible solution that we had discussed in Oslo was to create a
> dedicated example repository that contains a set of high quality examples
> that we also want to show in Creator. If this repo is built at the end, we
> could make use of all of Qt’s functionality in there.

That sounds like an excellent idea to me!

Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

More information about the Development mailing list