Bug 359062

Summary: Renaming class changes filename but not #include directives
Product: [Applications] kdevelop Reporter: Fredrik Haikarainen <fredrik.haikarainen>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: normal CC: aspotashev
Priority: NOR    
Version First Reported In: 4.7.1   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Fredrik Haikarainen 2016-02-06 12:07:14 UTC
I think the summary is pretty self-descriptive; when you rename a class (using right-click > rename "Foo"), it renames the filename of the file as well to reflect the changes (as expected and a nice feature), however it does not change any #include directives pointing to the file, leading to lots of manual labour.



Reproducible: Always

Steps to Reproduce:
1. Declare a class named Foo in a file called Foo.hpp
2. Create a file that #include's Foo.hpp (Foo.cpp for example)
3. Rename the class Foo to "Bar" using the renaming tool

Actual Results:  
Any declarations, definitions and usages of class Foo are changed. The file Foo.hpp is also changed. However any #include directives pointing to Foo.hpp are not changed, making them obsolete and breaks compilation.

Expected Results:  
Any declarations, definitions and usages of class Foo are changed. The file Foo.hpp is also changed, along with any #include directive pointing to said file.

Using official Ubuntu 15.10 packages, which provides version 4.7.1 using KDE Development Platform  4.14.13
Comment 1 Justin Zobel 2021-03-09 22:47:54 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.