Merge lp:~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue into lp:ubuntu-clock-app
Status: | Merged |
---|---|
Approved by: | Nekhelesh Ramananthan |
Approved revision: | 348 |
Merged at revision: | 347 |
Proposed branch: | lp:~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue |
Merge into: | lp:ubuntu-clock-app |
Prerequisite: | lp:~nik90/ubuntu-clock-app/default-alarm-sound-backwards-compatibility |
Diff against target: |
69 lines (+23/-17) 1 file modified
app/alarm/EditAlarmPage.qml (+23/-17) |
To merge this branch: | bzr merge lp:~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Bartosz Kosiorek | Approve | ||
Review via email: mp+268814@code.launchpad.net |
Commit message
Fixes race issue in the edit alarm page caused due to the QML FolderListModel resulting in incorrect alarm sound names sometimes being shown.
Description of the change
In trunk, there is a race issue involved due the 2 QML FolderListModels defaultSoundModel and customSoundModel. The reason it happens is because QML FolderListModel does not have a signal to indicate that it has finished loading. The onComplete() signal is useless here since after it has completed, the count variable still takes another few ms to update.
So some of the file checks we do for custom alarm sound like checking the existence of the file is done *before* the 2 FolderListModels have fully loaded thereby providing incorrect results sometimes.
I have introduced a Timer which introduces a delay of 250ms to ensure that the FolderListModels have fully loaded before performing the file checks.
This seems to have solved the issue.
FAILED: Continuous integration, rev:347 91.189. 93.70:8080/ job/ubuntu- clock-app- ci/795/ 91.189. 93.70:8080/ job/ubuntu- clock-app- vivid-amd64- ci/140/ console
http://
Executed test runs:
FAILURE: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- clock-app- ci/795/ rebuild
http://