Bug 262580

Summary: Code completion uses old class name after a rename in header
Product: [Applications] kdevelop Reporter: Dmitry <dmitry.risenberg>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: ashaduri
Priority: NOR    
Version First Reported In: 4.1.60   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Dmitry 2011-01-08 20:48:53 UTC
Version:           4.1.60 (using KDE 4.5.2) 
OS:                Linux

Add two files to a project

// file.h
class Class {
    void method();
};

// file.cpp
#include "file.h"

Now rename Class -> NewClass in file.h and add another method, so that the header looks like this:

class NewClass {
    void method(int arg);
    void newMethod();
};

Now invoke code completion in minimal.cpp - it offers to implement Class::method and Class:newMethod functions, and if executed, exactly these function definitions are created. This is wrong, because the class name is now NewClass.

Reproducible: Always
Comment 1 Alexander 2011-06-29 17:22:19 UTC
I can confirm this, I'm affected as well (KDevelop git master, 2011-06-29).
Additionally, some other problems can occur - adding base classes sometimes won't register, etc...
Comment 2 Justin Zobel 2021-03-09 22:47:52 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.
Comment 3 Alexander 2021-03-10 10:02:07 UTC
The old cpp plugin is no longer maintained, closing.