Bug 383570

Summary: 'New From Template' (C++ Basic Basic) generates files with empty name of constructor and destructor
Product: [Applications] kdevelop Reporter: Piotr Mierzwinski <piotr.mierzwinski>
Component: file createAssignee: kdevelop-bugs-null
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: kossebau, piotr.mierzwinski
Priority: NOR    
Version First Reported In: 5.1.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Piotr Mierzwinski 2017-08-15 17:29:44 UTC
In Override Methods I selected constructor, destructor and couple methods from overriding class. After generating file I get empty name of constructor, destructor in header file and also cpp file. 

Steps:
1. File -> "New From Template"
2. In "Language and Template" selected: C++  Basic  Basic  (Language, Framework, Template accordingly) and pressed Next
3. In "Class Basic" I put MyNewClass (in Identifier) and QAbstractItemModel (in Inheritance) and pressed Next
4. In "Override Methods" I checked "void MyNewClass()", "void ~MyNewClass()" and couple methods from QAbstractItemModel class and pressed Next
BTW. Type "void" put before constructor, destructor is as I suppose bug. Maybe this is also related with putting "void" after using completion of code for constructor.
5. In "Class Members" I put my member like: "int myMember;"

Result for header file:
public:
    void ();
    void ();

(declarations for all selected override methods)

Missing member added in "Class Members" dialog: "int myMember;"


Result for cpp file:
void MyNewClass::()
{

}

void MyNewClass::()
{

}

(definitions for all selected override methods)

Expected result (header file):
public:
    MyNewClass ();
    ~MyNewClass ();

(declarations for all selected override methods)

private:
    int myMember;


Expected result (cpp file):
void MyNewClass::MyNewClass()
{

}

void MyNewClass::MyNewClass()
{

}

(definitions for all selected override methods)
Comment 1 Piotr Mierzwinski 2017-08-15 17:32:53 UTC
Expected result (cpp file):
MyNewClass::MyNewClass()
{

}

MyNewClass::MyNewClass()
{

}
Comment 2 Piotr Mierzwinski 2017-08-15 17:33:25 UTC
Expected result (cpp file):
MyNewClass::MyNewClass()
{

}

MyNewClass::~MyNewClass()
{

}
Comment 3 Justin Zobel 2022-11-08 06:50:04 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-23 05:14:42 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Piotr Mierzwinski 2022-11-30 18:47:35 UTC
Functionality of "New From Template"  has been limited and I wasn't  able to reproduce this issue. The path what I went doesn't exists in current KDevelop. Current path finishes on selecting Version Control and is missing selecting the class by what application will inherit and Override Methods. 
Current functionality of "New From Template" seems to work correctly.

Example similar path path:
Qt -> Graphical -> CMake Qt5 - C++

Tested with
KDevelop version 5.9.221170 (22.11.70)

$ apt show kdevelop
Package: kdevelop
Version: 4:22.08.1+p22.04+tunstable+git20221012.0016-0

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.26.80
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-53-generic (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa IntelĀ® Xe Graphics