Review Request 111537: Hide empty folders after filtering

Albert Vaca Cintora albertvaka at gmail.com
Wed Jul 17 00:08:01 UTC 2013



> On July 17, 2013, 1:15 a.m., Milian Wolff wrote:
> > project/projectproxymodel.cpp, line 124
> > <http://git.reviewboard.kde.org/r/111537/diff/2/?file=170971#file170971line124>
> >
> >     Some kind of caching would be a good idea here I bet. This way this function will be called N times on every items for N being the depth of the item in the project tree. That doesn't sound good...
> >     
> >     You could just store something like a QHash<ProjectBaseItem*, bool> and clear it when the base model gets changed and/or when the filter changes.

I actually tried it, but I can not do it since the function is const and can not alter the instance (without a ugly cast to non-const).


- Albert


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


On July 16, 2013, 9:29 p.m., Albert Vaca Cintora wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111537/
> -----------------------------------------------------------
> 
> (Updated July 16, 2013, 9:29 p.m.)
> 
> 
> Review request for KDevelop and Aleix Pol Gonzalez.
> 
> 
> Description
> -------
> 
> Now when using the filter bar in the projects panel, the folders that contain no items matching the filter are hidden, so you don't have to manually search through all the folders to see if there are items or not. I know this is slower than the previous code, however I tried this on a big project (Qt) and the  impact on performance was unnoticeable.
> 
> 
> Diffs
> -----
> 
>   project/projectproxymodel.h df4e040 
>   project/projectproxymodel.cpp 5da4f6c 
> 
> Diff: http://git.reviewboard.kde.org/r/111537/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> 
> Thanks,
> 
> Albert Vaca Cintora
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130717/d5835941/attachment-0001.html>


More information about the KDevelop-devel mailing list