Review Request 116640: Fix for "Bug 331798 - Wrong media shown as current media in playlist after reordering"

Shantanu Tushar shantanu at kde.org
Fri Mar 7 12:23:15 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116640/#review52339
-----------------------------------------------------------


See comments in the code. In a nutshell, the logic of calculating what is playing currently should *not* be taken outside the PlaylistModel C++ code. This is a decision and change we did very recently and so its a good chance you fix the reordering as well. Just make sure that in the end the actual reordering is done in the model, not in the view.


libs/mediacenter/playlistmodel.h
<https://git.reviewboard.kde.org/r/116640/#comment37056>

    The currentIndex is supposed to be managed by the playlist model as it is the only entity supposed to know what is playing currently. So this should not be Q_INVOKABLE.



mediaelements/playlist/PlaylistDelegateLogic.js
<https://git.reviewboard.kde.org/r/116640/#comment37057>

    Instead of explicitly setting the current index, try adding a method to the playlistModel which will actually move the items and set currentIndex accordingly.


- Shantanu Tushar


On March 7, 2014, 9:12 a.m., Ashish Madeti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116640/
> -----------------------------------------------------------
> 
> (Updated March 7, 2014, 9:12 a.m.)
> 
> 
> Review request for Plasma, Shantanu Tushar and Sinny Kumari.
> 
> 
> Bugs: 331798
>     http://bugs.kde.org/show_bug.cgi?id=331798
> 
> 
> Repository: plasma-mediacenter
> 
> 
> Description
> -------
> 
> Patch for Bug 331798 : Playlist shows the wrong song as "now playing" (in red color) in some cases of reordering the playlist.
> 
> 
> Diffs
> -----
> 
>   libs/mediacenter/playlistmodel.h cb88c6c 
>   mediaelements/playlist/Playlist.qml d578720 
>   mediaelements/playlist/PlaylistDelegate.qml a5f6ebb 
>   mediaelements/playlist/PlaylistDelegateLogic.js e69de29 
> 
> Diff: https://git.reviewboard.kde.org/r/116640/diff/
> 
> 
> Testing
> -------
> 
> 1.Moved a song with index less than the currently playing media to some place below the currently playing media.
> 2.Moved a song with index greater than the currently playing media to some place above the currently playing media.
> 3.Moved the currently playing media to various places in the playlist.
> 
> In all the cases correct song is now showed as Now Playing i.e in "red" color.
> 
> 
> Thanks,
> 
> Ashish Madeti
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140307/2d627215/attachment-0001.html>


More information about the Plasma-devel mailing list