Bug 376461 - include files with dash (-) are not completed properly
Summary: include files with dash (-) are not completed properly
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.0.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-13 22:50 UTC by Rafał Malinowski
Modified: 2022-11-30 05:16 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafał Malinowski 2017-02-13 22:50:33 UTC
To reproduce:
1. add a new file names include-with-dash.h to your random C or C++ project
2. start writing #include "include
3. observe autocomplete dialog with include-with-dash.h file listed
4. add - to your include (so it is now #include "include)
5. observer autocomplete dialog no longer lists include-with-dash.h file
Comment 1 Milian Wolff 2017-02-20 23:01:30 UTC
Git commit fcba3835397bf1c830e56a0c7487c5c1ac329b40 by Milian Wolff.
Committed on 20/02/2017 at 23:01.
Pushed by mwolff into branch 'master'.

Improve code completion of paths with dashes in their name

The model simply aborted code completion too soon, as it thought
that the dash stops a word. But when we do include-path completion
we actually want to not do that.

This patch implements that by reusing our existing include path
parser and then overwrites the corresponding model functions.

Note that the code completion box still "hides" after writing the
first "-", which I have not yet figured out why. Manual code
completion works in this case now, though. In general, this patch
improves quite a few things already so I'm pushing this early.

M  +6    -21   languages/clang/codecompletion/includepathcompletioncontext.cpp
M  +18   -0    languages/clang/codecompletion/includepathcompletioncontext.h
M  +32   -15   languages/clang/codecompletion/model.cpp
M  +4    -0    languages/clang/codecompletion/model.h
M  +14   -1    languages/clang/tests/test_codecompletion.cpp

https://commits.kde.org/kdevelop/fcba3835397bf1c830e56a0c7487c5c1ac329b40
Comment 2 Justin Zobel 2022-10-31 04:31:53 UTC
Thank you for reporting this bug 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 3 Bug Janitor Service 2022-11-15 05:15:15 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 4 Bug Janitor Service 2022-11-30 05:16:45 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!