From 42a1f34ddbe0f0e35e0c2d54d94eeaddf2956001 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sat, 28 Mar 2026 18:17:36 +1100 Subject: [PATCH] chore: fix property-override linter warnings --- components/controls/SplitButtonRow.qml | 1 - components/controls/StyledInputField.qml | 3 +- components/controls/SwitchRow.qml | 1 - modules/background/DesktopClock.qml | 36 ++++++++++++------------ modules/bar/Bar.qml | 2 +- modules/bar/popouts/Wrapper.qml | 2 +- modules/dashboard/Content.qml | 16 +++++------ modules/dashboard/Dash.qml | 5 ++-- modules/dashboard/Tabs.qml | 12 ++++---- modules/dashboard/Wrapper.qml | 2 +- modules/dashboard/dash/Calendar.qml | 18 ++++++------ modules/dashboard/dash/User.qml | 1 - services/Nmcli.qml | 14 ++++----- 13 files changed, 54 insertions(+), 59 deletions(-) diff --git a/components/controls/SplitButtonRow.qml b/components/controls/SplitButtonRow.qml index b4f9cf0c..a58e46d4 100644 --- a/components/controls/SplitButtonRow.qml +++ b/components/controls/SplitButtonRow.qml @@ -12,7 +12,6 @@ StyledRect { required property string label property int expandedZ: 100 - property bool enabled: true property alias menuItems: splitButton.menuItems property alias active: splitButton.active diff --git a/components/controls/StyledInputField.qml b/components/controls/StyledInputField.qml index f56f79fb..c7b66dda 100644 --- a/components/controls/StyledInputField.qml +++ b/components/controls/StyledInputField.qml @@ -13,8 +13,7 @@ Item { property var validator: null property bool readOnly: false property int horizontalAlignment: TextInput.AlignHCenter - property int implicitWidth: 70 - property bool enabled: true + implicitWidth: 70 // Expose activeFocus through alias to avoid FINAL property override readonly property alias hasFocus: inputField.activeFocus diff --git a/components/controls/SwitchRow.qml b/components/controls/SwitchRow.qml index 6c82d72c..076080b6 100644 --- a/components/controls/SwitchRow.qml +++ b/components/controls/SwitchRow.qml @@ -10,7 +10,6 @@ StyledRect { required property string label required property bool checked - property bool enabled: true property var onToggled: function (checked) {} Layout.fillWidth: true diff --git a/modules/background/DesktopClock.qml b/modules/background/DesktopClock.qml index 86f9c623..67f77e44 100644 --- a/modules/background/DesktopClock.qml +++ b/modules/background/DesktopClock.qml @@ -14,7 +14,7 @@ Item { required property real absX required property real absY - property real scale: Config.background.desktopClock.scale + property real clockScale: Config.background.desktopClock.scale readonly property bool bgEnabled: Config.background.desktopClock.background.enabled readonly property bool blurEnabled: bgEnabled && Config.background.desktopClock.background.blur && !GameMode.enabled readonly property bool invertColors: Config.background.desktopClock.invertColors @@ -23,8 +23,8 @@ Item { readonly property color safeSecondary: useLightSet ? Colours.palette.m3secondaryContainer : Colours.palette.m3secondary readonly property color safeTertiary: useLightSet ? Colours.palette.m3tertiaryContainer : Colours.palette.m3tertiary - implicitWidth: layout.implicitWidth + (Appearance.padding.large * 4 * root.scale) - implicitHeight: layout.implicitHeight + (Appearance.padding.large * 2 * root.scale) + implicitWidth: layout.implicitWidth + (Appearance.padding.large * 4 * root.clockScale) + implicitHeight: layout.implicitHeight + (Appearance.padding.large * 2 * root.clockScale) Item { id: clockContainer @@ -63,7 +63,7 @@ Item { visible: root.bgEnabled anchors.fill: parent - radius: Appearance.rounding.large * root.scale + radius: Appearance.rounding.large * root.clockScale opacity: Config.background.desktopClock.background.opacity color: Colours.palette.m3surface @@ -74,29 +74,29 @@ Item { id: layout anchors.centerIn: parent - spacing: Appearance.spacing.larger * root.scale + spacing: Appearance.spacing.larger * root.clockScale RowLayout { spacing: Appearance.spacing.small StyledText { text: Time.hourStr - font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale + font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale font.weight: Font.Bold color: root.safePrimary } StyledText { text: ":" - font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale + font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale color: root.safeTertiary opacity: 0.8 - Layout.topMargin: -Appearance.padding.large * 1.5 * root.scale + Layout.topMargin: -Appearance.padding.large * 1.5 * root.clockScale } StyledText { text: Time.minuteStr - font.pointSize: Appearance.font.size.extraLarge * 3 * root.scale + font.pointSize: Appearance.font.size.extraLarge * 3 * root.clockScale font.weight: Font.Bold color: root.safeSecondary } @@ -104,14 +104,14 @@ Item { Loader { asynchronous: true Layout.alignment: Qt.AlignTop - Layout.topMargin: Appearance.padding.large * 1.4 * root.scale + Layout.topMargin: Appearance.padding.large * 1.4 * root.clockScale active: Config.services.useTwelveHourClock visible: active sourceComponent: StyledText { text: Time.amPmStr - font.pointSize: Appearance.font.size.large * root.scale + font.pointSize: Appearance.font.size.large * root.clockScale color: root.safeSecondary } } @@ -119,9 +119,9 @@ Item { StyledRect { Layout.fillHeight: true - Layout.preferredWidth: 4 * root.scale - Layout.topMargin: Appearance.spacing.larger * root.scale - Layout.bottomMargin: Appearance.spacing.larger * root.scale + Layout.preferredWidth: 4 * root.clockScale + Layout.topMargin: Appearance.spacing.larger * root.clockScale + Layout.bottomMargin: Appearance.spacing.larger * root.clockScale radius: Appearance.rounding.full color: root.safePrimary opacity: 0.8 @@ -132,7 +132,7 @@ Item { StyledText { text: Time.format("MMMM").toUpperCase() - font.pointSize: Appearance.font.size.large * root.scale + font.pointSize: Appearance.font.size.large * root.clockScale font.letterSpacing: 4 font.weight: Font.Bold color: root.safeSecondary @@ -140,7 +140,7 @@ Item { StyledText { text: Time.format("dd") - font.pointSize: Appearance.font.size.extraLarge * root.scale + font.pointSize: Appearance.font.size.extraLarge * root.clockScale font.letterSpacing: 2 font.weight: Font.Medium color: root.safePrimary @@ -148,7 +148,7 @@ Item { StyledText { text: Time.format("dddd") - font.pointSize: Appearance.font.size.larger * root.scale + font.pointSize: Appearance.font.size.larger * root.clockScale font.letterSpacing: 2 color: root.safeSecondary } @@ -156,7 +156,7 @@ Item { } } - Behavior on scale { + Behavior on clockScale { Anim { duration: Appearance.anim.durations.expressiveDefaultSpatial easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index b82a17c7..38ed564b 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -171,7 +171,7 @@ ColumnLayout { } component WrappedLoader: Loader { - required property bool enabled + required enabled required property string id required property int index diff --git a/modules/bar/popouts/Wrapper.qml b/modules/bar/popouts/Wrapper.qml index 06bec9b0..3a907433 100644 --- a/modules/bar/popouts/Wrapper.qml +++ b/modules/bar/popouts/Wrapper.qml @@ -22,7 +22,7 @@ Item { property alias currentName: popoutState.currentName property real currentCenter property alias hasCurrent: popoutState.hasCurrent - readonly property PopoutState state: popoutState + readonly property PopoutState popState: popoutState property string detachedMode property string queuedMode diff --git a/modules/dashboard/Content.qml b/modules/dashboard/Content.qml index 5b3bbbe6..957389f8 100644 --- a/modules/dashboard/Content.qml +++ b/modules/dashboard/Content.qml @@ -21,7 +21,7 @@ Item { } return false; } - required property DashboardState state + required property DashboardState dashState required property FileDialog facePicker readonly property var dashboardTabs: { @@ -70,7 +70,7 @@ Item { anchors.margins: Appearance.padding.large nonAnimWidth: root.nonAnimWidth - anchors.margins * 2 - state: root.state + dashState: root.dashState tabs: root.dashboardTabs } @@ -89,7 +89,7 @@ Item { Flickable { id: view - readonly property int currentIndex: root.state.currentTab + readonly property int currentIndex: root.dashState.currentTab readonly property Item currentItem: { repeater.count; // Trigger update on count change return repeater.itemAt(currentIndex); @@ -112,9 +112,9 @@ Item { const x = contentX - currentItem.x; if (x > currentItem.implicitWidth / 2) - root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1); + root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, tabs.count - 1); else if (x < -currentItem.implicitWidth / 2) - root.state.currentTab = Math.max(root.state.currentTab - 1, 0); + root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0); } onDragEnded: { @@ -123,9 +123,9 @@ Item { const x = contentX - currentItem.x; if (x > currentItem.implicitWidth / 10) - root.state.currentTab = Math.min(root.state.currentTab + 1, tabs.count - 1); + root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, tabs.count - 1); else if (x < -currentItem.implicitWidth / 10) - root.state.currentTab = Math.max(root.state.currentTab - 1, 0); + root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0); else contentX = Qt.binding(() => currentItem?.x ?? 0); } @@ -166,7 +166,7 @@ Item { Dash { visibilities: root.visibilities - state: root.state + dashState: root.dashState facePicker: root.facePicker } } diff --git a/modules/dashboard/Dash.qml b/modules/dashboard/Dash.qml index c0657f58..59620d88 100644 --- a/modules/dashboard/Dash.qml +++ b/modules/dashboard/Dash.qml @@ -9,7 +9,7 @@ GridLayout { id: root required property DrawerVisibilities visibilities - required property DashboardState state + required property DashboardState dashState required property FileDialog facePicker rowSpacing: Appearance.spacing.normal @@ -27,7 +27,6 @@ GridLayout { id: user visibilities: root.visibilities - state: root.state facePicker: root.facePicker } } @@ -67,7 +66,7 @@ GridLayout { Calendar { id: calendar - state: root.state + dashState: root.dashState } } diff --git a/modules/dashboard/Tabs.qml b/modules/dashboard/Tabs.qml index adeab928..7d8ff051 100644 --- a/modules/dashboard/Tabs.qml +++ b/modules/dashboard/Tabs.qml @@ -13,7 +13,7 @@ Item { id: root required property real nonAnimWidth - required property DashboardState state + required property DashboardState dashState required property var tabs readonly property alias count: bar.count @@ -27,10 +27,10 @@ Item { anchors.right: parent.right anchors.top: parent.top - currentIndex: root.state.currentTab + currentIndex: root.dashState.currentTab background: null - onCurrentIndexChanged: root.state.currentTab = currentIndex + onCurrentIndexChanged: root.dashState.currentTab = currentIndex Repeater { model: ScriptModel { @@ -113,9 +113,9 @@ Item { function onWheel(event: WheelEvent): void { if (event.angleDelta.y < 0) - root.state.currentTab = Math.min(root.state.currentTab + 1, bar.count - 1); + root.dashState.currentTab = Math.min(root.dashState.currentTab + 1, bar.count - 1); else if (event.angleDelta.y > 0) - root.state.currentTab = Math.max(root.state.currentTab - 1, 0); + root.dashState.currentTab = Math.max(root.dashState.currentTab - 1, 0); } implicitWidth: Math.max(icon.width, label.width) @@ -124,7 +124,7 @@ Item { cursorShape: Qt.PointingHandCursor onPressed: event => { - root.state.currentTab = tab.TabBar.index; + root.dashState.currentTab = tab.TabBar.index; const stateY = stateWrapper.y; rippleAnim.x = event.x; diff --git a/modules/dashboard/Wrapper.qml b/modules/dashboard/Wrapper.qml index 596c21b7..a7449689 100644 --- a/modules/dashboard/Wrapper.qml +++ b/modules/dashboard/Wrapper.qml @@ -96,7 +96,7 @@ Item { sourceComponent: Content { visibilities: root.visibilities - state: root.dashState + dashState: root.dashState facePicker: root.facePicker } } diff --git a/modules/dashboard/dash/Calendar.qml b/modules/dashboard/dash/Calendar.qml index bed3c4d3..64e43f5c 100644 --- a/modules/dashboard/dash/Calendar.qml +++ b/modules/dashboard/dash/Calendar.qml @@ -12,16 +12,16 @@ import qs.config CustomMouseArea { id: root - required property var state + required property DashboardState dashState - readonly property int currMonth: state.currentDate.getMonth() - readonly property int currYear: state.currentDate.getFullYear() + readonly property int currMonth: dashState.currentDate.getMonth() + readonly property int currYear: dashState.currentDate.getFullYear() function onWheel(event: WheelEvent): void { if (event.angleDelta.y > 0) - root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1); + root.dashState.currentDate = new Date(root.currYear, root.currMonth - 1, 1); else if (event.angleDelta.y < 0) - root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1); + root.dashState.currentDate = new Date(root.currYear, root.currMonth + 1, 1); } anchors.left: parent.left @@ -29,7 +29,7 @@ CustomMouseArea { implicitHeight: inner.implicitHeight + inner.anchors.margins * 2 acceptedButtons: Qt.MiddleButton - onClicked: root.state.currentDate = new Date() + onClicked: root.dashState.currentDate = new Date() ColumnLayout { id: inner @@ -52,7 +52,7 @@ CustomMouseArea { id: prevMonthStateLayer function onClicked(): void { - root.state.currentDate = new Date(root.currYear, root.currMonth - 1, 1); + root.dashState.currentDate = new Date(root.currYear, root.currMonth - 1, 1); } radius: Appearance.rounding.full @@ -77,7 +77,7 @@ CustomMouseArea { StateLayer { function onClicked(): void { - root.state.currentDate = new Date(); + root.dashState.currentDate = new Date(); } anchors.fill: monthYearDisplay @@ -112,7 +112,7 @@ CustomMouseArea { id: nextMonthStateLayer function onClicked(): void { - root.state.currentDate = new Date(root.currYear, root.currMonth + 1, 1); + root.dashState.currentDate = new Date(root.currYear, root.currMonth + 1, 1); } radius: Appearance.rounding.full diff --git a/modules/dashboard/dash/User.qml b/modules/dashboard/dash/User.qml index 5fb71eff..7dc47f74 100644 --- a/modules/dashboard/dash/User.qml +++ b/modules/dashboard/dash/User.qml @@ -11,7 +11,6 @@ Row { id: root required property DrawerVisibilities visibilities - required property DashboardState state required property FileDialog facePicker padding: Appearance.padding.large diff --git a/services/Nmcli.qml b/services/Nmcli.qml index 7af9513b..dc783f8a 100644 --- a/services/Nmcli.qml +++ b/services/Nmcli.qml @@ -168,7 +168,7 @@ Singleton { function executeCommand(args: list, callback: var): void { const proc = commandProc.createObject(root); - proc.command = ["nmcli", ...args]; + proc.cmdArgs = ["nmcli", ...args]; proc.callback = callback; activeProcesses.push(proc); @@ -181,7 +181,7 @@ Singleton { }); Qt.callLater(() => { - proc.exec(proc.command); + proc.exec(proc.cmdArgs); }); } @@ -840,7 +840,7 @@ Singleton { return false; } - if (!isConnectionCommand(proc.command) || !root.pendingConnection || !root.pendingConnection.callback) { + if (!isConnectionCommand(proc.cmdArgs) || !root.pendingConnection || !root.pendingConnection.callback) { return false; } @@ -1117,7 +1117,7 @@ Singleton { if (proc && proc.stderr && proc.stderr.text) { const error = proc.stderr.text.trim(); if (error && error.length > 0) { - if (root.isConnectionCommand(proc.command)) { + if (root.isConnectionCommand(proc.cmdArgs)) { const needsPassword = root.detectPasswordRequired(error); if (needsPassword && !proc.callbackCalled && root.pendingConnection) { @@ -1204,7 +1204,7 @@ Singleton { if (proc && proc.stderr && proc.stderr.text) { const error = proc.stderr.text.trim(); if (error && error.length > 0) { - if (root.isConnectionCommand(proc.command)) { + if (root.isConnectionCommand(proc.cmdArgs)) { const needsPassword = root.detectPasswordRequired(error); if (needsPassword && !proc.callbackCalled && root.pendingConnection && root.pendingConnection.callback) { @@ -1281,7 +1281,7 @@ Singleton { id: proc property var callback: null - property list command: [] + property list cmdArgs: [] property bool callbackCalled: false property int exitCode: 0 @@ -1321,7 +1321,7 @@ Singleton { const output = (stdoutCollector && stdoutCollector.text) ? stdoutCollector.text : ""; const error = (stderrCollector && stderrCollector.text) ? stderrCollector.text : ""; const success = exitCode === 0; - const cmdIsConnection = isConnectionCommand(proc.command); + const cmdIsConnection = isConnectionCommand(proc.cmdArgs); if (root.handlePasswordRequired(proc, error, output, exitCode)) { processFinished();