Bug 255867

Summary: file-codecompletion is confused by dots
Product: [Applications] kdevelop Reporter: Milian Wolff <mail>
Component: Build tools: CMakeAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: 4.1.0   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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