Review Request 111537: Hide empty folders after filtering

Milian Wolff mail at milianw.de
Wed Jul 17 22:11:51 UTC 2013


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.

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

Please add this feature.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130718/27d88011/attachment.sig>


More information about the KDevelop-devel mailing list