feat: Qt-typed api-style for universal ui_qml plugins

A universal UI plugin (type: ui_qml) derives a QtRO SimpleSource whose .rep
slots are Qt-typed, so there's no reason to pin it to the std api-style: flip
it to `qt` so its modules().<dep> dependency wrappers come out Qt-typed
(QString/int), matching the view with no std<->Qt conversions. core universal
and cdylib modules stay on the Qt-free `lp` surface; legacy stays `qt`.

Pairs with logos-qt-sdk's LogosUiPluginContext (logos-co/logos-qt-sdk#3).
Part of a 4-repo change (qt-sdk + plugin-qt + module-builder + tutorial).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dario Gabriel Lipicar
2026-06-15 10:54:51 -03:00
co-authored by Claude Opus 4.8
parent dca52b9fd5
commit a3785f557c
+5 -4
View File
@@ -36,12 +36,13 @@ let
# generated LogosModules umbrella + dep wrappers call the logos-protocol C
# ABI (lp_*) directly, so the module's own TUs never include Qt (universal
# is now a header-first cdylib — see modulePreConfigure.universalCodegen).
# UI universal backends (type: ui_qml) inherently derive a Qt SimpleSource,
# so they stay on the std surface (Qt bridged inside the generated .cpp);
# everything else (legacy / handcrafted Qt) stays Qt-typed.
# UI universal backends (type: ui_qml) are NOT modules — they derive a Qt
# SimpleSource whose .rep slots are Qt-typed, so they get the Qt surface
# too: their LogosUiPluginContext.modules() dep wrappers come out Qt-typed,
# matching the view, with no std<->Qt conversions at the boundary.
# Everything else (legacy / handcrafted Qt) is Qt-typed as well.
apiStyle = if config.interface == "cdylib" then "lp"
else if config.interface == "universal" && (config.type or "core") != "ui_qml" then "lp"
else if config.interface == "universal" then "std"
else "qt";
# TRANSITIONAL: header-copy fallback for dependencies that don't publish a