Remove dead code

This commit is contained in:
David Heinemeier Hansson
2026-05-19 10:50:36 +02:00
parent 8cd9e34294
commit 8fa463975a
36 changed files with 130 additions and 309 deletions
+10 -13
View File
@@ -222,6 +222,14 @@ Item {
return index === -1 ? [] : entries.slice(index + 1)
}
function canonicalWidgetId(name) {
switch (String(name)) {
case "idle": return "idleInhibitor"
case "weatherFlyout": return "weather"
default: return String(name)
}
}
function builtinModuleComponent(name) {
switch (String(name)) {
case "omarchy": return omarchyModuleComponent
@@ -459,18 +467,6 @@ Item {
return ids
}
function activeTrayItemCount() {
var count = 0
var values = SystemTray.items.values
for (var i = 0; i < values.length; i++) {
if (values[i].status !== Status.Passive)
count++
}
return count
}
function trayIconSource(icon) {
var value = String(icon || "")
var marker = "?path="
@@ -939,7 +935,8 @@ Item {
readonly property var registryComponent: {
var w = root.barWidgetRegistry.widgets
if (customType || builtinComponent) return null
return w[moduleName] ? w[moduleName].component : null
var registryName = root.canonicalWidgetId(moduleName)
return w[registryName] ? w[registryName].component : null
}
readonly property bool qmlCustom: customType === "qml"
readonly property bool commandCustom: customType === "command"