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:
parent
ffe4157e1c
commit
10c206c09c
3 changed files with 24 additions and 8 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue