Summary: | Kdevelop auto-changes "this->someVar" into "this.someVar" | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | olig9 |
Component: | Code completion | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | medhefgo, olivier.jg |
Priority: | NOR | ||
Version: | 4.0.0 | ||
Target Milestone: | 4.0.1 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | test case showing the problem |
I can reproduce this with KDevelop 4.0.0 in KDE SC 4.5 RC2. Auto-close didn't work because diff was too long to be added as a comment. This is fixed by commit 6ac597c5e862b9891665025375a5febb9cf33404. |
Created attachment 49181 [details] test case showing the problem Version: 4.0.0 (using KDE 4.4.4) OS: Linux In certain cases, when typing "obj1 > this->mObj" Kdev will change the -> characters automatically to a dot when typing it, so it reads this.mObj . This is obviously incorrect in normal C++ code. Looks like this only happens in very special cases. See the test case. I think it has to do with: - obj1 being an object (if it's an int the problem doesn't appear) - the comparison being a greater-than (if it's a <, >= or == the problem doesn't appear) Reproducible: Always Steps to Reproduce: - open the attached test case file in Kdev 4 - edit the "if" line: delete it and type it again, as: "if (obj1 > this->mObj)" - observe that the -> is automatically changed to "." Actual Results: The "->" characters are replaced by a "." character Expected Results: The "->" characters should stay as I typed them. Workaround is to type "(*this).someVar" instead :-) This happens with self-compiled Kdev 4.0.60, on RHEL 5.1.