Review Request 111537: Hide empty folders after filtering

Albert Vaca albertvaka at gmail.com
Wed Jul 17 22:35:50 UTC 2013


On Thu, Jul 18, 2013 at 12:11 AM, Milian Wolff <mail at milianw.de> wrote:

> On Wednesday 17 July 2013 00:08:01 Albert Vaca Cintora wrote:
> > > 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#file170971l
> > > > ine124>> >
> > > >     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).
>
> Why did you commit this already? Please, this is not the way to handle such
> cases. If someone gave a +1 but someone else raised issues, please first
> resolve those before commiting it.
>

I was with Aleix when I submitted this patch and we saw your comments but
we agreed on submitting this "first version" now and iterate over it. I
plan to solve the performance issue next, and not only that: for example, I
think that the root folder should be always visible even when filtering,
and I want to fix that too.

The "ugly cast" should be resolved via a mutable cache.
>

Thank you! I didn't know that keyword, and it totally solves the problem. I
will implement it this way then.


> Please add this feature.


> Cheers
> --
> Milian Wolff
> mail at milianw.de
> http://milianw.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130718/727180a4/attachment.html>


More information about the KDevelop-devel mailing list