| Summary: | RFE: please add option to put 'const' to *right* of type | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Matthew Woehlke <mwoehlke.floss> |
| Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
| Status: | NEEDSINFO WAITINGFORINFO | ||
| Severity: | wishlist | CC: | aristsakas |
| Priority: | NOR | ||
| Version First Reported In: | 4.5.1 | ||
| Target Milestone: | --- | ||
| Platform: | Fedora RPMs | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
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. |
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.)