Review Request 118691: Change currentIndex of playlistModel to -1 when a media is not from playlist

Mark Gaiser markg85 at gmail.com
Thu Jun 12 20:42:15 UTC 2014



> On June 12, 2014, 5:54 p.m., Mark Gaiser wrote:
> > Why would you do it this way?
> > I mean, you should have a model in the C++ side and you should have a view (probably ListView). Then you can just ask the view the count: http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#count-prop i kinda miss the point of doing this via C++. But then again, i don't know the code in this project.
> 
> Ashish Madeti wrote:
>     I don't understand how 'count' is relevant here (I didn't get your point). We want to set the currentIndex (which points to the item currently playing in playlist) to -1 whenever a user plays something from other than playlist.

Ahh, sorry. I was wrong about the count property. It has nothing to do with this.
But you "could" have used the currentIndex property: http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#currentIndex-prop
But that would only work if you also use the highlight functionality in the views. In this case there should be no item highlighted which means the ListView currentIndex property is -1.

Does it make a bit more sense now? :)


- Mark


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


On June 12, 2014, 5:51 p.m., Ashish Madeti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118691/
> -----------------------------------------------------------
> 
> (Updated June 12, 2014, 5:51 p.m.)
> 
> 
> Review request for Plasma, Shantanu Tushar and Sinny Kumari.
> 
> 
> Repository: plasma-mediacenter
> 
> 
> Description
> -------
> 
> Change the currentIndex of playlistModel to -1 when a media is played from somewhere other than playlist.
> 
> 
> Diffs
> -----
> 
>   libs/mediacenter/playlistmodel.h 0de7c56 
>   libs/mediacenter/playlistmodel.cpp c5ab1ab 
>   shells/newshell/package/contents/ui/mediacenter.qml a859225 
> 
> Diff: https://git.reviewboard.kde.org/r/118691/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ashish Madeti
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140612/3a825491/attachment.html>


More information about the Plasma-devel mailing list