Review Request: Changes at the functionality of the delete button.

Aaron J. Seigo aseigo at kde.org
Mon Jun 20 12:01:19 CEST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101535/#review4042
-----------------------------------------------------------



projectmanager/projectmanager.cpp
<http://git.reviewboard.kde.org/r/101535/#comment3304>

    this is buggy. if confirmRemoveFromDisk is called first and then later confirmRemoveFromList is called ... m_destroyFlag will still be true and the project will not just be removed from the list, but also disk!
    
    instead, i recommend changing removeProcess to take a bool and change the name to something more accurate about the method's job, e.g.: removeProject(bool deleteFiles). then call it directly from both places, so in confirmRemoveFromList we'd get:
    
    if (KMessageBox::warningContinueCancel(this, dialogText) == KMessageBox::Continue) {
        removeProject(false);
    }
    
    and in confirmRemoveFromDisk:
    
    if (KMessageBox::warningContinueCancel(this, dialogText) == KMessageBox::Continue) {
        removeProject(true);
    }
    


- Aaron J.


On June 10, 2011, 9 p.m., Giorgos Tsiapaliwkas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101535/
> -----------------------------------------------------------
> 
> (Updated June 10, 2011, 9 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> Hello,
> 
> after a discussion with Aaron Seigo at the #plasma we decided to add a new button at the project manager which is named "Remove Project From List",which deletes the project only from the list(not from disk).The delete button was renamed to "Remove Project From Disk".Also i consider it properly to change the names of some function in order to be more relative with the buttons names.As well i changed and the functionality of confirmdeletion() in order to avoid using the same code twice.
> 
> 
> Diffs
> -----
> 
>   projectmanager/projectmanager.h 2c5bff2 
>   projectmanager/projectmanager.cpp c00fd27 
> 
> Diff: http://git.reviewboard.kde.org/r/101535/diff
> 
> 
> Testing
> -------
> 
> compiles and runs without regressions.
> tested by me.
> 
> 
> Thanks,
> 
> Giorgos
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110620/2b0bc7ed/attachment.htm 


More information about the Plasma-devel mailing list