Bug 459340

Summary: Some tests fail when built statically
Product: [Frameworks and Libraries] frameworks-bluez-qt Reporter: Dawid Wróbel <me>
Component: generalAssignee: Alexander Lohnau <alexander.lohnau>
Status: RESOLVED FIXED    
Severity: normal CC: alexander.lohnau, vkrause
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:

Description Dawid Wróbel 2022-09-18 17:24:01 UTC
See the pipeline run for a complete log:
https://invent.kde.org/education/gcompris/-/jobs/484945
Comment 1 Volker Krause 2022-09-25 08:16:13 UTC
https://invent.kde.org/frameworks/bluez-qt/-/jobs/484896 is the correct log link, failure is related to QML plugins.
Comment 2 Bug Janitor Service 2022-10-30 11:05:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/303
Comment 3 Bug Janitor Service 2022-10-30 11:59:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/bluez-qt/-/merge_requests/27
Comment 4 Alexander Lohnau 2022-11-15 18:38:24 UTC
Git commit 58a36836853a7681a528cf26651e3b97b7ab75c8 by Alexander Lohnau.
Committed on 15/11/2022 at 18:38.
Pushed by alex into branch 'master'.

Fix ECMQmlModule for static plugins

We want the prefix to be picked up from Qt automatically. In its current state, we would need to prepend ":/" to the import paths manually.

Also, we want to initialize the generated qrc resource automatically.
We can do this by setting the QT_PLUGIN_RESOURCE_INIT_FUNCTION function, which gets called before the
static plugin is loaded. Because Qt creates the plugin instances before looking for the qrc files,
this happens early enough.

M  +5    -1    modules/ECMQmlModule.cmake
M  +0    -2    modules/ECMQmlModule.cpp.in

https://invent.kde.org/frameworks/extra-cmake-modules/commit/58a36836853a7681a528cf26651e3b97b7ab75c8
Comment 5 Alexander Lohnau 2022-11-18 19:06:14 UTC
Git commit 500a825a089e7fe401e1bd18dfd7092529b788dc by Alexander Lohnau.
Committed on 18/11/2022 at 18:54.
Pushed by alex into branch 'master'.

Fix QML plugin when building project statically

We need to manually import the QML plugin in case of static builds.
Also, the IID is required, because Qt internally checks this value to determine, if the
plugin as an actual QML plugin.

Requires https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/303

M  +4    -0    autotests/CMakeLists.txt
M  +5    -0    autotests/qmltests.cpp
M  +1    -1    src/imports/CMakeLists.txt
M  +1    -1    src/imports/bluezqtextensionplugin.h

https://invent.kde.org/frameworks/bluez-qt/commit/500a825a089e7fe401e1bd18dfd7092529b788dc