Avoid duplicates in virtual overrides code completion proposals
ClosedPublic

Authored by kossebau on Jun 28 2017, 2:17 PM.

Details

Summary

Currently methods which have multiple overrides in the inheritance
chain are also displayed as often. Filtering these duplicates out
based on the signature improves the situation as a first step.

Test Plan

E.g. QWidget subclasses have lots of methods repeated, with this
patch no longer.
Extended unit test failed before, no longer fails with patch.

Diff Detail

Repository
R32 KDevelop
Branch
noduplicatesincodecompletion
Lint
No Linters Available
Unit
No Unit Test Coverage
kossebau created this revision.Jun 28 2017, 2:17 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptJun 28 2017, 2:17 PM
kossebau planned changes to this revision.Jun 28 2017, 2:17 PM
kossebau updated this revision to Diff 15959.Jun 28 2017, 4:35 PM
  • update to latest master
  • respect methods being parsed with order from base class to sub class
kossebau updated this revision to Diff 15960.Jun 28 2017, 4:59 PM

now with unit tests extended: fail before, no longer fail with patch

kossebau edited the test plan for this revision. (Show Details)Jun 28 2017, 5:01 PM

Examples for virtual override completion proposals by example of being triggered inside OktetaMainWindow class declaration, line
https://cgit.kde.org/okteta.git/tree/program/mainwindow.h#n47

Before:
Listing of pure virtual methods which though have been already overwritten in base classes of OktetaMainWindow, multiple listing of methods which got overridden multiple times in the inheritance chain


After:
Each virtual method only listed once, and no method wrongly shown inherited as still pure virtual

mwolff accepted this revision.Jun 28 2017, 9:34 PM
mwolff added a subscriber: mwolff.

lgtm, thanks!

This revision is now accepted and ready to land.Jun 28 2017, 9:34 PM
mwolff added inline comments.Jun 28 2017, 9:36 PM
languages/clang/tests/test_codecompletion.cpp
564 ↗(On Diff #15960)

this should be override, no?

565 ↗(On Diff #15960)

second should be override

575 ↗(On Diff #15960)

dito

576 ↗(On Diff #15960)

dito

kossebau marked 4 inline comments as done.Jun 28 2017, 9:55 PM

Thanks for review!

languages/clang/tests/test_codecompletion.cpp
564 ↗(On Diff #15960)

Yes. Copy-paste of same error already in "deep" data above, will fix as separate commit.

This revision was automatically updated to reflect the committed changes.
kossebau marked an inline comment as done.