Merge lp:~nik90/ubuntu-clock-app/fix-alarm-crash into lp:ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 212
Merged at revision: 216
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-alarm-crash
Merge into: lp:ubuntu-clock-app
Diff against target: 139 lines (+11/-21)
4 files modified
app/alarm/AlarmList.qml (+1/-1)
app/alarm/EditAlarmPage.qml (+0/-11)
debian/changelog (+1/-0)
po/com.ubuntu.clock.pot (+9/-9)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-alarm-crash
Reviewer Review Type Date Requested Status
Zsombor Egri (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Clock Developers Pending
Review via email: mp+252150@code.launchpad.net

Commit message

Fixed clock app crashing while trying to edit an alarm on vivid.

Description of the change

Fixed clock app crashing while trying to edit an alarm on vivid.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Small comments inline, you can think of applying that right away or in a new MR.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

> Small comments inline, you can think of applying that right away or in a new
> MR.

It is not that simple to change the EditAlarmPage.qml to using just one alarm object without changing quite a bit of code. I tried it during the weekend and it led to clock app crashing even more using the alarm memory manager. I will give it another proper try in another MR.

Revision history for this message
Zsombor Egri (zsombi) wrote :

Ok, then do the "beautifying" in a separate one.

review: Approve
Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :

Thnx for the review zsombor.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/alarm/AlarmList.qml'
2--- app/alarm/AlarmList.qml 2014-10-11 18:56:01 +0000
3+++ app/alarm/AlarmList.qml 2015-03-06 17:13:42 +0000
4@@ -129,7 +129,7 @@
5
6 else {
7 pageStack.push(Qt.resolvedUrl("EditAlarmPage.qml"),
8- {isNewAlarm: false, alarmIndex: index, alarmModel: alarmModel})
9+ {isNewAlarm: false, tempAlarm: model})
10 }
11 }
12
13
14=== modified file 'app/alarm/EditAlarmPage.qml'
15--- app/alarm/EditAlarmPage.qml 2015-01-22 00:11:57 +0000
16+++ app/alarm/EditAlarmPage.qml 2015-03-06 17:13:42 +0000
17@@ -31,15 +31,9 @@
18 // Property to determine if this is a new/saved alarm
19 property bool isNewAlarm: true
20
21- // Property to store the index of the alarm to be edited
22- property int alarmIndex
23-
24 // Temporary alarm used to read saved alarm and modify them
25 property var tempAlarm
26
27- // Property to store the alarm model
28- property var alarmModel
29-
30 title: isNewAlarm ? i18n.tr("New alarm") : i18n.tr("Edit alarm")
31 visible: false
32
33@@ -82,8 +76,6 @@
34
35 // Function to read a saved alarm
36 function readAlarm() {
37- tempAlarm = alarmModel.get(alarmIndex)
38-
39 _alarm.message = tempAlarm.message
40 _alarm.type = tempAlarm.type
41 _alarm.daysOfWeek = tempAlarm.daysOfWeek
42@@ -94,7 +86,6 @@
43
44 // Function to delete a saved alarm
45 function deleteAlarm() {
46- tempAlarm = alarmModel.get(alarmIndex)
47 tempAlarm.cancel()
48
49 if(validateAlarm(tempAlarm)) {
50@@ -104,8 +95,6 @@
51
52 // Function to update a saved alarm
53 function updateAlarm() {
54- tempAlarm = alarmModel.get(alarmIndex)
55-
56 var alarmTime = new Date()
57 alarmTime.setHours(_timePicker.hours, _timePicker.minutes, 0)
58
59
60=== modified file 'debian/changelog'
61--- debian/changelog 2015-03-06 11:33:03 +0000
62+++ debian/changelog 2015-03-06 17:13:42 +0000
63@@ -10,6 +10,7 @@
64 * Fixed predefined cities and countries not being translatable in the timezone
65 selection dialog (LP: #1354466)
66 * Fixed empty state description not wrapping (LP: #1428165)
67+ * Fixed edit alarm crash issue in vivid (thanks to Zsombor)
68
69 [Brendan Donegan]
70 * Fixed AP failure by waiting for the bottom edge tip visible property to be true
71
72=== modified file 'po/com.ubuntu.clock.pot'
73--- po/com.ubuntu.clock.pot 2015-03-06 10:54:21 +0000
74+++ po/com.ubuntu.clock.pot 2015-03-06 17:13:42 +0000
75@@ -8,7 +8,7 @@
76 msgstr ""
77 "Project-Id-Version: \n"
78 "Report-Msgid-Bugs-To: \n"
79-"POT-Creation-Date: 2015-03-06 11:52+0100\n"
80+"POT-Creation-Date: 2015-03-06 17:09+0000\n"
81 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
82 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
83 "Language-Team: LANGUAGE <LL@li.org>\n"
84@@ -18,7 +18,7 @@
85 "Content-Transfer-Encoding: 8bit\n"
86
87 #: ../app/alarm/AlarmLabel.qml:30 ../app/alarm/AlarmLabel.qml:56
88-#: ../app/alarm/EditAlarmPage.qml:302
89+#: ../app/alarm/EditAlarmPage.qml:291
90 msgid "Label"
91 msgstr ""
92
93@@ -31,8 +31,8 @@
94 msgid "Alarms"
95 msgstr ""
96
97-#: ../app/alarm/AlarmPage.qml:43 ../app/alarm/EditAlarmPage.qml:50
98-#: ../app/alarm/EditAlarmPage.qml:177
99+#: ../app/alarm/AlarmPage.qml:43 ../app/alarm/EditAlarmPage.qml:44
100+#: ../app/alarm/EditAlarmPage.qml:166
101 msgid "Alarm"
102 msgstr ""
103
104@@ -56,7 +56,7 @@
105 msgid "Tap the + icon to add an alarm"
106 msgstr ""
107
108-#: ../app/alarm/AlarmRepeat.qml:34 ../app/alarm/EditAlarmPage.qml:292
109+#: ../app/alarm/AlarmRepeat.qml:34 ../app/alarm/EditAlarmPage.qml:281
110 msgid "Repeat"
111 msgstr ""
112
113@@ -94,7 +94,7 @@
114 msgid "Change time and date"
115 msgstr ""
116
117-#: ../app/alarm/AlarmSound.qml:28 ../app/alarm/EditAlarmPage.qml:315
118+#: ../app/alarm/AlarmSound.qml:28 ../app/alarm/EditAlarmPage.qml:304
119 msgid "Sound"
120 msgstr ""
121
122@@ -142,15 +142,15 @@
123 msgid "in %1m"
124 msgstr ""
125
126-#: ../app/alarm/EditAlarmPage.qml:43
127+#: ../app/alarm/EditAlarmPage.qml:37
128 msgid "New alarm"
129 msgstr ""
130
131-#: ../app/alarm/EditAlarmPage.qml:43
132+#: ../app/alarm/EditAlarmPage.qml:37
133 msgid "Edit alarm"
134 msgstr ""
135
136-#: ../app/alarm/EditAlarmPage.qml:336
137+#: ../app/alarm/EditAlarmPage.qml:325
138 msgid "Delete alarm"
139 msgstr ""
140

Subscribers

People subscribed via source and target branches