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

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 362
Merged at revision: 359
Proposed branch: lp:~nik90/ubuntu-clock-app/fix-alarm-list-refresh
Merge into: lp:ubuntu-clock-app
Diff against target: 51 lines (+5/-5)
3 files modified
app/alarm/AlarmList.qml (+1/-1)
app/alarm/EditAlarmPage.qml (+3/-4)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~nik90/ubuntu-clock-app/fix-alarm-list-refresh
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+269047@code.launchpad.net

Commit message

Refresh alarmModel when the alarm being edited is saved to ensure that the listview shows updated labels.

Description of the change

Refresh alarmModel when the alarm being edited is saved to ensure that the listview shows updated labels.

To post a comment you must log in.
361. By Nekhelesh Ramananthan

Minor changelog typo fixed

362. By Nekhelesh Ramananthan

Revert making variable readonly

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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks good, and right way to refresh the list.

review: Approve

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 2015-08-12 14:24:08 +0000
3+++ app/alarm/AlarmList.qml 2015-08-25 11:39:26 +0000
4@@ -71,7 +71,7 @@
5 if (selectMode) {
6 selected = !selected
7 } else {
8- pageStack.push(Qt.resolvedUrl("EditAlarmPage.qml"), {isNewAlarm: false, tempAlarm: model})
9+ pageStack.push(Qt.resolvedUrl("EditAlarmPage.qml"), {isNewAlarm: false, tempAlarm: model, alarmModel: alarmModel})
10 }
11 }
12
13
14=== modified file 'app/alarm/EditAlarmPage.qml'
15--- app/alarm/EditAlarmPage.qml 2015-08-24 16:30:33 +0000
16+++ app/alarm/EditAlarmPage.qml 2015-08-25 11:39:26 +0000
17@@ -28,12 +28,10 @@
18 id: _addAlarmPage
19 objectName: "AddAlarmPage"
20
21- // Property to determine if this is a new/saved alarm
22+ property var alarmModel
23+ property var tempAlarm
24 property bool isNewAlarm: true
25
26- // Temporary alarm used to read saved alarm and modify them
27- property var tempAlarm
28-
29 title: isNewAlarm ? i18n.tr("New alarm") : i18n.tr("Edit alarm")
30 visible: false
31
32@@ -112,6 +110,7 @@
33
34 if(validateAlarm(tempAlarm)) {
35 pageStack.pop()
36+ alarmModel.refresh()
37 }
38 }
39
40
41=== modified file 'debian/changelog'
42--- debian/changelog 2015-08-23 13:25:17 +0000
43+++ debian/changelog 2015-08-25 11:39:26 +0000
44@@ -28,6 +28,7 @@
45 * Fixed alarm sound preview not playing when pressing on the checkbox (LP: #1487690)
46 * Fixed edited alarm not being saveable if at any point of editing the alarm
47 clock app loses focus (LP: #1487789)
48+ * Fixed edited alarms when saved not updating the alarms listview (LP: #1488439)
49
50 [Victor Thompson]
51 * Show all README files in QtCreator

Subscribers

People subscribed via source and target branches