[plasma/discover] kcm: kcm/updates: fix default indicator

Nate Graham <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 7d14657abfa9b040abcd309dad7b1d89ed966c2a by Nate Graham, on behalf of Tobias Ozór.
Committed on 03/08/2026 at 18:45.
Pushed by ngraham into branch 'master'.

kcm/updates: fix default indicator

Non-default values will be highlighted when "Highlight Changed Settings"
is enabled.

BUG: 469914

M  +1    -1    kcm/discoversettings.kcfg
M  +21   -14   kcm/ui/main.qml
M  +2    -2    kcm/updatessettings.kcfg

https://invent.kde.org/plasma/discover/-/commit/7d14657abfa9b040abcd309dad7b1d89ed966c2a

diff --git a/kcm/discoversettings.kcfg b/kcm/discoversettings.kcfg
index 5de87f699..5d526750c 100644
--- a/kcm/discoversettings.kcfg
+++ b/kcm/discoversettings.kcfg
@@ -11,7 +11,7 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
        http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
     <kcfgfile name="discoverrc" />
     <group name="Software">
-        <entry name="UseOfflineUpdates" type="Bool">
+        <entry name="useOfflineUpdates" key="UseOfflineUpdates" type="Bool">
             <default>false</default>
         </entry>
     </group>
diff --git a/kcm/ui/main.qml b/kcm/ui/main.qml
index 2460878ec..527fdd197 100644
--- a/kcm/ui/main.qml
+++ b/kcm/ui/main.qml
@@ -42,6 +42,11 @@ SimpleKCM {
 
             QQC2.ButtonGroup.group: autoUpdatesGroup
             checked: !kcm.updatesSettings.useUnattendedUpdates
+
+            SettingStateBinding {
+                configObject: kcm.updatesSettings
+                settingName: "useUnattendedUpdates"
+            }
         }
         RowLayout {
             spacing: Kirigami.Units.smallSpacing
@@ -52,6 +57,11 @@ SimpleKCM {
 
                 QQC2.ButtonGroup.group: autoUpdatesGroup
                 checked: kcm.updatesSettings.useUnattendedUpdates
+
+                SettingStateBinding {
+                    configObject: kcm.updatesSettings
+                    settingName: "useUnattendedUpdates"
+                }
             }
 
             Kirigami.ContextualHelpButton {
@@ -59,12 +69,6 @@ SimpleKCM {
             }
         }
 
-        SettingStateBinding {
-            configObject: kcm.updatesSettings
-            settingName: "useUnattendedUpdates"
-            target: automaticallyRadio
-        }
-
         QQC2.ComboBox {
             Kirigami.FormData.label: kcm.updatesSettings.useUnattendedUpdates ? i18nc("@title:group", "Update frequency:") : i18nc("@title:group", "Notification frequency:")
 
@@ -103,8 +107,7 @@ SimpleKCM {
             onActivated: index => {
                 kcm.updatesSettings.requiredNotificationInterval = options[index]
             }
-            SettingStateProxy {
-                id: settingState
+            SettingStateBinding {
                 configObject: kcm.updatesSettings
                 settingName: "requiredNotificationInterval"
             }
@@ -127,6 +130,11 @@ SimpleKCM {
 
                 QQC2.ButtonGroup.group: offlineUpdatesGroup
                 checked: kcm.discoverSettings.useOfflineUpdates
+
+                SettingStateBinding {
+                    configObject: kcm.discoverSettings
+                    settingName: "useOfflineUpdates"
+                }
             }
 
             QQC2.Label {
@@ -141,13 +149,12 @@ SimpleKCM {
                 QQC2.ButtonGroup.group: offlineUpdatesGroup
                 enabled: !kcm.discoverSettings.isUseOfflineUpdatesImmutable
                 checked: !kcm.discoverSettings.useOfflineUpdates
-            }
-        }
 
-        SettingStateBinding {
-            configObject: kcm.discoverSettings
-            settingName: "useOfflineUpdates"
-            target: offlineUpdatesOption
+                SettingStateBinding {
+                    configObject: kcm.discoverSettings
+                    settingName: "useOfflineUpdates"
+                }
+            }
         }
     }
 }
diff --git a/kcm/updatessettings.kcfg b/kcm/updatessettings.kcfg
index ec754ef6f..ceebf85bf 100644
--- a/kcm/updatessettings.kcfg
+++ b/kcm/updatessettings.kcfg
@@ -11,11 +11,11 @@ SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted
        http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
     <kcfgfile name="PlasmaDiscoverUpdates" />
     <group name="Global">
-        <entry name="UseUnattendedUpdates" type="Bool">
+        <entry name="useUnattendedUpdates" key="UseUnattendedUpdates" type="Bool">
             <default>false</default>
         </entry>
         <entry name="LastUnattendedTrigger" type="DateTime" />
-        <entry name="RequiredNotificationInterval" type="Int" >
+        <entry name="requiredNotificationInterval" key="RequiredNotificationInterval" type="Int">
             <default code="true">60 * 60 * 24</default>
         </entry>
     </group>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.