Review Request: Improve QuickOpen system to sort items based on typed text
David Nolden
david.nolden.kde at art-master.de
Mon Apr 16 09:32:50 UTC 2012
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103955/#review12501
-----------------------------------------------------------
The idea is good, but this patch is too inefficient:
1. Calling QualifiedIdentifier.toString() is very expensive, and should only be done for the few items which are actually shown on screen
2. qSort over the whole list is also inefficient, because the list may be huge
Look into the code above your qSort. There, the individual components of a QualifiedIdentifier are accessed efficiently.
Corresponding to your idea, you would have to find a way to put those items which have a match at a deeper match-position 'q' higher up in the quickopen list.
If you implement this, then it will instantly also work for functions, because those have the same data provider.
However, I also see a problem:
When I type the name of a class, then I first want the class itself, and not its constructor.
- David Nolden
On April 15, 2012, 8:44 p.m., Victor Vicente Carvalho wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103955/
> -----------------------------------------------------------
>
> (Updated April 15, 2012, 8:44 p.m.)
>
>
> Review request for KDevelop.
>
>
> Description
> -------
>
> Improve QuickOpen system to sort items based on a right-to-left approach, putting items that are close to the typed text next to the first matches. This is achieved through a weighted sorter on the ProjectItemDataProvider filter.
>
>
> Diffs
> -----
>
> plugins/quickopen/projectitemquickopen.cpp 1caadffee64051a0d77d7a65a97ff86b33a78d39
>
> Diff: http://git.reviewboard.kde.org/r/103955/diff/
>
>
> Testing
> -------
>
> Ran kdevelop over several projects, no problems so far.
>
>
> Thanks,
>
> Victor Vicente Carvalho
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20120416/26754b62/attachment.html>
More information about the KDevelop-devel
mailing list