diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2019-04-17 12:51:56 +0200 |
---|---|---|
committer | Aapo Keskimolo <aapo.keskimolo@qt.io> | 2019-05-01 13:55:14 +0000 |
commit | 8b69d52db792c3910be53321df44b5c57baa694c (patch) | |
tree | 33be8894a55a6a673b69f8b29edea8556e566100 | |
parent | 475910a75a5cd3332fe2f0e5740c4c3c2c0b8987 (diff) |
Make QtWayland.Compositor available under 1.QT_MINOR_VERSION
It was already available under 1.13, but this ensures it will stay
available for future minor versions of Qt and also use the latest minor
version in the examples.
Fixes: QTBUG-74042
Change-Id: I4a6a4f762ed0af565af32931971a1df7f33a3ba1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
9 files changed, 34 insertions, 24 deletions
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp index 426008a60..14b592efb 100644 --- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp @@ -90,15 +90,15 @@ QWaylandQuickCompositor::QWaylandQuickCompositor(QObject *parent) * For instance, the following code would allow the clients to request \c wl_shell * surfaces in the compositor using the \c wl_shell interface. * - * \code - * import QtWayland.Compositor 1.0 + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * WlShell { * // ... * } * } - * \endcode + * \endqml */ void QWaylandQuickCompositor::create() diff --git a/src/compositor/extensions/qwaylandiviapplication.cpp b/src/compositor/extensions/qwaylandiviapplication.cpp index 36690341f..a2e9842db 100644 --- a/src/compositor/extensions/qwaylandiviapplication.cpp +++ b/src/compositor/extensions/qwaylandiviapplication.cpp @@ -62,8 +62,9 @@ QT_BEGIN_NAMESPACE * To provide the functionality of the shell extension in a compositor, create * an instance of the IviApplication component and add it to the list of extensions * supported by the compositor: - * \code - * import QtWayland.Compositor 1.0 + * + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * IviApplication { @@ -74,7 +75,7 @@ QT_BEGIN_NAMESPACE * } * } * } - * \endcode + * \endqml */ /*! diff --git a/src/compositor/extensions/qwaylandwlscaler.cpp b/src/compositor/extensions/qwaylandwlscaler.cpp index e097ea3c5..5c8e4b270 100644 --- a/src/compositor/extensions/qwaylandwlscaler.cpp +++ b/src/compositor/extensions/qwaylandwlscaler.cpp @@ -61,14 +61,14 @@ QT_BEGIN_NAMESPACE To provide the functionality of the extension in a compositor, create an instance of the WlScaler component and add it to the list of extensions supported by the compositor: - \code - import QtWayland.Compositor 1.13 + \qml \QtMinorVersion + import QtWayland.Compositor 1.\1 WaylandCompositor { // ... WlScaler {} } - \endcode + \endqml \deprecated */ diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp index 3f6734632..9871a8a5a 100644 --- a/src/compositor/extensions/qwaylandwlshell.cpp +++ b/src/compositor/extensions/qwaylandwlshell.cpp @@ -267,15 +267,16 @@ void QWaylandWlShellSurfacePrivate::shell_surface_set_class(Resource *resource, * To provide the functionality of the shell extension in a compositor, create * an instance of the WlShell component and add it to the list of extensions * supported by the compositor: - * \code - * import QtWayland.Compositor 1.0 + * + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * WlShell { * // ... * } * } - * \endcode + * \endqml */ /*! diff --git a/src/compositor/extensions/qwaylandxdgdecorationv1.cpp b/src/compositor/extensions/qwaylandxdgdecorationv1.cpp index 89c56acd9..2d283ddf9 100644 --- a/src/compositor/extensions/qwaylandxdgdecorationv1.cpp +++ b/src/compositor/extensions/qwaylandxdgdecorationv1.cpp @@ -59,8 +59,8 @@ QT_BEGIN_NAMESPACE To provide the functionality of the extension in a compositor, create an instance of the XdgDecorationManagerV1 component and add it to the list of extensions supported by the compositor: - \code - import QtWayland.Compositor 1.3 + \qml \QtMinorVersion + import QtWayland.Compositor 1.\1 WaylandCompositor { // Xdg decoration manager assumes xdg-shell is being used @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE preferredMode: XdgToplevel.ServerSideDecoration } } - \endcode + \endqml \sa XdgToplevel::decorationMode */ diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index 560f95acd..eb7b958b4 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -154,15 +154,16 @@ void QWaylandXdgShellPrivate::xdg_wm_base_pong(Resource *resource, uint32_t seri * To provide the functionality of the shell extension in a compositor, create * an instance of the XdgShell component and add it to the list of extensions * supported by the compositor: - * \code - * import QtWayland.Compositor 1.3 + * + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * XdgShell { * // ... * } * } - * \endcode + * \endqml */ /*! diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp index 9e157a8a3..0628f55e7 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp @@ -513,15 +513,17 @@ void QWaylandXdgPopupV5Private::xdg_popup_destroy(Resource *resource) * * To provide the functionality of the shell extension in a compositor, create * an instance of the XdgShellV5 component and add it as a child of the - * compositor: \code - * import QtWayland.Compositor 1.0 + * compositor: + * + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * XdgShellV5 { * // ... * } * } - * \endcode + * \endqml * * \deprecated */ diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp index d69ed6ca9..f971fe5b4 100644 --- a/src/compositor/extensions/qwaylandxdgshellv6.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp @@ -159,15 +159,16 @@ void QWaylandXdgShellV6Private::zxdg_shell_v6_pong(Resource *resource, uint32_t * To provide the functionality of the shell extension in a compositor, create * an instance of the XdgShellV6 component and add it to the list of extensions * supported by the compositor: - * \code - * import QtWayland.Compositor 1.1 + * + * \qml \QtMinorVersion + * import QtWayland.Compositor 1.\1 * * WaylandCompositor { * XdgShellV6 { * // ... * } * } - * \endcode + * \endqml */ /*! diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp index df7536ed1..c7553d932 100644 --- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp +++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp @@ -130,6 +130,10 @@ public: static void defineModule(const char *uri) { + // This is needed so to guarantee that the import is available with the current + // Qt minor version even if no new types have been added since the last release. + qmlRegisterModule(uri, 1, QT_VERSION_MINOR); + qmlRegisterType<QWaylandQuickCompositorQuickExtensionContainer>(uri, 1, 0, "WaylandCompositor"); qmlRegisterType<QWaylandQuickItem>(uri, 1, 0, "WaylandQuickItem"); qmlRegisterType<QWaylandQuickItem, 13>(uri, 1, 13, "WaylandQuickItem"); |