Fix UI freeze every 5 s

The settings main page exists from startup inside the closed dialog and
its IP timer always ran: networkInfo() spawns nmcli twice synchronously on
the GUI thread (~200 ms), stalling every animation. Poll only while the
page is visible. Also write the qt.alive heartbeat without QSaveFile's
fsync (bt-update only checks its mtime).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 10:58:16 +00:00
co-authored by Claude Opus 5.5
parent f07e153f09
commit 1dc88fabf5
2 changed files with 11 additions and 5 deletions
+6 -1
View File
@@ -42,9 +42,14 @@ Item {
refreshIp()
refreshBrightness()
}
// networkInfo() runs nmcli synchronously on the GUI thread (~200 ms), so
// poll only while this page is on screen. The page exists from startup
// inside the closed settings dialog; an always-running timer froze all
// animations every 5 s.
onVisibleChanged: if (visible) refreshIp()
Timer {
interval: 5000
running: true
running: page.visible
repeat: true
onTriggered: page.refreshIp()
}