Bug 409732

Summary: Renaming a class does not rename constructor/destructor
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 2.28.3 (KDE Applications 19.04.3)   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 2.28.80 (KDE Applications 19.07.80)
Sentry Crash Report:

Description Ralf Habacker 2019-07-11 22:44:11 UTC
STEPS TO REPRODUCE
1. start umbrello
2. add a class
3. add a constructor and destructor
4. rename class

OBSERVED RESULT
The constructor and destructor is not renamed


EXPECTED RESULT
constructor(s) and destructor should be renamed after renaming the class

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Ralf Habacker 2019-07-12 21:13:29 UTC
Git commit 7e5bb60355b8728d207c64303855a8d8e51f9a9f by Ralf Habacker.
Committed on 12/07/2019 at 21:12.
Pushed by habacker into branch 'master'.

Fix 'Renaming a class does not rename constructor/destructor'

With this commit, UMLObject::setNameCmd() is now a virtual function to
allow overriding.
FIXED-IN:2.28.80 (KDE Applications 19.07.80)

M  +19   -0    umbrello/uml1model/classifier.cpp
M  +2    -0    umbrello/uml1model/classifier.h
M  +1    -1    umbrello/uml1model/umlobject.h

https://commits.kde.org/umbrello/7e5bb60355b8728d207c64303855a8d8e51f9a9f
Comment 2 Ralf Habacker 2019-07-12 21:55:44 UTC
Git commit 19131cd0605e955ae03d3ae6e26fb24363e2533c by Ralf Habacker.
Committed on 12/07/2019 at 21:55.
Pushed by habacker into branch 'master'.

Add more cxx test cases

A  +7    -0    test/import/cxx/constructor.h     [License: UNKNOWN]  *
A  +9    -0    test/import/cxx/destructor.h     [License: UNKNOWN]  *
A  +2    -0    test/import/cxx/includes-local.h     [License: Trivial file]
A  +3    -0    test/import/cxx/includes.h     [License: UNKNOWN]  *
A  +3    -0    test/import/cxx/virtual-methods.h     [License: UNKNOWN]  *

The files marked with a * at the end have a non valid license. Please read: https://community.kde.org/Policies/Licensing_Policy and use the headers which are listed at that page.


https://commits.kde.org/umbrello/19131cd0605e955ae03d3ae6e26fb24363e2533c
Comment 3 Ralf Habacker 2019-07-13 07:53:50 UTC
Git commit 8a1a0cd058ce2c8a78b65e0875c392cabd9b68c2 by Ralf Habacker.
Committed on 13/07/2019 at 07:53.
Pushed by habacker into branch 'master'.

Limit the renaming of constructors/destructors to languages that support it (c++, java and c#)

M  +8    -8    umbrello/uml1model/classifier.cpp

https://commits.kde.org/umbrello/8a1a0cd058ce2c8a78b65e0875c392cabd9b68c2