Merge lp://qastaging/~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue into lp://qastaging/ubuntu-clock-app

Proposed by Nekhelesh Ramananthan
Status: Merged
Approved by: Nekhelesh Ramananthan
Approved revision: 348
Merged at revision: 347
Proposed branch: lp://qastaging/~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue
Merge into: lp://qastaging/ubuntu-clock-app
Prerequisite: lp://qastaging/~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://qastaging/~nik90/ubuntu-clock-app/fix-alarm-sound-race-issue
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Bartosz Kosiorek Approve
Review via email: mp+268814@code.qastaging.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.

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: Needs Fixing (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
Bartosz Kosiorek (gang65) wrote :

It is working for me correctly, except issues which I was described in chat.
I will report bugs for that issues later.

Thanks Nekhelesh.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://91.189.93.70:8080/job/ubuntu-clock-app-autolanding/296/
Executed test runs:
    FAILURE: http://91.189.93.70:8080/job/ubuntu-clock-app-vivid-amd64-autolanding/53/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches