Bug 316915

Summary: Lookahead completion offers too many results for bool-returning functions
Product: [Applications] kdevelop Reporter: Milian Wolff <mail>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED WORKSFORME    
Severity: normal CC: olivier.jg
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot showing the issue

Description Milian Wolff 2013-03-17 16:09:25 UTC
This is a case I've hit quite a few times and was annoyed by it. The lookahead code completion offers far too many items here. Also, they are not sorted by conversion order, i.e. the methods of QString that return a bool (or QBool) are not preferred over those that return an int. Additionally, it also offers items that return an iterator which you will never want to convert to bool (can you even?).

Reproducible: Always

Steps to Reproduce:
#include <QString>

struct a
{
  QString s;
  bool foo()
  {
    return // request completion here
  }
};

Actual Results:  
See attached screenshot.

Expected Results:  
- bool-returning functions of QString at the top
- don't show more than N items
- never show iterator-returning functions of QString
- never show QByteArray returning functions of QString
Comment 1 Milian Wolff 2013-03-17 16:10:23 UTC
Created attachment 78133 [details]
screenshot showing the issue
Comment 2 Olivier.jg 2013-03-17 20:59:15 UTC
Certainly, this sucks, but I think this should be two different reports. One for the issues with KDevelop's type matching functionality, and one for the lookahead specific issues.

QString is the poster child for what's wrong with lookahead completion, but it's actually also the only place where it bothers me, probably because it has a bunch of QString members which match when I'm actually trying to match the declaration itself. So I'd like to start with not showing any lookahead matches for declarations which already match the needed type.

Obviously this is still just another way to use KDevelop's git master users as guinea pigs, so we should disable it for 4.5 for sure.
Comment 3 Andrew Crouthamel 2018-11-11 04:35:06 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-11-21 04:19:47 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Justin Zobel 2023-01-02 07:43:35 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 6 Bug Janitor Service 2023-01-17 05:15:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2023-02-01 05:04:58 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!