Bug 329588 - RFE: please add option to put 'const' to *right* of type
Summary: RFE: please add option to put 'const' to *right* of type
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (other bugs)
Version First Reported In: 4.5.1
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-04 05:51 UTC by Matthew Woehlke
Modified: 2026-02-10 11:55 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 Matthew Woehlke 2014-01-04 05:51:19 UTC
I am a (very) firm believer that the correct placement of 'const' is always on the right, e.g 'int const*', 'QString const&', and yes, even 'int const localVariable'.

Unfortunately, KDevelop's autocompletion doesn't honor this, making it less helpful than it could be.

Reproducible: Always

Steps to Reproduce:
1. Declare a function/method e.g. in a class header file.
2. Type the class name in the class source file in order to trigger auto-complete.
3. Accept auto-complete to fill in the skeleton of the new method.
Actual Results:  
Completion produces e.g.:

int Foo::bar(const QString& text)
{
}

Expected Results:  
Completion produces e.g.:

int Foo::bar(QString const& text)
{
}

Please add an option to cause completion to put 'const' to the right! (Bonus points for making it copy the 'const' placement for whatever it is completing so that it is automagic.)
Comment 1 aristsakas 2026-02-10 11:55:00 UTC
Thank you for the bug report. Unfortunately we were not able to get to it yet. Can we ask you to please check if this is still an issue with KDevelop 25.12.2.