diff options
author | Sami Shalayel <sami.shalayel@qt.io> | 2023-11-24 13:54:17 +0100 |
---|---|---|
committer | Sami Shalayel <sami.shalayel@qt.io> | 2024-05-23 08:34:24 +0200 |
commit | f289e98e9cfa0b7d0f64e3ae27ff6afc36730462 (patch) | |
tree | 2b646715383408171a96579619b8f382395af9b7 /src/client/qwaylandvulkanwindow_p.h | |
parent | 0a6ca388372c8b12b14f139f48252a969c8cffc6 (diff) |
fix type registration in compositor-extensions QML modules
Delete all handwritten/handpatched .qmltypes files from the source
folder, get rid of the handwritten plugin and let CMake do all the dirty
work instead.
Instead of the handwritten plugins, use QML_FOREIGN to register the
types to QML or use the
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_NAMED_ELEMENT helper macro.
Split the handwritten plugins in two files: a private header doing all
the type registration and an implementation file that contains some
documentation.
In the CMakeLists.txt, remove all the special PLUGIN related command,
except for src/imports/compositor-extensions/qtshell/CMakeLists.txt
where it stops compiling without the PLUGIN_TARGET command.
Also fix the `#include <moc_...cpp>` to avoid MOC from complaining.
qtshell seems to directly define the types that the plugin was
exposing to QML. In this case, do not add a file with the foreign
structs but directly add the QML_NAMED_ELEMENT macros to the type
definitions.
Also add INTERFACE_AUTOMOC_MACRO_NAMES for the Q_COMPOSITOR_DECLARE_*
macros.
Add a manual test project that uses the QML elements where qmllint can
be used to check that the QML modules are ok.
Fixes: QTBUG-119377
Change-Id: Ib7e8347493ed3428e5250e94004ea07ac79b36b4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/client/qwaylandvulkanwindow_p.h')
0 files changed, 0 insertions, 0 deletions