I rename argument in constructor definition (cpp file). After choosing "Update declaration signature" in "Adapt Signature" helper I get constructor as void type in declaration (header). There is code cpp file: MyClass::MyClass( int *pointer, const QString &string ) { } header file: MyClass( int *pointer, const QString &string ); For example I rename string to string2 and chose "Update declaration signature" in "Adapt Signature". Reproducible: Always Steps to Reproduce: 1. Rename one of parameter in constructor 2. Choose "Update declaration signature" in "Adapt Signature" 3. Check header file Actual Results: MyClass::MyClass( int *pointer, const QString &string2 ) { } header file: void MyClass ( int *pointer, const QString &string2 ); Expected Results: MyClass::MyClass( int *pointer, const QString &string2 ) { } header file: MyClass ( int *pointer, const QString &string ); KDevelop and KDevPlatform cloned and built from branch 5.0, at 08-07-2016 Plasma 5.7.0, KFrameworks 5.23, Qt-5.7
*** Bug 375276 has been marked as a duplicate of this bug. ***
I tested this in KDevelop 5.0.4 and bug still persists.
Git commit e334d754bf510bdf21368858d8494adf3622fb16 by Milian Wolff, on behalf of Shashwat Dixit. Committed on 15/03/2018 at 10:40. Pushed by mwolff into branch 'master'. Do not add return type to constructors declaration when editing definition in signature assistant. Reviewers: kfunk, mwolff, #kdevelop, brauch Reviewed By: mwolff, #kdevelop, brauch Subscribers: brauch, apol, #kdevelop, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D11291 M +1 -1 plugins/clang/codegen/adaptsignatureassistant.cpp M +8 -0 plugins/clang/tests/test_assistants.cpp https://commits.kde.org/kdevelop/e334d754bf510bdf21368858d8494adf3622fb16
Git commit 3f99e3deefbe3b77ba023bf09b69d8da3ca815fc by Kevin Funk, on behalf of Shashwat Dixit. Committed on 15/03/2018 at 18:39. Pushed by kfunk into branch '5.2'. Do not add return type to constructors declaration when editing definition in signature assistant. Reviewers: kfunk, mwolff, #kdevelop, brauch Reviewed By: mwolff, #kdevelop, brauch Subscribers: brauch, apol, #kdevelop, kdevelop-devel Tags: #kdevelop Differential Revision: https://phabricator.kde.org/D11291 (cherry picked from commit e334d754bf510bdf21368858d8494adf3622fb16) M +1 -1 plugins/clang/codegen/adaptsignatureassistant.cpp M +8 -0 plugins/clang/tests/test_assistants.cpp https://commits.kde.org/kdevelop/3f99e3deefbe3b77ba023bf09b69d8da3ca815fc
*** Bug 375277 has been marked as a duplicate of this bug. ***
Either I found new case when constructor is broken by inserting void on its begin or this is just regression. Initial code looks like below: Header file (myclass.h): public: MyClass(); cpp file (myclass.cpp): MyClass::MyClass() { // some code } Steps to reproduce: 1. instead of "// some code" in definition of constructor put code like below: if (bParam) ; 2. copy to clipboard string like: "bool bParam" 3. paste copied string as parameter for constructor in cpp file. After that definition will look like this: MyClass::MyClass( bool bParam ) 4. Click on end above line, KDevelop will show two solutions, suggesting how to fix the code 5. Click into the first one and after click into the second one 6. Switch to header file CURRENT RESULT: public: void MyClass( bool bParam ); EXPECTED RESULT: public: MyClass( bool bParam );