[Development] Optional Dependencies and Distribution of Examples
Lars.Knoll at theqtcompany.com
Tue Oct 14 08:22:51 CEST 2014
On 13/10/14 12:41, "Milian Wolff" <milian.wolff at kdab.com> wrote:
>I have a question regarding the handling of optional dependencies, and
>that influences the distribution of Qt code, esp. the creation of
>Qt WebChannel uses Qt WebSockets for its examples, and that optionally
>only there. The rest of the code works fine without websockets, to ensure
>e.g. Qt WebKit or Qt WebEngine don't drag in Qt WebSockets as a
>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
>tarballs? Will binary builds of Qt include the examples?
>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.
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.
More information about the Development