fix(bar): defer update to next cycle

This commit is contained in:
Lysec
2026-03-17 10:16:41 +01:00
parent 2e5f07e039
commit 2fcd219c34
24 changed files with 2459 additions and 162 deletions
+8 -3
View File
@@ -142,13 +142,18 @@ Item {
}
}
// Initialize models — deferred to next event-loop tick via Qt.callLater to avoid
// re-entrant incubation: Component.onCompleted fires during QQmlObjectCreator::finalize,
// Initialize models — deferred via Timer (Qt.callLater can fire in same event cycle)
// to avoid re-entrant incubation: Component.onCompleted fires during finalization,
// and ListModel.append synchronously creates Repeater delegates whose own finalization
// can corrupt the V4 heap (SIGSEGV in QV4::Object::insertMember).
Timer {
id: initModelsTimer
interval: 0
onTriggered: root._initModels()
}
Component.onCompleted: {
Logger.d("Bar", "Bar Component.onCompleted for screen:", screen?.name);
Qt.callLater(root._initModels);
initModelsTimer.restart();
}
function _initModels() {