Files
qbz/scripts/test-card-menu-qml.sh
T
vicrodh a75d7b0087 fix(qt): a submenu stays open while the pointer is over its rows
CardMenu's pair-hover check read the popup's HoverHandler, which lives on
the background and never fires over a row: the rows' MouseAreas take the
hover events, so the panel only counted as hovered on its 5px padding.
Crossing from that padding into the child's first row read as "left both
menus" and the 350 ms leave timer closed the pair — the Copy submenu
closed the whole context menu as soon as it was entered.

A menu is now hovered while its panel OR one of its rows is (one hot row
at a time, held by reference so a destroyed row cannot leave it stuck),
and the pair check reads that on both menus. scripts/test-card-menu-qml.sh
drives the pointer through the parent row, the child's rows, back to a
plain row and out, and joins the runtime gate and CI.

cc
2026-09-14 00:39:47 -06:00

19 lines
713 B
Bash
Executable File

#!/usr/bin/env bash
# CardMenu submenu regression: hovering the child keeps the pair open,
# leaving both closes both, a pick in the child forwards and closes all.
set -euo pipefail
cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
if [[ -n "${QT_ROOT_DIR:-}" ]]; then
qt_card_menu_bins="$QT_ROOT_DIR/bin"
else
qt_card_menu_qmake="${QMAKE:-}"
if [[ -z "$qt_card_menu_qmake" ]]; then
qt_card_menu_qmake="$(command -v qmake6 || command -v qmake)"
fi
qt_card_menu_bins="$("$qt_card_menu_qmake" -query QT_INSTALL_BINS)"
fi
QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software \
"$qt_card_menu_bins/qmltestrunner" \
-input scripts/qml-tests/tst_card_menu.qml \
-import scripts/qml-tests/imports