Bug 304165 - kdevelop messes up implementation when changing function declaration with unnamed parameters and use "update definition signature"
Summary: kdevelop messes up implementation when changing function declaration with un...
Status: CONFIRMED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-28 05:26 UTC by Franz Trischberger
Modified: 2021-03-09 22:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franz Trischberger 2012-07-28 05:26:47 UTC
Simple example:
initial declaration:
void paint(QPainter*);
definition:
void paint(QPainter* painter) {
    painter->drawRect(QRect(0,0,24,24));
}

Then I change the signature of the declaration:
void paint(QPainter*, QRect);

kdevelop then offers me to update the signature of the definition, which leads to this:
void paint(QPainter*, QRect) {
    ->drawRect(QRect(0,0,24,24));
}

Reproducible: Always
Comment 1 Milian Wolff 2012-08-18 01:24:54 UTC
confirmed
Comment 2 Franz Trischberger 2012-08-18 05:17:01 UTC
It also happens, when the parameter name in a declaration gets changed.

decl:
void test(int par);

def:
void test(int par) {
    int x = 5+par;
}

change decl:
void test(int party);

def becomes:
void test(int par) {
    int x = 5+party;
}
Comment 3 Justin Zobel 2021-03-09 22:48:44 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.