shift-shell/tools/preview-stubs/README.md
Marco Allegretti 8dd3bfbb07 tools: install local preview QML stubs
openSUSE Tumbleweed's plasma6-nm 6.6.4 does not ship the org.kde.plasma.networkmanagement.cellular QML submodule that SignalStrengthInfo.qml imports unconditionally. Without it the MobileShell QML namespace fails to load and preview boots to a black screen.

Keep a minimal fallback module under tools/preview-stubs and install it only for local .prefix preview installs by default, with SHIFT_INSTALL_PREVIEW_QML_STUBS=AUTO/ON/OFF for explicit control. Add a CTest guard so qmldir entries stay backed by real files and the fallback remains tied to the QML import tree.
2026-05-19 09:18:46 +02:00

28 lines
1.2 KiB
Markdown

<!-- SPDX-FileCopyrightText: 2026 Marco Allegretti -->
<!-- SPDX-License-Identifier: EUPL-1.2 -->
# Preview-only QML stubs
These stub modules satisfy QML imports that **upstream Plasma Mobile expects**
but that are not provided by the QML packages shipped on the host distro used
for preview/development.
They are installed only for local preview prefixes by default:
`SHIFT_INSTALL_PREVIEW_QML_STUBS=AUTO` enables installation when
`CMAKE_INSTALL_PREFIX` ends in `.prefix`. Set it to `ON` to force installation
for another prefix, or `OFF` to disable it. Production installs using normal
system prefixes leave these stubs out.
## Current stubs
- `org/kde/plasma/networkmanagement/cellular/``CellularModemList`,
`CellularModem`. Required by
`components/mobileshell/qml/dataproviders/SignalStrengthInfo.qml`.
openSUSE Tumbleweed's `plasma6-nm 6.6.4` package does not ship this
QML submodule (only the cellular KCM `.so`). Without the stub the
entire MobileShell QML namespace fails to load and the homescreen
is blank.
When the host distro starts providing a real module at the same import path,
disable the local fallback by configuring with `SHIFT_INSTALL_PREVIEW_QML_STUBS=OFF`
before comparing against the system module.