Bug 359062 - Renaming class changes filename but not #include directives
Summary: Renaming class changes filename but not #include directives
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: 4.7.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-06 12:07 UTC by Fredrik Haikarainen
Modified: 2021-03-09 22:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.