Watch
1
0
Fork
You've already forked souveraine
0

fix: Component.onCompleted doesn't work on QML Singletons

Replaced with Timer { interval: 0; running: true } in:
- Session.qml (boot IPC audit)
- SessionAudit.qml (init log)
- SessionEvents.qml (init log)
This commit is contained in:
Fimeg 2026-07-14 21:58:02 -04:00
commit 10c206c09c
3 changed files with 24 additions and 8 deletions

View file

@ -424,8 +424,16 @@ Singleton {
// If a new IpcHandler is added, this comment must be updated. The
// console.log below is the runtime check; the comment is the human
// audit trail.
Component.onCompleted: {
console.log("[session] boot IPC audit — shell exposes: "
+ "lock, lock2, dock, sidebar, session, overview, keyboard, appInventory");
// NOTE: Component.onCompleted doesn't work on Singletons in QML,
// so the audit log fires via a zero-delay Timer instead.
Timer {
id: bootAuditTimer
interval: 0
repeat: false
running: true
onTriggered: {
console.log("[session] boot IPC audit — shell exposes: "
+ "lock, lock2, dock, sidebar, session, overview, keyboard, appInventory");
}
}
}

View file

@ -214,7 +214,11 @@ Singleton {
}
}
Component.onCompleted: {
console.log("[audit] initialized; log at " + root.auditPath);
Timer {
id: initLogTimer
interval: 0
repeat: false
running: true
onTriggered: console.log("[audit] initialized; log at " + root.auditPath)
}
}

View file

@ -320,8 +320,12 @@ Singleton {
}
}
Component.onCompleted: {
console.log("[session-events] initialized; sleep inhibitor held="
+ root.sleepInhibitorHeld);
Timer {
id: initLogTimer
interval: 0
repeat: false
running: true
onTriggered: console.log("[session-events] initialized; sleep inhibitor held="
+ root.sleepInhibitorHeld)
}
}