Review Request 125117: Moved check for all mount points excluded out of widget class

Ovidiu-Florin BOGDAN ovidiu.b13 at gmail.com
Wed Sep 9 18:53:27 UTC 2015



> On Sept. 9, 2015, 9:11 p.m., Martin Klapetek wrote:
> > kcms/baloo/kcm.cpp, lines 174-177
> > <https://git.reviewboard.kde.org/r/125117/diff/1/?file=402363#file402363line174>
> >
> >     This can also stay like it was, just do
> >     
> >     return excluded.toSet() == mountPoints.toSet();
> >     
> >     ...it will return the result of that comparison.
> >     
> >     Or even 
> >     
> >     return m_excludeFolders_FSW->excludeFolders().toSet() == mountPoints.toSet();
> >     
> >     to simplify it completely.
> 
> Ovidiu-Florin BOGDAN wrote:
>     That does not simplify the code. Your last example performs too many operations in the same line. It's debugging difficulty increases with that.
>     My proposal is more obvious at what it does (especially for new readers).
>     
>     Also the compiler optimises that.
> 
> Martin Klapetek wrote:
>     Personally I disagree that it increases debugging difficulty (that's what comments are for btw) but fair enough. The QStringList excluded should still be const though (const QStringList excluded = ... )

Fixed.


- Ovidiu-Florin


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


On Sept. 9, 2015, 9:53 p.m., Ovidiu-Florin BOGDAN wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125117/
> -----------------------------------------------------------
> 
> (Updated Sept. 9, 2015, 9:53 p.m.)
> 
> 
> Review request for Baloo, Plasma and Vishesh Handa.
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> And simplified the way it searches for the mount points.
> 
> 
> Diffs
> -----
> 
>   kcms/baloo/folderselectionwidget.h 6430b60 
>   kcms/baloo/folderselectionwidget.cpp 3ad1764 
>   kcms/baloo/kcm.h 6878e89 
>   kcms/baloo/kcm.cpp d85f615 
> 
> Diff: https://git.reviewboard.kde.org/r/125117/diff/
> 
> 
> Testing
> -------
> 
> Compiled and used.
> 
> 
> Thanks,
> 
> Ovidiu-Florin BOGDAN
> 
>

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


More information about the Plasma-devel mailing list