Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kclock for openSUSE:Factory checked 
in at 2025-03-26 21:20:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kclock (Old)
 and      /work/SRC/openSUSE:Factory/.kclock.new.2696 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kclock"

Wed Mar 26 21:20:44 2025 rev:24 rq:1256132 version:24.12.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/kclock/kclock.changes    2025-03-07 
16:46:39.280667075 +0100
+++ /work/SRC/openSUSE:Factory/.kclock.new.2696/kclock.changes  2025-03-26 
21:23:27.334595412 +0100
@@ -1,0 +2,6 @@
+Wed Mar 26 08:10:40 UTC 2025 - Christophe Marin <christo...@krop.fr>
+
+- Add upstream fix:
+  * 0001-AlarmForm-create-duration-and-snooze-models-correctl.patch
+
+-------------------------------------------------------------------

New:
----
  0001-AlarmForm-create-duration-and-snooze-models-correctl.patch

BETA DEBUG BEGIN:
  New:- Add upstream fix:
  * 0001-AlarmForm-create-duration-and-snooze-models-correctl.patch
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kclock.spec ++++++
--- /var/tmp/diff_new_pack.8fggKa/_old  2025-03-26 21:23:28.290635091 +0100
+++ /var/tmp/diff_new_pack.8fggKa/_new  2025-03-26 21:23:28.290635091 +0100
@@ -32,6 +32,8 @@
 Source1:        
https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
 Source2:        applications.keyring
 %endif
+# PATCH-FIX-UPSTREAM
+Patch0:         0001-AlarmForm-create-duration-and-snooze-models-correctl.patch
 BuildRequires:  kf6-extra-cmake-modules >= %{kf6_version}
 BuildRequires:  cmake(KF6Config) >= %{kf6_version}
 BuildRequires:  cmake(KF6CoreAddons) >= %{kf6_version}

++++++ 0001-AlarmForm-create-duration-and-snooze-models-correctl.patch ++++++
>From 3f74385f664ea12c855f1f7bb77aa6ec72ee85fb Mon Sep 17 00:00:00 2001
From: Nate Graham <n...@kde.org>
Date: Mon, 24 Mar 2025 14:18:15 -0600
Subject: [PATCH] AlarmForm: create duration and snooze models correctly

Currently these are created imperatively to work around the fact that
ListItem can't accept i18n() strings. This imperative assignment breaks
implicitWidth bindings on the Repeater object, which bubbles up and
eventually causes the dialog to have a content size of zero.

Instead, create the data models as arrays of dictionaries, which
preserves the bindings and is the recommended way to do this sort of
lightweight custom model.
---
 src/kclock/qml/alarm/AlarmForm.qml | 64 ++++++++++++++----------------
 1 file changed, 29 insertions(+), 35 deletions(-)

diff --git a/src/kclock/qml/alarm/AlarmForm.qml 
b/src/kclock/qml/alarm/AlarmForm.qml
index 29644d8..969ad47 100644
--- a/src/kclock/qml/alarm/AlarmForm.qml
+++ b/src/kclock/qml/alarm/AlarmForm.qml
@@ -129,30 +129,27 @@ Kirigami.FormLayout {
             }
         }
         title: i18n("Select Ring Duration")
-        model: ListModel {
-            // we can't use i18n with ListElement
-            Component.onCompleted: {
-                append({"name": i18n("None"), "value": -1});
-                append({"name": i18n("1 minute"), "value": 1});
-                append({"name": i18n("2 minutes"), "value": 2});
-                append({"name": i18n("5 minutes"), "value": 5});
-                append({"name": i18n("10 minutes"), "value": 10});
-                append({"name": i18n("15 minutes"), "value": 15});
-                append({"name": i18n("30 minutes"), "value": 30});
-                append({"name": i18n("1 hour"), "value": 60});
-            }
-        }
-        
+        model: [
+            {"name": i18n("None"), "value": -1},
+            {"name": i18n("1 minute"), "value": 1},
+            {"name": i18n("2 minutes"), "value": 2},
+            {"name": i18n("5 minutes"), "value": 5},
+            {"name": i18n("10 minutes"), "value": 10},
+            {"name": i18n("15 minutes"), "value": 15},
+            {"name": i18n("30 minutes"), "value": 30},
+            {"name": i18n("1 hour"), "value": 60}
+        ]
+
         dialogDelegate: RadioDelegate {
             implicitWidth: Kirigami.Units.gridUnit * 16
             topPadding: Kirigami.Units.smallSpacing * 2
             bottomPadding: Kirigami.Units.smallSpacing * 2
-            
-            text: name
-            checked: root.formRingDuration == value
+
+            text: modelData.name
+            checked: root.formRingDuration == modelData.value
             onCheckedChanged: {
                 if (checked) {
-                    root.formRingDuration = value;
+                    root.formRingDuration = modelData.value;
                 }
             }
         }
@@ -167,29 +164,26 @@ Kirigami.FormLayout {
         Kirigami.FormData.label: i18n("Snooze Length:")
         title: i18n("Select Snooze Length")
         text: formSnoozeDuration === 1 ? i18n("1 minute") : i18n("%1 minutes", 
formSnoozeDuration)
-        model: ListModel {
-            // we can't use i18n with ListElement
-            Component.onCompleted: {
-                append({"name": i18n("1 minute"), "value": 1});
-                append({"name": i18n("2 minutes"), "value": 2});
-                append({"name": i18n("5 minutes"), "value": 5});
-                append({"name": i18n("10 minutes"), "value": 10});
-                append({"name": i18n("15 minutes"), "value": 15});
-                append({"name": i18n("30 minutes"), "value": 30});
-                append({"name": i18n("1 hour"), "value": 60});
-            }
-        }
-        
+        model: [
+            {"name": i18n("1 minute"), "value": 1},
+            {"name": i18n("2 minutes"), "value": 2},
+            {"name": i18n("5 minutes"), "value": 5},
+            {"name": i18n("10 minutes"), "value": 10},
+            {"name": i18n("15 minutes"), "value": 15},
+            {"name": i18n("30 minutes"), "value": 30},
+            {"name": i18n("1 hour"), "value": 60},
+        ]
+
         dialogDelegate: RadioDelegate {
             implicitWidth: Kirigami.Units.gridUnit * 16
             topPadding: Kirigami.Units.smallSpacing * 2
             bottomPadding: Kirigami.Units.smallSpacing * 2
-            
-            text: name
-            checked: root.formSnoozeDuration == value
+
+            text: modelData.name
+            checked: root.formSnoozeDuration == modelData.value
             onCheckedChanged: {
                 if (checked) {
-                    root.formSnoozeDuration = value;
+                    root.formSnoozeDuration = modelData.value;
                 }
             }
         }
-- 
2.49.0

Reply via email to