Files
qbz/scripts/test-wallpaper-field-qml.sh
T
vicrodh 6b1fcd30ab fix(qt): rename the Wallpaper field's platform flag off the handler namespace
The field's platform flag was named `onWayland`. With no `wayland` member
beside it the binding happens to work, but the on-prefixed property audit
(which qt-run.sh runs) rejects any `on<Upper>` name, and an instance
cannot assign it: `onWayland: false` is parsed as a handler for a
nonexistent signal and the component fails to load. It is `isWayland`
now, writable so a test can take the Wayland branch under the offscreen
platform, and a change of it also asks Rust to follow the window.

tst_wallpaper_field covers the Qt position on X11 / macOS / Windows, the
compositor rectangle picked by this window's size on Wayland (a
miniplayer-sized window is ignored, a move is followed), the centred
fallback, and an invisible field that reads nothing. It runs in the
runtime gate.

cc
2026-09-14 06:07:14 -06:00

21 lines
851 B
Bash
Executable File

#!/usr/bin/env bash
# WallpaperField regression: the Wallpaper background's crop follows the
# window — Qt's position on X11/macOS/Windows, the compositor's rectangle for
# this window on Plasma Wayland, centred otherwise — and an invisible field
# reads nothing. Same run in CI and locally.
set -euo pipefail
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
if [[ -n "${QT_ROOT_DIR:-}" ]]; then
qt_wallpaper_bins="$QT_ROOT_DIR/bin"
else
qt_wallpaper_qmake="${QMAKE:-}"
if [[ -z "$qt_wallpaper_qmake" ]]; then
qt_wallpaper_qmake="$(command -v qmake6 || command -v qmake)"
fi
qt_wallpaper_bins="$("$qt_wallpaper_qmake" -query QT_INSTALL_BINS)"
fi
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software \
"$qt_wallpaper_bins/qmltestrunner" \
-input scripts/qml-tests/tst_wallpaper_field.qml \
-import scripts/qml-tests/imports