Bug 385110

Summary: code completion adds semicolon after opening brace (function argument list)
Product: [Applications] kdevelop Reporter: RJVB <rjvbertin>
Component: Code completionAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal CC: mail
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: 5.2.0   
Platform: Compiled Sources   
OS: macOS   
Latest Commit: Version Fixed/Implemented In: 5.2.0
Sentry Crash Report:
Attachments: code completion proposition
after accepting the 1st proposition

Description RJVB 2017-09-26 22:15:19 UTC
Created attachment 108048 [details]
code completion proposition

see the attached screenshots. Implementing requested changes in D7995 I noticed that

m_watcher->add|(info.absoluteFilePath())

(the pipe character represents the text cursor) expanded to the following after using code completion:

m_watcher->addDir(;info.absoluteFilePath())
Comment 1 RJVB 2017-09-26 22:15:43 UTC
Created attachment 108049 [details]
after accepting the 1st proposition
Comment 2 Sven Brauch 2017-09-26 23:10:55 UTC
Yes, my bad, I wanted to fix this for ages ... certainly before 5.2
Comment 3 RJVB 2017-09-27 07:45:56 UTC
Any chance this is related to the situation where you start to add "classname::" in front of a function name, you use completion and find the function name has been eaten? I don't know if that's easily avoidable but it's an annoyance I run into much more often (I'd never seen this glitch before).
Comment 4 Sven Brauch 2017-09-27 10:09:39 UTC
It's not related, this feature adds a ; behind a function call to a void function but fails not to do so when the rest of the line is not empty.
Comment 5 Sven Brauch 2017-09-28 10:07:04 UTC
Git commit fe4d43887c3ff1ea4d06c5c76b2a95612557ae20 by Sven Brauch.
Committed on 28/09/2017 at 10:06.
Pushed by brauch into branch '5.2'.

fix inserting ; when calling a void function in a non-empty line

M  +4    -2    plugins/clang/codecompletion/context.cpp

https://commits.kde.org/kdevelop/fe4d43887c3ff1ea4d06c5c76b2a95612557ae20