[Merge] lp:~phablet-team/qtubuntu-media/bg-playlist-fixes into lp:qtubuntu-media/stable
Jim Hodapp
jim.hodapp at canonical.com
Fri Nov 13 14:55:22 UTC 2015
Diff comments:
>
> === modified file 'src/aal/aalmediaplaylistprovider.cpp'
> --- src/aal/aalmediaplaylistprovider.cpp 2015-10-23 15:08:10 +0000
> +++ src/aal/aalmediaplaylistprovider.cpp 2015-11-12 18:12:18 +0000
> @@ -228,6 +276,19 @@
>
> try {
> m_hubTrackList->reset();
> +
Yes it can fail, but I'd rather have some technique to roll back the early change than have to implement thread locking. My comment only applies to if we ever change the reset callback to modify the LUT, so it's nothing to worry about for right now. I merely wanted to bring this topic up in conversation.
> + // We do not wait for the TrackListReset signal to empty the lut to
> + // avoid sync problems.
> + // TODO: Do the same in other calls if possible, as these calls are
> + // considered to be synchronous, and the job can be considered finished
> + // when the DBus call returns without error. If we need some information
> + // from the signal we should block until it arrives.
> + int num_tracks = track_index_lut.size();
> + if (num_tracks > 0) {
> + track_index_lut.clear();
> + Q_EMIT mediaAboutToBeRemoved(0, num_tracks - 1);
> + Q_EMIT mediaRemoved(0, num_tracks - 1);
> + }
> }
> catch (const std::runtime_error &e) {
> qWarning() << "Failed to clear the playlist: " << e.what();
--
https://code.launchpad.net/~phablet-team/qtubuntu-media/bg-playlist-fixes/+merge/276164
Your team Ubuntu Phablet Team is subscribed to branch lp:qtubuntu-media/stable.
More information about the Ubuntu-reviews
mailing list