Revert "fix(bar): defer update to next cycle"

This reverts commit 2fcd219c34.
This commit is contained in:
Lysec
2026-03-17 10:38:25 +01:00
parent 2fcd219c34
commit 46a3c7e2d4
24 changed files with 162 additions and 2459 deletions
+3 -8
View File
@@ -142,18 +142,13 @@ Item {
}
}
// Initialize models — deferred via Timer (Qt.callLater can fire in same event cycle)
// to avoid re-entrant incubation: Component.onCompleted fires during finalization,
// Initialize models — deferred to next event-loop tick via Qt.callLater to avoid
// re-entrant incubation: Component.onCompleted fires during QQmlObjectCreator::finalize,
// 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);
initModelsTimer.restart();
Qt.callLater(root._initModels);
}
function _initModels() {
+2 -27
View File
@@ -72,33 +72,8 @@ Item {
Loader {
id: loader
anchors.fill: parent
asynchronous: false
// Deferred activation to prevent re-entrant incubation crash:
// When ListModel.append() creates this delegate, the Repeater is mid-incubation.
// If this Loader activates synchronously (asynchronous: false) during delegate
// finalization, it triggers nested QQmlIncubatorPrivate::incubate which corrupts
// the V4 heap (SIGSEGV in QV4::Object::insertMember).
// Deferring to the next event loop iteration breaks the nesting.
property bool _ready: false
active: _ready && root.checkWidgetExists() && (root.reloadCounter >= 0)
Timer {
id: activateTimer
interval: 0
onTriggered: loader._ready = true
}
Component.onCompleted: activateTimer.start()
// Reset _ready when reloadCounter changes to force a deferred re-activation
Connections {
target: root
function onReloadCounterChanged() {
loader._ready = false;
activateTimer.restart();
}
}
asynchronous: true
active: root.checkWidgetExists() && (root.reloadCounter >= 0)
sourceComponent: {
// Depend on reloadCounter to force re-fetch of component
+1 -1
View File
@@ -50,7 +50,7 @@ NIconButton {
// If using distro logo, don't use theme icon.
icon: (customIconPath === "" && !useDistroLogo) ? customIcon : ""
tooltipText: {
if (PanelService.getPanel("controlCenterPanel", screen)?.isPanelOpen) {
if (!screen || PanelService.getPanel("controlCenterPanel", screen)?.isPanelOpen) {
return "";
} else {
return I18n.tr("tooltips.open-control-center");
+1 -1
View File
@@ -408,7 +408,7 @@ Item {
}
onEntered: {
if ((isVertical || scrollingMode === "never") && !PanelService.getPanel("mediaPlayerPanel", screen)?.isPanelOpen) {
if (screen && (isVertical || scrollingMode === "never") && !PanelService.getPanel("mediaPlayerPanel", screen)?.isPanelOpen) {
TooltipService.show(root, title, BarService.getTooltipDirection(root.screen?.name));
}
}