Review Request 116824: Implementation of Single time addition on multiple clicks of the Play All button

Harshit Agarwal see.harshit at gmail.com
Sat Mar 15 20:08:19 UTC 2014



> On March 15, 2014, 7:43 p.m., Shantanu Tushar wrote:
> > In general I don't see why N clicks of a button won't repeat the action N times, sounds very logical to me. So not sure if it needs "fixing".

Agreed, but PlayAll should be a single click feature right?
Either we deactivate the button after a single click.


> On March 15, 2014, 7:43 p.m., Shantanu Tushar wrote:
> > browsingbackends/localfiles/localfilesabstractbackend.cpp, line 153
> > <https://git.reviewboard.kde.org/r/116824/diff/1/?file=254233#file254233line153>
> >
> >     Where is model1 set? I don't see it being assigned any value ever.

I'm actually assigning the current model value to model1 when the playAll button would be clicked. Since it is a global var, it would store the value of the previous model. And hence, when the next time a new call is initiated, it first checks with the previous model element, if the values are different, then only it adds the media to the playlist.

Initially, i didn't assign any value to it, so the condition becomes true by default and the first click of the PlayAll button would always add the media


- Harshit


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


On March 15, 2014, 6:58 p.m., Harshit Agarwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116824/
> -----------------------------------------------------------
> 
> (Updated March 15, 2014, 6:58 p.m.)
> 
> 
> Review request for Plasma, Akshay Ratan, Shantanu Tushar, Sinny Kumari, and Sujith Haridasan.
> 
> 
> Repository: plasma-mediacenter
> 
> 
> Description
> -------
> 
> The "Play All" button when clicked multiple times, was adding all the media multiple times onto the playlist. This is resolved, and now it adds the media only single time if the button is clicked multiple times.
> 
> 
> Diffs
> -----
> 
>   browsingbackends/metadatabackends/metadatamusicbackend/metadatamusicbackend.cpp 8aaddcc 
>   browsingbackends/localfiles/localfilesabstractbackend.cpp faaafa7 
> 
> Diff: https://git.reviewboard.kde.org/r/116824/diff/
> 
> 
> Testing
> -------
> 
> It has been tested with the local files in Music as well as the Videos section. Patch found to be consistent.
> 
> 
> Thanks,
> 
> Harshit Agarwal
> 
>

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


More information about the Plasma-devel mailing list