tray: add diagnostic logging to identify broken visible binding

This commit is contained in:
Damocles 2026-04-26 15:09:57 +02:00
parent 200a844062
commit dde0b73ca5

View file

@ -16,6 +16,10 @@ M.BarModule {
required property var bar required property var bar
property var _activeMenu: null property var _activeMenu: null
// Shadow binding to test if QML dependency tracking works on a fresh property
property bool _shouldBeVisible: S.Modules.tray.enable && _trayRepeater.count > 0
on_ShouldBeVisibleChanged: console.log("[TrayModule] _shouldBeVisible:", _shouldBeVisible, "actual visible:", visible)
Component.onCompleted: console.log("[TrayModule] created, enable:", S.Modules.tray.enable, "repeater count:", _trayRepeater.count) Component.onCompleted: console.log("[TrayModule] created, enable:", S.Modules.tray.enable, "repeater count:", _trayRepeater.count)
onVisibleChanged: console.log("[TrayModule] visible:", visible, "enable:", S.Modules.tray.enable, "count:", _trayRepeater.count) onVisibleChanged: console.log("[TrayModule] visible:", visible, "enable:", S.Modules.tray.enable, "count:", _trayRepeater.count)
@ -23,7 +27,7 @@ M.BarModule {
Connections { Connections {
target: _trayRepeater target: _trayRepeater
function onCountChanged() { function onCountChanged() {
console.log("[TrayModule] repeater count:", _trayRepeater.count); console.log("[TrayModule] repeater count:", _trayRepeater.count, "visible:", root.visible, "shouldBe:", S.Modules.tray.enable && _trayRepeater.count > 0);
} }
} }