Bug 385110 - code completion adds semicolon after opening brace (function argument list)
Summary: code completion adds semicolon after opening brace (function argument list)
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Code completion (show other bugs)
Version: unspecified
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: 5.2.0
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-26 22:15 UTC by RJVB
Modified: 2017-09-28 10:20 UTC (History)
1 user (show)

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


Attachments
code completion proposition (19.70 KB, image/png)
2017-09-26 22:15 UTC, RJVB
Details
after accepting the 1st proposition (13.59 KB, image/png)
2017-09-26 22:15 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
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