Summary: | Function "Adapt signature" doesn't work correct (renaming argument) for constructor of class | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Piotr Mierzwinski <piotr.mierzwinski> |
Component: | Language Support: CPP (Clang-based) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | piotr.mierzwinski, stasnel |
Priority: | NOR | Keywords: | release_blocker |
Version: | git master | ||
Target Milestone: | 5.0.0 | ||
Platform: | Mageia RPMs | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/95e7dd4e07adcd3cd29a2d998fb4076b80746c11 | Version Fixed In: | |
Attachments: | Simple C++ project containing only one class with one constructor |
Description
Piotr Mierzwinski
2015-11-14 21:49:17 UTC
Created attachment 95504 [details]
Simple C++ project containing only one class with one constructor
Haven't tried this explicit example, but I've seen odd behavior of the signature assistant myself. Regarding the syntax formatting: Have you configured that properly? KDevelop settings -> Source Formatter. There, use e.g. astyle and configure it to your likings. It should then be used by the assistants. If not, open a new bug report for that please. Git commit 95e7dd4e07adcd3cd29a2d998fb4076b80746c11 by Milian Wolff. Committed on 30/01/2016 at 15:51. Pushed by mwolff into branch '5.0'. Do not add return type to constructors in signature assistant. M +6 -4 languages/clang/codegen/adaptsignatureaction.cpp M +11 -3 languages/clang/codegen/adaptsignatureassistant.cpp M +8 -0 languages/clang/tests/test_assistants.cpp http://commits.kde.org/kdevelop/95e7dd4e07adcd3cd29a2d998fb4076b80746c11 @ Piotr: Regarding the whitespace changes, when you have setup the source formatter, it should use the correct style. If that is not the case, please report a new bug for that. Thanks @Milian: Yes. Some times ago I configured "Source formatter" with my own formatter. You mentioned me about this when I reported different bug. I found some bug related with this function and soon I'm going to report it. And BTW. I'm not sure if this is correct approach to use "Source formatter" in functions: "Adapt signature" or/and "Update declaration signature". Here I was confused, because I thought that "Source formatter" is used only in options: "Edit->Reformat source" and "Edit->Reformat line" :-/. What if I would like to have different formatting in header of function declaration and different in code (body of function). For example I would like to format default parameter in header of function declaration like this: "void foo( bool param=true)", and in body of function I like such format: "bool localParam = false". As you can see padding is different in both places. Now when I use option: "Edit->Reformat source" then one of them will be broken :-(. In this moment I have to use same formatting every where. I like such format: "void foo( bool param=true)", because this takes less space in row. This if of course is not problem when I have wide monitor or break line on every parameter. |