Bug 319404 - Option to show sorted functions list in Outline
Summary: Option to show sorted functions list in Outline
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 4.4.1
Platform: Other All
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL: https://phabricator.kde.org/D3673
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2013-05-06 08:21 UTC by michele.dipede
Modified: 2017-01-06 08:38 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description michele.dipede 2013-05-06 08:21:56 UTC
Please add an option to sort functions list. This feature is present in other IDE like QtCreator and is usefull when handling shared project with tons of functions definition per file.

Reproducible: Always
Comment 1 Sahil Sareen 2014-08-08 15:18:51 UTC
Is it ok if I take it up?
Will need some mentoring though.
Comment 2 Sahil Sareen 2014-08-08 15:20:16 UTC
I didn't get what you exactly mean by sorting a functions list.

(In reply to michele.dipede from comment #0)
> Please add an option to sort functions list. This feature is present in
> other IDE like QtCreator and is usefull when handling shared project with
> tons of functions definition per file.
> 
> Reproducible: Always
Comment 3 Christoph Feck 2014-08-16 13:24:43 UTC
Assume alphabetically. If another sort criteria is requested by the reporter, it could be changed later.
Comment 4 Sahil Sareen 2014-08-18 08:29:22 UTC
Do you mean the auto-completion of functions here?

Like if functions funct1(), funct2(), funct3(), and funct4() exist.
and the user types fun
then he should see funct1, funct2, funct3, funct4 as a dropdown?

Also if you could point out to some code. It would help me know where to start.
I am using emacs and went through the KDE newbie guide.

(In reply to Christoph Feck from comment #3)
> Assume alphabetically. If another sort criteria is requested by the
> reporter, it could be changed later.
Comment 5 mehak.goyal 2016-07-18 15:38:55 UTC
Hey! I am new to KDE and want to solve this bug. Can one provide me with the link to the source code?
Comment 6 Kevin Funk 2016-07-18 16:51:16 UTC
Hey Mehak, please check out https://community.kde.org/KDevelop/HowToCompile_v5 for instructions.
Comment 7 Kevin Funk 2016-07-18 16:51:50 UTC
For all follow-up questions, please use the mailing list. You can find more information here: https://www.kdevelop.org/contribute-kdevelop
Comment 8 Alexander Zaitsev 2016-08-27 10:39:53 UTC
Maybe i something don't underestand, but now in Kdevelop in completion all is sorted(). What is wrong?
Comment 9 Alexander Zaitsev 2016-08-28 09:35:32 UTC
(In reply to Alexander Zaitsev from comment #8)
> Maybe i something don't underestand, but now in Kdevelop in completion all
> is sorted(). What is wrong?

I understand. In function browser we have list of unsorted functions.
Comment 10 Nilesh Sah 2016-12-05 06:19:50 UTC
Is the bug still open for patch submission?
Comment 11 Kevin Funk 2016-12-05 08:12:45 UTC
@Nilesh: Yes. Relevant code is in kdevplatform.git:plugins/quickopen/quickopenplugin.cpp (search for "CreateOutlineDialog", we probably need to wrap the source model with a QSortFilterProxyModel)
Comment 12 Nilesh Sah 2016-12-05 09:20:19 UTC
@Kevin: Thanks for the update.
I'm starting to work on it then, will keep you updated about the progress.
Comment 13 Kevin Funk 2016-12-05 10:35:43 UTC
Thanks.

For all follow-up questions, please use the mailing list and/or join #kdevelop on IRC. You can find more information here: https://www.kdevelop.org/contribute-kdevelop
Comment 14 Kevin Funk 2017-01-06 08:38:56 UTC
Git commit 4f3e1fbbc5d96d7cbb924c57068a563ec75ca2a2 by Kevin Funk.
Committed on 06/01/2017 at 08:38.
Pushed by kfunk into branch 'master'.

Outline: Sorted function list

Summary:
-> As suggested by Kevin, wrapped the existing QuickOpenModel with the QSortFilterProxyModel to produce a sorted list of functions in the Outline drop down menu.
-> Converted the indexes from the Proxy Model to the Source Model and vice-versa  where ever necessary.
->  Analyzed the use cases of the Outline menu, and modified all it's functionalities and features corresponding to the Proxy Model.

Test Plan:
-> Tested the working of the Outline and QuickOpen menu on a large project base.
-> Tested for the smooth functioning of widget expansion, both complete and partial.
-> Tested for Double Click, Single Click, Key Press, and other events.
FIXED-IN: 5.2.0

Reviewers: brauch, #kdevelop, nellex

Reviewed By: brauch, #kdevelop

Subscribers: kdevelop-devel, brauch, #kdevelop

Tags: #kdevelop

Differential Revision: https://phabricator.kde.org/D3673

M  +21   -14   plugins/quickopen/expandingtree/expandingdelegate.cpp
M  +7    -4    plugins/quickopen/expandingtree/expandingtree.cpp
M  +52   -16   plugins/quickopen/expandingtree/expandingwidgetmodel.cpp
M  +15   -3    plugins/quickopen/expandingtree/expandingwidgetmodel.h
M  +6    -3    plugins/quickopen/quickopenmodel.cpp
M  +1    -0    plugins/quickopen/quickopenplugin.cpp
M  +49   -17   plugins/quickopen/quickopenwidget.cpp
M  +6    -0    plugins/quickopen/quickopenwidget.h

https://commits.kde.org/kdevplatform/4f3e1fbbc5d96d7cbb924c57068a563ec75ca2a2