chore: fix service linter warnings

This commit is contained in:
2 * r + 2 * t 2026-03-21 16:45:23 +11:00
parent 407324208f
commit beaefc6f36
7 changed files with 15 additions and 9 deletions

View file

@ -92,7 +92,7 @@ Singleton {
if (!stream) if (!stream)
return qsTr("Unknown"); return qsTr("Unknown");
// Try application name first, then description, then name // Try application name first, then description, then name
return stream.applicationName || stream.description || stream.name || qsTr("Unknown Application"); return stream.properties["application.name"] || stream.description || stream.name || qsTr("Unknown Application");
} }
onSinkChanged: { onSinkChanged: {

View file

@ -17,34 +17,34 @@ Singleton {
map[m.connector] = m; map[m.connector] = m;
return map; return map;
} }
readonly property list<Monitor> monitors: variants.instances readonly property list<Monitor> monitors: variants.instances // qmllint disable incompatible-type
property bool appleDisplayPresent: false property bool appleDisplayPresent: false
function getMonitorForScreen(screen: ShellScreen): var { function getMonitorForScreen(screen: ShellScreen): var {
return monitors.find(m => m.modelData === screen); return monitors.find(m => m.modelData === screen); // qmllint disable missing-property
} }
function getMonitor(query: string): var { function getMonitor(query: string): var {
if (query === "active") { if (query === "active") {
return monitors.find(m => Hypr.monitorFor(m.modelData)?.focused); return monitors.find(m => Hypr.monitorFor(m.modelData)?.focused); // qmllint disable missing-property
} }
if (query.startsWith("model:")) { if (query.startsWith("model:")) {
const model = query.slice(6); const model = query.slice(6);
return monitors.find(m => m.modelData.model === model); return monitors.find(m => m.modelData.model === model); // qmllint disable missing-property
} }
if (query.startsWith("serial:")) { if (query.startsWith("serial:")) {
const serial = query.slice(7); const serial = query.slice(7);
return monitors.find(m => m.modelData.serialNumber === serial); return monitors.find(m => m.modelData.serialNumber === serial); // qmllint disable missing-property
} }
if (query.startsWith("id:")) { if (query.startsWith("id:")) {
const id = parseInt(query.slice(3), 10); const id = parseInt(query.slice(3), 10);
return monitors.find(m => Hypr.monitorFor(m.modelData)?.id === id); return monitors.find(m => Hypr.monitorFor(m.modelData)?.id === id); // qmllint disable missing-property
} }
return monitors.find(m => m.modelData.name === query); return monitors.find(m => m.modelData.name === query); // qmllint disable missing-property
} }
function increaseBrightness(): void { function increaseBrightness(): void {

View file

@ -1,6 +1,7 @@
pragma Singleton pragma Singleton
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import qs.services
import qs.config import qs.config
import qs.utils import qs.utils
import Caelestia import Caelestia

View file

@ -40,7 +40,7 @@ Singleton {
PersistentProperties { PersistentProperties {
id: props id: props
property bool enabled: Hypr.options["animations:enabled"] === 0 property bool enabled: Hypr.options["animations:enabled"] === 0 // qmllint disable missing-property
reloadableId: "gameMode" reloadableId: "gameMode"
} }

View file

@ -1,5 +1,6 @@
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import qs.services
import qs.config import qs.config
import qs.utils import qs.utils
import Caelestia import Caelestia
@ -139,7 +140,9 @@ QtObject {
} }
function onActionsChanged(): void { function onActionsChanged(): void {
// qmllint disable unresolved-type
notif.actions = notif.notification.actions.map(a => ({ notif.actions = notif.notification.actions.map(a => ({
// qmllint enable unresolved-type
identifier: a.identifier, identifier: a.identifier,
text: a.text, text: a.text,
invoke: () => a.invoke() invoke: () => a.invoke()

View file

@ -1,6 +1,7 @@
pragma Singleton pragma Singleton
import qs.components import qs.components
import qs.services
import Quickshell import Quickshell
Singleton { Singleton {

View file

@ -1,5 +1,6 @@
pragma Singleton pragma Singleton
import qs.services
import qs.config import qs.config
import qs.utils import qs.utils
import Caelestia.Models import Caelestia.Models