Alarm sound url read from a saved alarm is always empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Clock App |
Fix Released
|
High
|
Zsombor Egri | ||
Ubuntu UI Toolkit |
Fix Released
|
Critical
|
Zsombor Egri | ||
qtorganizer5-eds (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
In the clock app, I am trying to add the option to set custom sounds for an alarm. Creating a new alarm and choosing a custom sound works properly. When the alarm is triggered, it rings using the correct sound. However when you read that alarm from the alarm model and output the sound url, it is always empty. As a result, one cannot check an alarm to see what sound was assigned to it.
I have created a sample alarms app to illustrate the issue at lp:~nik90/ubuntu-clock-app/alarmtest
Steps to reproduce bug:
1. Create a new alarm by pressing the + header button
2. Set alarm to ring in the next 10-15 seconds
3. Set a custom alarm sound by choosing one in the option selector
4. Save alarm
In the main page, click on the created alarm
What happens:
The alarm sound value is empty
What should happen:
The alarm sound correctly points to the path of the chosen sound
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Cris Dywan: Approve
- Nekhelesh Ramananthan (community): Approve (testing)
-
Diff: 116 lines (+38/-4)5 files modifiedmodules/Ubuntu/Components/plugin/alarmmanager_p.h (+3/-2)
modules/Ubuntu/Components/plugin/ucalarm.cpp (+7/-0)
modules/Ubuntu/Components/plugin/ucalarm.h (+2/-0)
modules/Ubuntu/Components/plugin/ucalarm_p.h (+2/-2)
tests/unit/tst_alarms/tst_alarms.cpp (+24/-0)
description: | updated |
description: | updated |
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
Changed in ubuntu-ui-toolkit: | |
assignee: | nobody → Zsombor Egri (zsombi) |
Changed in ubuntu-ui-toolkit: | |
importance: | Undecided → Critical |
Changed in ubuntu-ui-toolkit: | |
status: | Confirmed → In Progress |
Changed in ubuntu-clock-app: | |
assignee: | nobody → Zsombor Egri (zsombi) |
status: | Triaged → In Progress |
Changed in ubuntu-clock-app: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-clock-app: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
I've debugged this a bit, and it appears the sound gets set initially from the backend but gets lost somewhere after filling in the alarms model.
So in code modules/ Ubuntu/ Components/ plugin/ ucalarmmodel. cpp refresh() Q_FOREACH(const AlarmData &data, alarms) will not have the sound anymore even if it was correctly set in modules/ Ubuntu/ Components/ plugin/ adapters/ alarmsadapter_ organizer. cpp completeFetchAlarms
It seems as if something clears the sound accidentally but I can't find what that is… nothing sets the sound other than through the property. And the other values are consistently fine.
It *may* be backend-related as the "memory" backend never loads the saved sound, wheras "eds" has the issue as described where it gets lost before the UI makes use of it.