Bug 255867 - file-codecompletion is confused by dots
Summary: file-codecompletion is confused by dots
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: 4.1.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 10:42 UTC by Milian Wolff
Modified: 2011-03-08 03:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2010-11-02 10:42:49 UTC
Version:           unspecified
OS:                Linux

cmake provides file-code completion in e.g. include_directories. But it can be easily confused with something like this:


Reproducible: Always

Steps to Reproduce:
set(someVar
  foo.cpp
)

- place cursor after the foo, before the dot
- request file code completion
- insert some file

Actual Results:  
set(someVar
  bar.cpp.cpp
)
(assuming you inserted bar.cpp)

Expected Results:  
set(someVar
  bar.cpp
)


something similar happens if you try to request code completion in the file extension, e.g. with the cursor somewhere in the .cpp part. It looks for files starting with cpp

The code completion model should overload some of the helper functions to add "." to the allowed chars.
Comment 1 Aleix Pol 2011-03-08 03:21:47 UTC
Git commit 189312d3faa408a8fe662e64daf9c6f8aa55b082 by Aleix Pol.
Committed on 08/03/2011 at 03:17.
Pushed by apol into branch '4.2'.

Replace the full word when completing paths.

BUG: 255867

M  +7    -3    projectmanagers/cmake/cmakecodecompletionmodel.cpp     

http://commits.kde.org/kdevelop/189312d3faa408a8fe662e64daf9c6f8aa55b082
Comment 2 Aleix Pol 2011-03-08 03:21:47 UTC
Git commit 9a4369b7609bcfac5805a289d0451db07e529c81 by Aleix Pol.
Committed on 08/03/2011 at 03:17.
Pushed by apol into branch 'master'.

Replace the full word when completing paths.

BUG: 255867

M  +7    -3    projectmanagers/cmake/cmakecodecompletionmodel.cpp     

http://commits.kde.org/kdevelop/9a4369b7609bcfac5805a289d0451db07e529c81