| Summary: | KDevelop must support pointer/reference align mode for indentation (reformatting) | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Denis Pesotsky <denis> |
| Component: | general | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | denis, fedotov.i.f, lamefun.x0r |
| Priority: | HI | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | 4.2.0 | ||
| Platform: | unspecified | ||
| OS: | Unspecified | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Dam I mistaken. Fixed:
Actual Results:
It don't change pointers and references
Class& func(const QPoint &a)
{
int *a;
int * b;
int* c;
return *this;
}
Expected Results:
Class &func(const QPoint &a)
{
int *a;
int *b;
int *c;
return *this;
}
*** This bug has been confirmed by popular vote. *** yep, we need to update our astyle lib checkout and add the new features in there fixed since some time *** Bug 255039 has been marked as a duplicate of this bug. *** |
Version: unspecified OS: unspecified There are 3 ways to indent «*» in pointers and «&» in references: int* a — Stroustrup style int *a — K&R style int * a — neutral guys style astyle has «--align-pointer» option to handle this, it can be equal to type/middle/name. KDevelop currently don't support this option in indentation/reformatting, but alligns to type on auto-completion (!) and that suxx. In most Qt and KDE sources, it's alligned to name. Personally I prefer alligning to name too. Reproducible: Always Steps to Reproduce: Reformat following code: Class& func(const QPoint &a) { int *a; int * b; int* c; return *this; } Actual Results: Class& func(const QPoint &a) { int *a; int * b; int* c; return *this; } Expected Results: It don't change pointers and references Class &func(const QPoint &a) { int *a; int *b; int *c; return *this; }